LoadString

2.x

  int LoadString(hinst, idResource, lpszBuffer, cbBuffer)    
  HINSTANCE hinst; /* handle of module containing string resource */
  UINT idResource; /* resource identifier, */  
  LPSTR lpszBuffer; /* address of buffer for resource */
  int cbBuffer; /* size of buffer, */  

The LoadString function loads the specified string resource.

Parameters

hinst

Identifies an instance of the module whose executable file contains the string resource to be loaded.

idResource

Specifies the integer identifier of the string to be loaded.

lpszBuffer

Points to the buffer that will receive the null-terminated string.

cbBuffer

Specifies the buffer size, in bytes. The buffer should be large enough for the string and its terminating null character. The string is truncated if it is longer than the number of bytes specified.

Return Value

The return value specifies the number of bytes copied into the buffer, if the function is successful. It is zero if the string resource does not exist.