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
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
Library |
|
DLL |
|