EnumResTypeProc callback function

Expand
This topic has not yet been rated - Rate this topic

EnumResTypeProc callback function

Applies to: desktop apps only

An application-defined callback function used with the EnumResourceTypes and EnumResourceTypesEx functions. It receives resource types. The ENUMRESTYPEPROC type defines a pointer to this callback function. EnumResTypeProc is a placeholder for the application-defined function name.

Syntax

BOOL CALLBACK EnumResTypeProc(
  __in_opt  HMODULE hModule,
  __in      LPTSTR lpszType,
  __in      LONG_PTR lParam
);

Parameters

hModule [in, optional]

Type: HMODULE

A 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.

lpszType [in]

Type: LPTSTR

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

lParam [in]

Type: LONG_PTR

An application-defined parameter passed to the EnumResourceTypes or EnumResourceTypesEx 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.

An application must register this function by passing its address to the EnumResourceTypes or EnumResourceTypesEx function.

If the callback function returns FALSE, then EnumResourceTypes or EnumResourceTypesEx 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

Minimum supported server

Windows 2000 Server

Header

Winbase.h (include Windows.h)

Unicode and ANSI names

EnumResTypeProcW (Unicode) and EnumResTypeProcA (ANSI)

See also

Reference
EnumResourceTypes
EnumResourceTypesEx
IS_INTRESOURCE
Conceptual
Resources

 

 

Send comments about this topic to Microsoft

Build date: 5/5/2012

Did you find this helpful?
(1500 characters remaining)
Community Additions ADD