Partager via


ExpertReallocMemory

The ExpertReallocMemory function increases or decreases the amount of memory allocated by Network Monitor.

LPVOID WINAPIExpertReallocMemory(HEXPERTKEYhExpertKey,
LPVOIDpOriginalMemory,
SIZE_TnBytes,
LPDWORDpError);

Parameters

  • hExpertKey
    [in] Unique identifier passed to the expert at Run or Configure.
  • pOriginalMemory
    [in] Pointer to the memory allocated by Network Monitor. The pOriginalMemory pointer can be returned by a previous call to ExpertAllocMemory or ExpertReallocMemory.
  • nBytes
    [in] Size of reallocated memory.
  • pError
    [out] On return, an error code if the function fails. If the error code is NMERR_EXPERT_TERMINATE, the expert must clean up and return immediately.

Return Values

If the function is successful, the return value is a pointer to the allocated memory.

If the function is unsuccessful, the return value is NULL, and pError (if it is a non-NULL value) indicates the reason for the failure.

Remarks

It is important to note that an expert should use the Network Monitor memory allocation functions for memory management. If your expert fails during run time, using these functions will allow Network Monitor to free the memory it has allocated.

Requirements

Client Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0.
Server Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.
Header

Declared in Netmon.h.

Library

Link to Nmapi.lib.

DLL Requires Nmapi.dll.