The ExpertAllocMemory function allocates memory for the expert.
LPVOID WINAPI ExpertAllocMemory( HEXPERTKEY hExpertKey, _In_ SIZE_T nBytes, _Out_ LPDWORD pError );
Unique expert identifier. Network Monitor passes hExpertKey to the expert when it calls the Run function.
Allocated memory, measured in bytes.
Error indicator. If the function fails, the nBytes parameter contains the error code. If the error code is NMERR_EXPERT_TERMINATE, the expert must clean-up and return immediately.
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 provides an error code that indicates the reason for the failure.
It is important to note that an expert should use the Network Monitor memory allocation functions (including ExpertReallocMemory) for memory management. If your expert fails during run time, using these functions will allow Network Monitor to free the memory it has allocated.
|Minimum supported client
||Windows 2000 Professional [desktop apps only]
|Minimum supported server
||Windows 2000 Server [desktop apps only]