Share via


ExpertFreeMemory

The ExpertFreeMemory function frees memory acquired by calls to the ExpertAllocMemory and ExpertReallocMemory functions.

SIZE_T WINAPIExpertFreeMemory(HEXPERTKEYhExpertKey,
LPVOIDpMemory);

Parameters

  • hExpertKey
    Unique expert identifier. Network Monitor passes hExpertKey to the expert when it calls the Run function.
  • pMemory
    [in] Pointer to the memory that Network Monitor allocates. The pMemory pointer can be returned by a previous call to ExpertAllocMemory or ExpertReallocMemory.

Return Values

If the function is successful. the return value is NMERR_SUCCESS.

If the function is unsuccessful, the return value indicates the reason for the failure. If the return value is NMERR_EXPERT_TERMINATE, the expert immediately cleans up and returns.

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.