Name

EnumResourceModules Procedure

Syntax

procedure EnumResourceModules(Func: TEnumModuleFuncLW; Data: Pointer);

Description

The EnumResourceModules procedure calls a user-supplied callback function for each resource module in the application, that is, the resource DLL for the application’s .exe file and for every package and DLL the application loads.

The callback function gets two arguments: the instance handle for each resource module and the Data argument. It returns True to continue enumerating modules or False to stop and cause EnumResourceModules to return immediately.

EnumResourceModules is a real procedure.

Tips and Tricks

  • For backward compatibility, EnumResourceModules is overloaded and can use a callback function that declares its HInstance parameter with type Integer. For new code, however, you should use LongWord, or if you are using the Windows unit, THandle.

  • If a module has no separate resource module, EnumResourceModules uses the module’s instance handle. You can tell that a module has a resource module because its resource instance handle is different from the module’s instance handle.

See Also

EnumModules Procedure, FindClassHInstance Function, FindHInstance Function, FindResourceHInstance Function, LoadResourceModule Function, RegisterModule Procedure, TEnumModuleFuncLW Type, UnregisterModule Procedure

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.