ENUMRESNAMEPROCA callback function

An application-defined callback function used with the EnumResourceNames and EnumResourceNamesEx functions. It receives the type and name of a resource. The ENUMRESNAMEPROC type defines a pointer to this callback function. EnumResNameProc is a placeholder for the application-defined function name.

Syntax

ENUMRESNAMEPROCA Enumresnameproca;

BOOL Enumresnameproca(
  HMODULE hModule,
  LPCSTR lpType,
  LPSTR lpName,
  LONG_PTR lParam
)
{...}

Parameters

hModule

Type: HMODULE

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

lpType

lpName

lParam

Type: LONG_PTR

An application-defined parameter passed to the EnumResourceNames or EnumResourceNamesEx 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 EnumResourceNames or EnumResourceNamesEx function.

If the callback function returns FALSE, then EnumResourceNames or EnumResourceNamesEx will stop enumeration and return FALSE. On Windows XP and earlier the value obtained from GetLastError will be ERROR_SUCCESS; starting with Windows Vista, the last error value will be ERROR_RESOURCE_ENUM_USER_STOP.

Requirements

   
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)

See Also

Conceptual

EnumResourceNames

EnumResourceNamesEx

IS_INTRESOURCE

Reference

Resources