Partager via


CompareAddresses

The CompareAddresses function compares two addresses, indicating that one of the addresses is greater than, less than, or equal to the other address.

int WINAPICompareAddresses(LPADDRESSlpAddress1,
LPADDRESSlpAddress2);

Parameters

  • lpAddress1
    [in] Pointer to the first address.
  • lpAddress2
    [in] Pointer to the second address.

Return Values

If the addresses are the same, the function returns zero.

If the lpAddress1 parameter specifies an address that is less than the address that the lpAddress2 parameter specifies, the return value is a negative number.

If the lpAddress1 parameter specifies an address that is greater than the address that the lpAddress2 parameter specifies, the return value is a positive number.

Remarks

An address that is less than another address indicates a previous frame. An address that is greater than another address indicates a later frame.

Network Monitor provides two other functions, CompareFrameDestAddress and CompareFrameSourceAddress, which you can use to compare addresses. The CompareFrameDestAddress function compares a given address to the frame's destination address, and the CompareFrameSourceAddress function compares a given address to the frame's source address.

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

CompareFrameDestAddress, CompareFrameSourceAddress