Partager via


CreateProtocol

The CreateProtocol function notifies Network Monitor that a specific protocol parser exists.

HPROTOCOL WINAPICreateProtocol(LPSTRProtocolName,
LPENTRYPOINTSlpEntryPoints,
DWORDcbEntryPoints);

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 Values

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

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.
Header

Declared in Netmon.h.

Library

Link to Nmapi.lib.

DLL Requires Nmapi.dll.

See Also

DllMain