Поделиться через


FormatPropertyInstance

The FormatPropertyInstance function formats the property instance data using the generic formatter that Network Monitor provides.

DWORD WINAPIVFormatPropertyInstance(LPPROPERTYINSTlpPropertyInst);

Parameters

  • lpPropertyInst
    [in, out] A pointer to a PROPERTYINST structure that contains the instance data.

    On input, the generic formatter takes the instance data from one of the PROPERTYINST union members and converts that data to a predefined formatted string.

    On output, the generic formatter sets the szPropertyText member of the PROPERTYINST structure to a pointer to the formatted string.

Return Values

If the function is successful, the return value is NMERR_SUCCESS.

If the function is unsuccessful, the return value is an error code from NMerr.h.

Remarks

The parser DLL indirectly calls the FormatPropertyInstance function when the generic formatter is required to format data for display in the details pane of the Network Monitor UI. To call FormatPropertyInstance specify it in the InstanceData member of the PROPERTYINFO structure when you define the property.

Note  The parser does not recognize which function is called when it must format an instance of a property. The function can be FormatPropertyInstance or a custom format function defined by the parser. The parser calls whatever format function is specified by the InstanceData member of the PROPERTYINFO structure for the property.

For more information and an example of how to implement formatproperties, see Implementing FormatProperties. For more information about how the generic formatter formats different types of data, see Generic Formatter Output.

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

PROPERTYINFO, PROPERTYINST