NWUSLenByteToUnicodePath

Converts a length-specified file path byte string into a Unicode string

Local Servers:nonblocking
Remote Servers:N/A
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Unicode

Syntax

   #include <nunicode.h> 
    
   N_EXTERN_LIBRARY(nint) NWUSLenByteToUnicodePath ( 
      punicode              unicodeOutput,  
      nuint                 outputBufferLen,  
      const nuint8 N_FAR   *byteInput,  
      nuint                 inLength,  
      pnuint                actualLength);
   

Pascal Syntax

   uses netwin32 
    
   Function NWUSLenByteToUnicodePath 
     (unicodeOutput : punicode;
     outputBufferLen : nuint;
     byteInput : const nuint8;
     inLength : nuint;
     actualLength : pnuint              
   ): nint;
   

Parameters

unicodeOutput
(OUT) Points to the output buffer to receive the resulting Unicode string (optional).
outputBufferLen
(IN) Specifies the maximum size of the output buffer in Unicode characters.
byteInput
(IN) Points to the input buffer containing the byte string to be converted.
inLength
(IN) Specifies the length of the input string in bytes (might not be NULL-terminated).
actualLength
(OUT) Points to the returned length (in Unicode characters) of the converted string (optional). Does not include the NULL terminator.

Return Values

0x0000

SUCCESSFUL

0xFDEE

NWU_BUFFER_FULL

0xFDE0

NWU_NO_CONVERTER

Remarks

Call NWUSLenByteToUnicodePath whenever the byte string to be converted is a file path.

NWUSLenByteToUnicodePath converts an unmappable byte into the substitute Unicode character.

NWUSLenByteToUnicodePath converts a special byte sequence into a Unicode character. For example, "[2620]" is converted to the single Unicode character, 0x2620.

Call NWUSLenByteToUnicodePath to determine the size of the string before it is converted by setting the unicodeOutput parameter to NULL. The outputBufferLen parameter will be ignored, a converted string will not be returned, and the length of the string if it were converted will be returned in the actualLength parameter.

To determine the behavior of NWUSLenByteToUnicodePath when an embedded NULL is encountered, see Length-Specified Byte String Conversion.

See eslbunip.c for sample code.

See Also

NWUSLenByteToUnicode, NWUSUnicodeToUntermBytePath