Partager via


2.3.10 RPC_UNICODE_STRING

The RPC_UNICODE_STRING structure specifies a Unicode string. This structure is defined in IDL as follows:

 typedef struct _RPC_UNICODE_STRING {
   unsigned short Length;
   unsigned short MaximumLength;
   [size_is(MaximumLength/2), length_is(Length/2)] 
     WCHAR* Buffer;
 } RPC_UNICODE_STRING,
  *PRPC_UNICODE_STRING;

Length: The length, in bytes, of the string pointed to by the Buffer member. The length MUST be a multiple of 2. The length MUST equal the entire size of the buffer.

MaximumLength: The maximum size, in bytes, of the string pointed to by Buffer. The size MUST be a multiple of 2. If not, the size MUST be decremented by 1 prior to use. This value MUST not be less than Length.

Buffer: A pointer to a string buffer. The string pointed to by the buffer member MUST NOT include a terminating null character.