Packet Sniffer SDK DLL Edition

HNQueue :: Methods :: QueFreeItems

 Previous Next

Releases queue resources.

Syntax:

DWORD __stdcall QueFreeItems(HANDLE hQue);

Parameters:

hQue

[in] HNQueue object handle.

Return values:

HNERR_OKNo errors.
HNERR_MEM_FREE_ERRORMemory deallocation error.

Description:

Use QueFreeItems to free queue resources, allocated by QueAllocItems function.

While this function executing OnDelete event handler is executed. After that you may not use HNPacket objects, otherwise your application may crash.

After QueFreeItems succeeds, AllocatedSize [Get], FreeCount [Get] and FullCount [Get] properties are set in 0.

If you use HNQueue object together with HNAdapter object, you should remember that you have to free queue resources in time by using of QueFreeItems function or by deleting HNQueue object, otherwise your application may crash (see AdpCloseAdapter).
See also:HNQueue, QueAllocItems, OnDelete, AdpCloseAdapter