Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.42 KB

LoadString.md

File metadata and controls

55 lines (40 loc) · 1.42 KB

Home

Function name : LoadString

Group: Resource - Library: user32


Loads a string resource from the executable file associated with a specified module, copies the string into a buffer, and appends a terminating null character.


Code examples:

Loading a string resource from an executable file

Declaration:

int LoadString(
  HINSTANCE hInstance,  // handle to resource module
  UINT uID,             // resource identifier
  LPTSTR lpBuffer,      // resource buffer
  int nBufferMax        // size of buffer
);  

FoxPro declaration:

DECLARE INTEGER LoadString IN user32;
	INTEGER hInstance,;
	INTEGER uID,;
	INTEGER lpBuffer,;
	INTEGER nBufferMax  

Parameters:

hInstance [in] Handle to an instance of the module whose executable file contains the string resource. uID [in] Specifies the integer identifier of the string to be loaded.

lpBuffer [out] Pointer to the buffer to receive the string.

nBufferMax [in] Specifies the size of the buffer, in TCHARs.


Return value:

If the function succeeds, the return value is the number of TCHARs copied into the buffer, not including the null-terminating character, or zero if the string resource does not exist.