ENUMRESLANGPROCW callback function (libloaderapi.h)

An application-defined callback function used with the EnumResourceLanguagesW and the EnumResourceLanguagesExW functions. It receives the type, name, and language of a resource item. The ENUMRESLANGPROC type defines a pointer to this callback function. EnumResLangProc is a placeholder for the application-defined function name.

Syntax

BOOL CALLBACK EnumResLangProc(
  _In_opt_ HMODULE  hModule,
  _In_     LPCWSTR  lpszType,
  _In_     LPCWSTR  lpszName,
  _In_     WORD     wIDLanguage,
  _In_     LONG_PTR lParam
);

Syntax

ENUMRESLANGPROCW Enumreslangprocw;

BOOL Enumreslangprocw(
  [in, optional] HMODULE hModule,
  [in]           LPCWSTR lpType,
  [in]           LPCWSTR lpName,
  [in]           WORD wLanguage,
  [in]           LONG_PTR lParam
)
{...}

Parameters

[in, optional] hModule

Type: HMODULE

A handle to the module whose executable file contains the resources for which the languages are being enumerated. If this parameter is NULL, the function enumerates the resource languages in the module used to create the current process.

[in] lpType

Type: LPCWSTR

The type of resource for which the language is being enumerated. Alternately, rather than a pointer, this parameter can be MAKEINTRESOURCE(ID), where ID is an integer value representing a predefined resource type. For standard resource types, see Resource Types. For more information, see the Remarks section below.

[in] lpName

Type: LPCWSTR

The name of the resource for which the language is being enumerated. Alternately, rather than a pointer, this parameter can be MAKEINTRESOURCE(ID), where ID is the integer identifier of the resource. For more information, see the Remarks section below.

[in] wLanguage

Type: WORD

The language identifier for the resource for which the language is being enumerated. The EnumResourceLanguagesW or EnumResourceLanguagesExW function provides this value. For a list of the primary language identifiers and sublanguage identifiers that constitute a language identifier, see MAKELANGID.

[in] lParam

Type: LONG_PTR

The application-defined parameter passed to the EnumResourceLanguagesW or EnumResourceLanguagesExW function. This parameter can be used in error checking.

Return value

Type: BOOL

Returns TRUE to continue enumeration or FALSE to stop enumeration.

Remarks

If IS_INTRESOURCE(lpszType) is TRUE, then lpszType specifies the integer identifier of the given resource type. Otherwise, it is a pointer to a null-terminated string. If the first character of the string is a pound sign (#), then the remaining characters represent a decimal number that specifies the integer identifier of the resource type. For example, the string "#258" represents the identifier 258.

Similarly, if IS_INTRESOURCE(lpszName) is TRUE, then lpszName specifies the integer identifier of the given resource. Otherwise, it is a pointer to a null-terminated string. If the first character of the string is a pound sign (#), then the remaining characters represent a decimal number that specifies the integer identifier of the resource.

An application must register this function by passing its address to the EnumResourceLanguagesW or EnumResourceLanguagesExW function.

If the callback function returns FALSE, then EnumResourceLanguagesW or EnumResourceLanguagesExW will stop enumeration and return FALSE. The value obtained from GetLastError will be ERROR_RESOURCE_ENUM_USER_STOP.

See also

EnumResourceLanguagesW

EnumResourceLanguagesExW

IS_INTRESOURCE

MAKELANGID

Resources

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header libloaderapi.h (include Windows.h)