SnmpUtilMemAlloc

The SnmpUtilMemAlloc function allocates dynamic memory from the process heap. This function is an element of the SNMP Utility API.

LPVOID SnmpUtilMemAlloc(
  UINT nBytes  // bytes to allocate for object
);
 

Parameters

nBytes
[in] Specifies the number of bytes to allocate for the memory object.

Return Values

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.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in snmp.h.
  Import Library: Use snmpapi.lib.

See Also

Simple Network Management Protocol (SNMP) Overview, SNMP Functions, SnmpUtilMemFree, SnmpUtilMemReAlloc