SnmpUtilOidAppend function (snmp.h)

[SNMP is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use Windows Remote Management, which is the Microsoft implementation of WS-Man.]

The SnmpUtilOidAppend function appends the source object identifier to the destination object identifier. This function is an element of the SNMP Utility API.

Syntax

SNMPAPI SNMP_FUNC_TYPE SnmpUtilOidAppend(
  [in, out] AsnObjectIdentifier *pOidDst,
  [in]      AsnObjectIdentifier *pOidSrc
);

Parameters

[in, out] pOidDst

Pointer to an AsnObjectIdentifier structure to receive the source structure.

[in] pOidSrc

Pointer to an AsnObjectIdentifier structure to append.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. This function does not generate Windows Sockets errors. The application should call the GetLastError function. GetLastError may return the following error codes.

Return code Description
SNMP_BERAPI_OVERFLOW
Indicates an overflow condition
SNMP_MEM_ALLOC_ERROR
Indicates a memory allocation error

Remarks

The SnmpUtilOidAppend function calls the SnmpUtilMemReAlloc function. The SnmpUtilMemReAlloc function expands the buffer for the destination object identifier.

Call the SnmpUtilOidFree function to free memory that the SnmpUtilOidAppend function allocates for the destination.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header snmp.h
Library Snmpapi.lib
DLL Snmpapi.dll

See also

SNMP Functions

Simple Network Management Protocol (SNMP) Overview

SnmpUtilMemReAlloc

SnmpUtilOidFree