Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Other versions of this page are also available for the following:
Windows Mobile Not Supported Windows Embedded CE Supported
8/28/2008

This function converts an object identifier (OID) to a null-terminated string. This function is an element of the SNMP Utility API.

Syntax


LPSTR SnmpUtilIdsToA(
  UINT
 Ids
, 
  UINT
 IdLength 

);

Parameters

Ids

[in] Pointer to an array of unsigned integers. The array contains the sequence of numbers that the OID contains. The IdLengthparameter specifies the array's length.

For more information, see the following Return Values and Remarks sections.

IdLength

[in] Specifies the number of elements in the array pointed to by the Idsparameter.

Return Value

The function returns a null-terminated string of ANSI characters that contains the string representation of the array of numbers pointed to by the Idsparameter. The string contains a sequence of numbers separated by periods ('.'); for example, 1.3.6.1.4.1.311.

If the Idsparameter is null, or if the IdLengthparameter specifies zero, the function returns the string <null oid>.

The maximum length of the returned string is 256 characters. If the string's length exceeds 256 characters, the string is truncated and terminated with a sequence of three periods ('...').

Remarks

The SnmpUtilIdsToAfunction can assist with the debugging of SNMP applications.

Note that the following memory restrictions apply when you call SnmpUtilIdsToA:

  • The Idsparameter must point to a valid memory block of at least IdLengthintegers, or the function call results in an access violation exception.

  • The string returned by SnmpUtilIdsToAresides in memory that the SNMP Utility API allocates. The application should not make any assumptions about the memory allocation. The data is guaranteed to be valid until you call SnmpUtilIdsToAagain, so before calling the function again you should copy the data to another location.

Requirements

Header snmp.h
Library snmpapi.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

SnmpUtilOidToA