Packet Sniffer SDK DLL Edition

HNPacket :: Properties :: PktSetUserData

 Previous Next

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

Syntax:

DWORD_PTR __stdcall PktSetUserData(HANDLE hPkt, DWORD_PTR UserData);

Return values:

If the function succeeds the return value will be the UserData parameter value.

Parameters:

hPkt

[in] HNPacket object handle.

UserData

[in] User-defined 32/64-bit value.

Description:

Use PktSetUserData to set the 32/64-bit value associated with a certain packet.

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, PktGetUserData