EnumResourceNames

  BOOL EnumResourceNames(hModule, lpszType, lpEnumFunc, lParam)    
  HANDLE hModule; /* module containing resources */
  LPCTSTR lpszType; /* resource type */
  ENUMRESNAMEPROC lpEnumFunc; /* address of callback function */
  LONG lParam; /* application-defined parameter */

The EnumResourceNames function searches a module for each resource of the specified type. For each resource it locates, the function passes the name of the resource to a user-defined callback function.

Parameters

hModule

Identifies the module whose executable file contains the resource names to be enumerated. If this parameter is NULL, the function enumerates the resources in the image file that was used to create the current process.

lpszType

Points to a null-terminated string that represents the type name of the resource being enumerated. For predefined resource types, this parameter will be one of the following values:

Value Meaning

RT_ACCELERATOR Accelerator table
RT_BITMAP Bitmap resource
RT_DIALOG Dialog box
RT_FONT Font resource
RT_FONTDIR Font directory resource
RT_MENU Menu resource
RT_RCDATA User-defined resource (raw data)
RT_STRING String-table entry
RT_MESSAGETABLE Message-table entry
RT_CURSOR Hardware-dependent cursor resource
RT_GROUP_CURSOR Hardware-independent cursor resource
RT_ICON Hardware-dependent icon resource
RT_GROUP_ICON Hardware-independent icon resource
RT_VERSION Version resource

lpEnumFunc

Points to the callback function that will be called for each enumerated resource name. For more information, see the description of the EnumResNameProc function.

lParam

Specifies an application-defined value that is passed to the callback function.

Return Value

The return value is TRUE if all resource names of the specified type were enumerated. Otherwise, the return value is FALSE. Use the GetLastError function to obtain extended error information.

Comments

The EnumResourceNames function continues to enumerate resource names until the callback function returns FALSE or until all resource names have been enumerated.

The EnumResourceNames function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).

See Also

EnumResNameProc EnumResourceLanguages, EnumResourceTypes