Returns type of loaded executable module, based on analyzing its file header.
Unit
Syntax
ParametersAInstance [in, optional] Module handle to analyze. Default (0) means current module.
Be careful with using 0 in packaged application. It's always better to explicitly specify required module.
Return valueType of the AInstance module. It is TModuleType.mtProgram, TModuleType.mtLibrary or TModuleType.mtPackage on success and TModuleType.mtUnknown on error.
Remarks
This function analyzes PE header of loaded executable and return its type: EXE, DLL or BPL.
Function doesn't cache results and perform checking on each call.
There are also simple wrappers for more easy access. For example, IsEXE, IsDLL and so on. See EAppType unit for more info.
See also
|