Packet Sniffer SDK DLL Edition

HNAdapter :: Events :: AdpSetOnStateChange

 Previous Next

Sets the address and the parameter value for the OnStateChange event handler (see HNFN_STATECHANGE).

Syntax:

FARPROC __stdcall AdpSetOnStateChange(HANDLE hAdp, FARPROC pfOnStateChange, DWORD_PTR Param);

Parameters:

hAdp

[in] HNAdapter object handle.

pfOnStateChange

[in] Event handler function address. This function must be declared as HNFN_STATECHANGE.

Param

[in] Event handler parameter. This parameter is sent to the event handler each time it is called.

Return values:

If the function succeeds the return value will be the value of the pfOnStateChange parameter.

Description:

Use AdpSetOnStateChange to set the address and the parameter value for the OnStateChange event handler. This event handler is called immediately after the network adapter state is changed, e.g. it has been unplugged etc.

See also:HNAdapter, HNFN_STATECHANGE