The SnmpUtilIdsToW function converts an object identifier (OID) to a Unicode string. This function is an element of the SNMP Utility API.
LPTSTR SnmpUtilIdsToW( UINT Ids, UINT IdLength );
[in] Pointer to an array of unsigned integers. The array contains the sequence of numbers that the OID contains. The IdLength parameter specifies the array's length.
For more information, see the following Return Values and Remarks sections.
[in] Specifies the number of elements in the array pointed to by the Ids parameter.
The function returns a Unicode-based string of ANSI characters that contains the string representation of the array of numbers pointed to by the Ids parameter. The string contains a sequence of numbers separated by periods ('.'); for example, 22.214.171.124.4.1.311.
If the Ids parameter is null, or if the IdLength parameter 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 ('...').
The SnmpUtilIdsToW function can assist with the debugging of SNMP applications.
Note that the following memory restrictions apply when you call SnmpUtilIdsToW:
- The Ids parameter must point to a valid memory block of at least IdLength integers, or the function call results in an access violation exception.
- The string returned by SnmpUtilIdsToW resides 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 SnmpUtilIdsToW again, so before calling the function again you should copy the data to another location.
|Runs on||Versions||Defined in||Include||Link to|
|Windows CE OS||3.0 and later||Snmp.h||Snmpapi.lib|
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.