uLib
User mode C/C++ extended API library for Win32 programmers.
|
These functions work with resource strings.
Classes | |
struct | RC_STRING |
Functions | |
CSTR | LoadStr (HMODULE hModule, UINT Id, TSTR Buf=NULL, UINT Count=0) |
WCSTR | GetResourceStr (HMODULE hModule, UINT Id, PWORD pCount) |
WCSTR | FindResourceStrEx (HMODULE hModule, UINT Id, LANGID Lang, PWORD pCount) |
CSTR | DupResourceStrEx (HMODULE hModule, UINT Id, LANGID Lang, PWORD pCount) |
CSTR | FreeResourceStrEx (CSTR pzRcDupStr) |
LoadStr() is an auto-buffered LoadString.
hModule | Module handle of string resource. |
Id | Resource string ID. |
Buf | Ptr to TCHAR buffer, or NULL to use internal MAX_PATH static buffer. |
Count | Length of buffer, if provided. |
Definition at line 310 of file StrFunc.cpp.
GetResourceStr() returns a read-only pointer directly to a string resource.
hModule | Module handle of resource. |
Id | Resource ID. |
pCount | Ptr to a WORD that recieves the string length, in wchars. |
Note: Resource strings are counted, not necessarily NUL terminated.
Example (using the native type UNICODE_STRING):
Definition at line 324 of file StrFunc.cpp.
FindResourceStrEx() returns a read-only pointer directly to a language specific string resource.
Lang | Laguage identifier. |
See GetResourceStr() for more details.
Definition at line 339 of file StrFunc.cpp.
DupResourceStrEx allocates, loads, translates, and null terminates a resource string.
Free with FreeResourceStrEx() when done.
See FindResourceStrEx() for more details.
Definition at line 360 of file StrFunc.cpp.
Definition at line 383 of file StrFunc.cpp.