SnmpUtilMemAlloc 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 SnmpUtilMemAlloc function allocates dynamic memory from the process heap. This function is an element of the SNMP Utility API.

Syntax

LPVOID SNMP_FUNC_TYPE SnmpUtilMemAlloc(
  [in] UINT nBytes
);

Parameters

[in] nBytes

Specifies the number of bytes to allocate for the memory object.

Return value

If the function succeeds, the return value is a pointer to the newly allocated memory object.

If the function fails, the return value is NULL.

Remarks

Use the SnmpUtilMemFree function to release memory that the SnmpUtilMemAlloc function allocates.

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

SnmpUtilMemFree

SnmpUtilMemReAlloc