Packet Sniffer SDK DLL Edition

HNPacket :: Properties :: PktGetUserData

 Previous Next

Returns the value definded by the user and associated with this packet.

Syntax:

DWORD_PTR __stdcall PktGetUserData(HANDLE hPkt);

Parameters:

hPkt

[in] HNPacket object handle.

Return values:

If the function succeeds the return value will be the value definded by the user and associated with this packet, otherwise it will be 0.

Description:

Use PktGetUserData to define the 32/64-bit value associated with a certain packet.

PktGetUserData/PktSetUserData may be useful for binding a packet with some value or label. Also you may want to store in this property the pointer to your own structure with additional data associated with this packet which may be used later.

See also:HNPacket, PktSetUserData