Platform SDK: Network Management

SnmpUtilOidNCmp

The SnmpUtilOidNCmp function compares two object identifiers. The function compares the subidentifiers in the variables until it reaches the number of subidentifiers specified by the nSubIds parameter. SnmpUtilOidNCmp is an element of the SNMP Utility API.

SNMPAPI SnmpUtilOidNCmp(
  AsnObjectIdentifier *pOid1,  // first object identifier
  AsnObjectIdentifier *pOid2,  // second object identifier
  UINT nSubIds                 // maximum length to compare
);

Parameters

pOid1
[in] Pointer to an AsnObjectIdentifier structure to compare.
pOid2
[in] Pointer to a second AsnObjectIdentifier structure to compare.
nSubIds
[in] Specifies the number of subidentifiers to compare.

Return Values

The function returns a value greater than zero if pOid1 is greater than pOid2, zero if pOid1 equals pOid2, and less than zero if pOid1 is less than pOid2.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Snmp.h.
  Library: Use Snmpapi.lib.

See Also

Simple Network Management Protocol (SNMP) Overview, SNMP Functions, SnmpUtilOidCmp