Condividi tramite


AttachPropertyInstance Function

The AttachPropertyInstance function maps an existing property to a specific location in the recognized data.

Syntax

BOOL WINAPI AttachPropertyInstance(
  __in  HFRAME hFrame,
  __in  HPROPERTY hProperty,
  __in  DWORD Length,
  __in  ULPVOID lpData,
  __in  DWORD HelpID,
  __in  DWORD IndentLevel,
  __in  DWORD IFlags
);

Parameters

  • hFrame [in]
    Handle to the frame that is being parsed. Use the handle passed to the parser DLL in the hFrame parameter of the AttachProperties function.

  • hProperty [in]
    Handle to a PROPERTYINFO structure that defines the property. When you implement the Register export function you specify the PROPERTYINFO structure that defines the property.

  • Length [in]
    Length of the data for this instance of the property.

  • lpData [in]
    Pointer to the location in the recognized data where the property value is located. Use the pointer passed to the parser DLL in the lpProtocol parameter of the AttachProperties function.

  • HelpID [in]
    Identifier (from 0 to 2047) used to set context-sensitive Help for the property.

    The identifier number is relative to the Help file associated with the protocol property database.

  • IndentLevel [in]
    Indentation level (from 0 to 15) used to display a property hierarchically.

    Network Monitor uses levels 0 through 14 to indent properties. Level 15 is a special value that allows a parser to attach a hidden property that is not visible.

  • IFlags [in]
    A BIT field value that indicates the order of the BITs within a property. Previous parsers that set fError to 0 or 1, should now set fError to IFLAG_ERROR. Set this parameter to one of the following values.

    Value Meaning
    IFLAG_ERROR

    Data in the frame has an error.

    IFLAG_SWAPPED

    At attach time, WORD byte is a non-Intel format.

    IFLAG_UNICODE

    At attach time, STRING is Unicode.

     

Return Value

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

If the function is unsuccessful, the return value is FALSE.

Remarks

The AttachPropertyInstance function is called during the implementation of the AttachProperties export function. When a property is attached to the data, Network Monitor creates a PROPERTYINST structure that defines the instance of the attached property.

During the implementation of AttachProperties, call AttachPropertyInstance to use the data as it exists in the capture. You can also call AttachPropertyInstanceEx function to modify the property data. However, it is advised that you use the data as it exists in the capture.

For Information on See
What parsers are, and how they work with Network Monitor. Parsers
How to call AttachPropertyInstance. Implementing AttachProperties

 

Requirements

Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
Header Netmon.h
Library Nmapi.lib
DLL Nmapi.dll

See Also

AttachProperties

AttachPropertyInstanceEx

PROPERTYINST

Send comments about this topic to Microsoft

Build date: 11/9/2009