NumXL SDK - Locality resources API
Lookup functions

Lookup locale resources. More...

Functions

int __stdcall SFMSG_MSG (DWORD resId, LPWSTR szBuffer, size_t *pSize)
 Lookup and retrieve a localized string system.
 

Detailed Description

The end-applications query the locale system for a given text resource, via a unique integer identifier.

Function Documentation

◆ SFMSG_MSG()

int __stdcall SFMSG_MSG ( DWORD resId,
LPWSTR szBuffer,
size_t * pSize )

Get the locale resource identified by a unique identifier

Parameters
[in]resId(Required) is the resource ID.
[out]szBuffer(Optional) is output buffer to return the designated string
[in,out]pSize(Required) is the size of the szBuffer, and upon return, holds the number of actual of bytes copied.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_UNINITIALIZEDfailed (see remarks)
NDK_MISSING_RESOURCEfailed (see remarks)
NDK_INVALID_ARGfailed (see remarks)
NDK_LENGTH_ERRORfailed (see remarks)
NDK_FAILEDfailed (see remarks)
Remarks
  1. If the license module has not been initialized, the function will fail and return NDK_UNINITIALIZED as the return code.
  2. If the value of szBuffer argument or szBuffer are both NULL, the function will fail and return NDK_INVALID_ARG as the return code.
  3. If the value of resId is not found in the resource DLL, the function will fail and retun NDK_MISSING_RESOURCE as return code.
  4. If szBuffer is NULL, and nLen is non-NULL, the function returns NDK_SUCCESS and stores the size of the data, in characters, in the variable pointed to by pSize. This enables an application to determine the best way to allocate a buffer for the value's data.
  5. If the value of szBuffer is not NULL and the value pointed by pSize is either zero(0) or smaller than needed to hold the resource, the function will fail and return NDK_LENGTH_ERROR as return code.
Requirements
Requirement Value
Target Platform Windows
Header SFMSG.h (include Windows.h)
Library SFMSG.lib
DLL SFMSG.dll SFLOG.dll
See also
Examples
msg_init.cpp.