DllMain Expert callback function
The expert implements the DllMain function. The operating system calls DllMain to obtain a handle to an instance of the expert.
Syntax
BOOL WINAPI DllMain(
_Out_ HINSTANCE hInstance,
_In_ ULONG ulReason,
LPVOID Reserved
);
Parameters
-
hInstance [out]
-
Handle to an instance of the expert.
If the expert uses the Network Monitor user interface, the hInstance value must be stored in a global variable. This approach is necessary only when the value of the ulReason parameter is set to DLL_PROCESS_ATTACH.
-
ulReason [in]
-
Indicator of why the function was called. A value of DLL_PROCESS_ATTACH, (which applies when the DLL is first loaded) indicates that the expert should save the hInstance value in a global variable.
With any other value, all calls to the DllMain function can be ignored. For a list of all possible flags set by the operating system, see DLLMain.
-
Reserved
-
Parameter is not in use.
Return value
If the function is successful, the return value is TRUE.
If the function is unsuccessful, the return value is FALSE.
Remarks
The operating system calls the DllMain expert function when a process loads or unloads the expert DLL. The DllMain expert function must be exported only if the expert has a user interface for viewing either configuration or results, and then only to return the proper hInstance value.
The DllMain expert function is based on the dynamic link library DllMain function.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|