Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinLoadString (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINMESSAGEMGR
SHORT WinLoadString(hab, hmod, id, cchMax, pszBuffer)
HAB hab; /* handle of the anchor block */
HMODULE hmod; /* handle of the module with the string */
USHORT id; /* string identifier */
SHORT cchMax; /* size of the buffer */
PSZ pszBuffer; /* address of the buffer for the string */
The WinLoadString function loads a string from a resource, copies the string
to the specified buffer, and appends a terminating null character.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hab Identifies the anchor block.
hmod Identifies the module that contains the string. This parameter
can be either the module handle returned by the DosLoadModule
function or NULL for the application's module.
id Identifies the string identifier.
cchMax Specifies the size of the supplied buffer.
pszBuffer Points to the buffer that receives the string.
Return Value
The return value is the length of the returned string (excluding the
terminating null character). The return value can have a maximum value of
(cchMax -1). The return value is zero if an error occurs.
Comments
String resources contain up to 16 strings each. The resource identifier is
calculated from the id value passed to WinLoadString as follows:
resource identifier = (id / 16) + 1
To save storage on disk and in memory, applications should group their
string resources sequentially, starting at a multiple of 16.
See Also
DosLoadModule, WinLoadMessage
♦