EnumResourceTypes

The EnumResourceTypes function searches a module for resources and passes each resource type it finds to an application-defined callback function.

BOOL EnumResourceTypes(
  HMODULE hModule,             // resource-module handle
  ENUMRESTYPEPROC lpEnumFunc,  // pointer to callback function
  LONG lParam                  // application-defined parameter
);
 

Parameters

hModule
Handle to the module whose executable file contains the resources for which the types are to be enumerated. If this parameter is NULL, the function enumerates the resource types in the module used to create the current process.
lpEnumFunc
Pointer to the callback function to be called for each enumerated resource type. For more information, see the EnumResTypeProc function.
lParam
Specifies an application-defined value passed to the callback function.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

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

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winbase.h.
  Import Library: Use kernel32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows and Windows NT.

See Also

Resources Overview, Resource Functions, EnumResourceLanguages, EnumResourceNames, EnumResTypeProc