CreateProtocol Function
The CreateProtocol function notifies Network Monitor that a specific protocol parser exists.
Syntax
HPROTOCOL WINAPI CreateProtocol(
__in LPSTR ProtocolName,
__in LPENTRYPOINTS lpEntryPoints,
__in DWORD cbEntryPoints
);
Parameters
ProtocolName [in]
Name of the protocol the parser will detect.lpEntryPoints [in]
An ENTRYPOINTS structure that contains the remaining parser DLL entry points. See Remarks for a list of the export functions that each entry point references. Entry points must be provided in the order that the ENTRYPOINTS structure specifies.cbEntryPoints [in]
The size of the ENTRYPOINTS structure. Network Monitor provides an ENTRYPOINTS_SIZE macro that you can use to specify the size of the structure.
Return Value
If the function is successful, the return value is a handle to the protocol.
If the function is unsuccessful, the return value is NULL.
Remarks
The parser DLL calls CreateProtocol during its implementation of DllMain. The CreateProtocol function is called when the operating system loads the parser DLL for the first time.
The entry points referenced in the lpEntryPoints parameter include pointers to the following export functions that must be provided in the order presented here.
For information on | See |
---|---|
What parsers are, and how they work with Network Monitor. | Parsers |
How to implement DllMain—includes an example of calling CreateProtocol within DllMain. | Implementing DllMain |
Requirements
Minimum supported client | Windows 2000 Professional |
Minimum supported server | Windows 2000 Server |
Header | Netmon.h |
Library | Nmapi.lib |
DLL | Nmapi.dll |
See Also
Send comments about this topic to Microsoft
Build date: 11/9/2009