NPLogoff

This function is used to log the user off from this network. The NP has the opportunity to confirm the logoff, if its effects could reach beyond those of active connections being disconnected and open files being closed (the MPR will warn about these before calling any NPs).

NPLogoff is also called with the same sequence when the user chooses to shut down or restart the computer.


DWORD NPLogoff(
HWND hwndOwner,
LPLOGONINFO lpAuthentInfo
DWORD dwReason
  );

hwndOwner

A handle to a window which should be the owner for any dialog boxes or messages which the provider might display.

lpAuthentInfo

A structure describing the currently logged-on user.

dwReason

One of the following values:

LOGOFF_PENDING

Logoff is beginning. The NP should display additional confirmations if necessary. If the user wishes to cancel the logon, the NP should return WN_CANCEL. The NP should not perform any logoff or cleanup operations until LOGOFF_COMMIT.

LOGOFF_COMMIT

Logoff is approved. The NP should take whatever actions necessary to log the user off. The NP may not refuse the logoff at this point.

LOGOFF_CANCEL

Passed only if this NP has been called with LOGOFF_PENDING for this logoff. An NP or application has canceled the logoff, so the logoff is not happening after all.


WN_CANCEL

The user wishes to cancel the logoff.