Process Hacker
_PH_STRING Struct Reference

A 16-bit string object, which supports UTF-16. More...

#include <phbase.h>

Data Fields

union {
   PH_STRINGREF   sr
 
   struct {
      SIZE_T   Length
 The length, in bytes, of the string.
 
      PWCH   Buffer
 The buffer containing the contents of the string.
 
   } 
 
}; 
 
union {
   WCHAR   Data [1]
 
   struct {
      ULONG   AllocationFlags
 Reserved.
 
      PVOID   Allocation
 Reserved.
 
   } 
 
}; 
 

Detailed Description

A 16-bit string object, which supports UTF-16.

Remarks
The Length never includes the null terminator. Every string must have a null terminator at the end, for compatibility reasons. Thus the invariant is:
Buffer[Length / sizeof(WCHAR)] = 0

Definition at line 1220 of file phbase.h.

Field Documentation

union { ... }
union { ... }
PVOID Allocation

Reserved.

Definition at line 1244 of file phbase.h.

ULONG AllocationFlags

Reserved.

Definition at line 1242 of file phbase.h.

PWCH Buffer

The buffer containing the contents of the string.

Definition at line 1231 of file phbase.h.

WCHAR Data[1]

Definition at line 1238 of file phbase.h.

SIZE_T Length

The length, in bytes, of the string.

Definition at line 1229 of file phbase.h.

Definition at line 1225 of file phbase.h.


The documentation for this struct was generated from the following file: