uLib
User mode C/C++ extended API library for Win32 programmers.
|
Supplements for native UNICODE_STRINGs..
Classes | |
class | UString |
Macros | |
#define | INIT_PACKED_UNICODE_STRING(pu, bufsize) |
Functions | |
PUNICODE_STRING | mem_AllocUniStr (WORD ccStr, OPTOUT PULONG cbAlloc) |
PUNICODE_STRING | _InitUnicodeString (PUNICODE_STRING puStr, PCWSTR pwzSrc) |
PSTRING | _InitString (PSTRING pStr, LPCSTR pzSrc) |
bool | SetUnicodeString (PUNICODE_STRING puStr, WCSTR wzSrc) |
PUNICODE_STRING | InitPackedUnicodeString (PVOID Buffer, USHORT cbBuffer) |
#define INIT_PACKED_UNICODE_STRING | ( | pu, | |
bufsize | |||
) |
Setup a UNICODE_STRING to point to the first WCHAR after itself.
pu | Pointer to the UNICODE_STRING at the head of the buffer. |
bufsize | Size of the buffer, including the UNICODE_STRING struct. |
See also SetUnicodeString()
Allocate and initialize a packed UNICODE_STRING buffer.
The allocated buffer iz zero-filled, and the struct initialized.
ccStr | Count of WCHAR to allocate to the UNICODE_STRING::Buffer. |
cbAlloc | If supplied, recieves the byte size of the whole allocation. |
Dispose with mem_Free().
PUNICODE_STRING _InitUnicodeString | ( | PUNICODE_STRING | puStr, |
PCWSTR | pwzSrc | ||
) |
Alternative to RtlInitUnicodeString() / InitLsaUnicodeString().
The function returns puStr for easy chain-assignment.
Definition at line 1340 of file StrFunc.cpp.
PSTRING _InitString | ( | PSTRING | pStr, |
LPCSTR | pzSrc | ||
) |
Alternative to RtlInitString(). The function returns pStr for easy chain-assignment.
Definition at line 1352 of file StrFunc.cpp.
bool SetUnicodeString | ( | PUNICODE_STRING | puStr, |
WCSTR | wzSrc | ||
) |
Copy wzSrc (incl NUL) to puStr->Buffer if puStr->MaximumLength permits.
If MaximumLength is too small, do nothing and return false, else true.
Note: MaximumLength is never changed under any circumstance, only Length.
Definition at line 1370 of file StrFunc.cpp.
PUNICODE_STRING InitPackedUnicodeString | ( | PVOID | Buffer, |
USHORT | cbBuffer | ||
) |
Function version of INIT_PACKED_UNICODE_STRING.
Buffer points to your buffer, and cbBuffer is it's size, in bytes.
The return value is your Buffer, cast to a UNICODE_STRING pointer.
See also mem_AllocUnistr().
Definition at line 1364 of file StrFunc.cpp.