DllMain Parser
The DllMain export function for the parser identifies the existence of the parser, and releases resources that Network Monitor uses for the parser. DllMain must be implemented in all parser DLLs.
BOOL WINAPIDllMain(HANDLEhInstance,
ULONGCommand,
LPVOIDReserved);
Parameters
hInstance
[in] Handle to an instance of the parser.Command
[in] Indicator to determine why the function is called. For a list of all possible flags, see DllMain. The parser implementation must process the following values.Value Meaning DLL_PROCESS_ATTACH When DllMain is called for the first time, the DLL must call CreateProtocol to provide information to Network Monitor. DLL_PROCESS_DETACH When DllMain is called for the last time, the DLL must call DestroyProtocol to release the resources that the DLL uses. Reserved
Not used now.
Return Values
The parser DLL always returns TRUE.
Remarks
The operating system calls DllMain to load and unload the parser DLL. This function is based on the dynamic-link library DllMain function.
You can also use the implementation of DllMain to store an instance of a parser for use in the future. For example, you can store a parser DLL instance, and then use it for a system call in the future.
For information on | See |
---|---|
What parsers are, and how they work with Network Monitor. | Parsers |
Which entry points are included in the parser DLL. | Parser DLL Architecture |
How to implement DllMain— includes an example. | Implementing DllMain |
Requirements
Client | Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0. |
Server | Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0. |