Hello there,
Log off the current user.
ExitWindows(0, 0);
ExitWindowsEx(EWX_LOGOFF, 0);
With User Interaction
The application receives the WM_QUERYENDSESSION message and displays a dialog box asking the whether it is OK to end the session. If the user clicks Yes, the system logs off the user. If the user clicks No, the logoff is canceled.
case WM_QUERYENDSESSION:
{
int r;
r = MessageBox(NULL,(LPCWSTR)L"End the session?",(LPCWSTR)L"WM_QUERYENDSESSION",MB_YESNO);
// Return TRUE to continue, FALSE to stop.
return r == IDYES;
break;
}
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–
Windows 10 kiosk mode / Shell Launcher : How to configure Logout action after exit the assigned kiosk app?
s_38_33
0
Reputation points
Dear,
I use the Shell Launcher to configure Windows in kiosk mode. According to the documentation, 4 codes/actions are possible (see, https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/customize/shell-launcher):
Exit code Action
-1 1 (restart the device)
0 0 (restart the shell)
1 3 (do nothing)
255 2 (shut down the device)
Need: How to configure Logout action instead restart or shut down device after exit the assigned kiosk app?
Regards,
S. L.
Windows for business | Windows Client for IT Pros | User experience | Other
28,662 questions
1 answer
Sort by: Most helpful
-
Limitless Technology 44,776 Reputation points
2023-09-01T09:09:49.5866667+00:00