17#define WIN32_LEAN_AND_MEAN
26#define WINLOGON_SAS_CLASS L"SAS Window class"
27#define WINLOGON_SAS_TITLE L"SAS window"
29#define IDHK_CTRL_ALT_DEL 0
30#define IDHK_CTRL_SHIFT_ESC 1
39#define EWX_ACTION_MASK 0x5C0F
66 if (!Session->Gina.Functions.WlxStartApplication)
77 ret = Session->Gina.Functions.WlxStartApplication(
78 Session->Gina.Context,
98 WARN(
"WL: CreateEnvironmentBlock() failed\n");
107 ret = Session->Gina.Functions.WlxActivateUserShell(
108 Session->Gina.Context,
133 UserProfile = (Session && Session->UserToken);
137 ERR(
"WL: ImpersonateLoggedOnUser() failed with error %lu\n",
GetLastError());
148 TRACE(
"RegOpenCurrentUser() failed with error %lu\n", rc);
152 SubKey =
L"Control Panel\\International";
158 SubKey =
L"System\\CurrentControlSet\\Control\\Nls\\Language";
173 TRACE(
"RegOpenKeyEx() failed with error %lu\n", rc);
185 TRACE(
"RegQueryValueEx() failed with error %lu\n", rc);
188 else if (dwType !=
REG_SZ)
190 TRACE(
"Wrong type for %S\\%S registry entry (got 0x%lx, expected 0x%x)\n",
198 TRACE(
"HeapAlloc() failed\n");
209 TRACE(
"RegQueryValueEx() failed with error %lu\n", rc);
219 TRACE(
"RtlUnicodeStringToInteger() failed with status 0x%08lx\n",
Status);
223 TRACE(
"%s language is 0x%08lx\n",
224 UserProfile ?
"User" :
"System",
Lcid);
228 TRACE(
"NtSetDefaultLocale() failed with status 0x%08lx\n",
Status);
286 ERR(
"WL: Exception while playing sound '%S', Status 0x%08lx\n",
340 }
while (
Index++ < 20);
348 WARN(
"wdmaud has not started!\n");
353 TRACE(
"Playing %s sound\n", SoundData->
IsStartup ?
"startup" :
"logon");
383 SoundData->
UserToken = Session->UserToken;
437 DWORD dSize = 0x1000;
442 UserProfile = (Session && Session->
UserToken);
450 ERR(
"WL: ImpersonateLoggedOnUser() failed with error %lu\n",
GetLastError());
457 ERR(
"Failed to open enumeration: %lu\n", dRet);
464 ERR(
"Failed to allocate memory\n");
479 for (; dCount; dCount--)
508 ERR(
"WL: Wrong profile info\n");
539 if (MprNotifyInfo->pszUserName)
541 if (MprNotifyInfo->pszDomain)
543 if (MprNotifyInfo->pszPassword)
550 if (MprNotifyInfo->pszOldPassword)
555 LocalFree(MprNotifyInfo->pszOldPassword);
569 Session->hProfileInfo =
NULL;
577 if (Session->Profile ==
NULL
581 ERR(
"WL: Wrong profile\n");
587 L"System\\CurrentControlSet\\Control\\Windows",
593 DWORD dwValue, dwType, cbData =
sizeof(dwValue);
595 &dwType, (
PBYTE)&dwValue, &cbData);
597 bNoPopups = !!dwValue;
603 ZeroMemory(&ProfileInfo,
sizeof(ProfileInfo));
604 ProfileInfo.
dwSize =
sizeof(ProfileInfo);
607 ProfileInfo.
lpUserName = Session->MprNotifyInfo.pszUserName;
611 ProfileInfo.
lpDefaultPath = Session->Profile->pszNetworkDefaultUserProfile;
612 ProfileInfo.
lpServerName = Session->Profile->pszServerName;
618 ERR(
"WL: LoadUserProfileW() failed\n");
621 Session->hProfileInfo = ProfileInfo.
hProfile;
627 WARN(
"WL: CreateUserEnvironment() failed\n");
640 WARN(
"WL: SetDefaultLanguage() failed\n");
647 WARN(
"WL: AllowAccessOnSession() failed to give winsta & desktop access for this session\n");
657 WARN(
"WL: WlxActivateUserShell() failed\n");
666 WARN(
"WL: Failed to initialize screen saver\n");
677 if (Session->Profile)
681 Session->Profile =
NULL;
684 ZeroMemory(&Session->MprNotifyInfo,
sizeof(Session->MprNotifyInfo));
690 if (Session->hProfileInfo)
692 Session->hProfileInfo =
NULL;
704 Session->UserToken =
NULL;
729 ERR(
"ImpersonateLoggedOnUser() failed with error %lu\n",
GetLastError());
740 TRACE(
"In LogoffShutdownThread with uFlags == 0x%x; exit_in_progress == %s\n",
776 pDescName =
"Logoff";
780 pDescName =
"Shutdown";
792 ERR(
"Failed to allocate %s thread data\n", pDescName);
819 ERR(
"Unable to create %s thread, error %lu\n", pDescName,
GetLastError());
827 ERR(
"Unable to get %s thread exit code (error %lu)\n", pDescName,
GetLastError());
834 ERR(
"%s thread returned failure\n", pDescName);
849 TRACE(
"In KillComProcesses\n");
853 ERR(
"ImpersonateLoggedOnUser() failed with error %lu\n",
GetLastError());
916 ERR(
"Failed to initialize security descriptor for logoff thread!\n");
930 ERR(
"Failed to allocate memory for logoff security descriptor!\n");
953 ERR(
"Failed to set Access Rights for logoff thread. Logging out will most likely fail.\n");
961 ERR(
"Failed to initialize security descriptor for logoff thread!\n");
1010 ERR(
"Failed to create Logoff security descriptor. Status 0x%08lx\n",
Status);
1022 ERR(
"Failed to start the Logoff thread, Status 0x%08lx\n",
Status);
1053 if (Session->hProfileInfo)
1055 Session->hProfileInfo =
NULL;
1065 Session->UserToken =
NULL;
1111 if (Session->SASWindow)
1114 Session->SASWindow =
NULL;
1116 if (Session->hEndOfScreenSaverThread)
1117 SetEvent(Session->hEndOfScreenSaverThread);
1140 ERR(
"Failed to start the Shutdown thread, Status 0x%08lx\n",
Status);
1148 ERR(
"Shutting down NT...\n");
1185 Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context);
1194 Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context);
1203 Session->Gina.Functions.WlxDisplayLockedNotice(Session->Gina.Context);
1210 if (Session->Gina.Functions.WlxIsLockOk(Session->Gina.Context))
1218 Session->Gina.Functions.WlxDisplayLockedNotice(Session->Gina.Context);
1229 if (!Session->Gina.Functions.WlxIsLogoffOk(Session->Gina.Context))
1236 Session->Gina.Functions.WlxLogoff(Session->Gina.Context);
1242 Session->Gina.Functions.WlxShutdown(Session->Gina.Context, wlxAction);
1247 Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context);
1254 Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context);
1277 WARN(
"Unknown SAS action 0x%lx\n", wlxAction);
1294 switch (Session->LogonState)
1298 Session->Gina.Functions.WlxDisplaySASNotice(Session->Gina.Context);
1306 Session->Options = 0;
1308 wlxAction = (
DWORD)Session->Gina.Functions.WlxLoggedOutSAS(
1309 Session->Gina.Context,
1314 &Session->UserToken,
1315 &Session->MprNotifyInfo,
1316 (
PVOID*)&Session->Profile);
1326 wlxAction = (
DWORD)Session->Gina.Functions.WlxLoggedOnSAS(Session->Gina.Context, dwSasType,
NULL);
1356 wlxAction = (
DWORD)Session->Gina.Functions.WlxWkstaLockedSAS(Session->Gina.Context, dwSasType);
1372 if (!Session->Gina.Functions.WlxScreenSaverNotify(Session->Gina.Context, &bSecure))
1375 SetEvent(Session->hEndOfScreenSaver);
1405 ERR(
"WL: Unable to register Ctrl+Alt+Del hotkey\n");
1411 if (!Session->TaskManHotkey)
1412 WARN(
"WL: Unable to register Ctrl+Shift+Esc hotkey\n");
1416 if (!Session->LockWkStaHotkey)
1417 WARN(
"WL: Unable to register Win+L hotkey\n");
1421 if (!Session->UtilManHotkey)
1422 WARN(
"WL: Unable to register Win+U hotkey\n");
1436 if (Session->TaskManHotkey)
1439 if (Session->LockWkStaHotkey)
1442 if (Session->UtilManHotkey)
1462 EventName =
L"SystemDefault";
1465 EventName =
L"SystemAsterisk";
1468 EventName =
L"SystemExclamation";
1471 EventName =
L"SystemHand";
1474 EventName =
L"SystemQuestion";
1477 WARN(
"Unhandled type %d\n", uType);
1478 EventName =
L"SystemDefault";
1503 TRACE(
"SAS: CONTROL+ALT+DELETE\n");
1511 TRACE(
"SAS: CONTROL+SHIFT+ESCAPE\n");
1517 TRACE(
"SAS: WIN+L\n");
1523 TRACE(
"SAS: WIN+U\n");
1582 case LN_ACCESSIBILITY:
1584 ERR(
"LN_ACCESSIBILITY(lParam = %lu)\n",
lParam);
1607 ERR(
"Missing EWX_SHUTDOWN flag for poweroff or reboot; action 0x%x\n",
Action);
1639 ERR(
"Unhandled EWX_* action flags: 0x%x\n",
Action);
1641 TRACE(
"In LN_LOGOFF, exit_in_progress == %s\n",
1667 ERR(
"Logoff canceled! Before: exit_in_progress == %s; After: FALSE\n",
1675 ERR(
"WM_LOGONNOTIFY case %d is unimplemented\n",
wParam);
1708 ERR(
"WL: Failed to switch to winlogon desktop\n");
1727 ERR(
"WL: Failed to register SAS window class\n");
1739 if (!Session->SASWindow)
1741 ERR(
"WL: Failed to create SAS window\n");
1748 ERR(
"WL: Failed to register SAS window\n");
DWORD WINAPI UpdatePerUserSystemParameters(DWORD dw1, DWORD dw2)
@ TRUSTEE_IS_WELL_KNOWN_GROUP
void quit(int argc, const char *argv[])
BOOL CreateUserEnvironment(IN PWLSESSION Session)
VOID CallNotificationDlls(PWLSESSION pSession, NOTIFICATION_TYPE Type)
#define IDS_APPLYINGYOURPERSONALSETTINGS
#define IDC_BTNSHTDOWNCOMPUTER
#define IDS_REACTOSISSHUTTINGDOWN
#define IDD_SHUTDOWNCOMPUTER
#define IDS_REACTOSISRESTARTING
#define IDS_SAVEYOURSETTINGS
#define IDS_LOADINGYOURPERSONALSETTINGS
BOOL InitializeScreenSaver(IN OUT PWLSESSION Session)
VOID StartScreenSaver(IN PWLSESSION Session)
BOOL AllowAccessOnSession(_In_ PWLSESSION Session)
Assigns both window station and desktop access to the specific session currently active on the system...
#define RegCloseKey(hKey)
BOOL WINAPI Beep(IN DWORD dwFreq, IN DWORD dwDuration)
#define NT_SUCCESS(StatCode)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegOpenCurrentUser(IN REGSAM samDesired, OUT PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken)
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
#define GetProcAddress(x, y)
struct _SECURITY_ATTRIBUTES * PSECURITY_ATTRIBUTES
#define HeapFree(x, y, z)
static void cleanup(void)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
BOOL WINAPI RevertToSelf(void)
static SID_IDENTIFIER_AUTHORITY WorldAuthority
BOOL WINAPI DestroyEnvironmentBlock(IN LPVOID lpEnvironment)
BOOL WINAPI CreateEnvironmentBlock(OUT LPVOID *lpEnvironment, IN HANDLE hToken, IN BOOL bInherit)
BOOL WINAPI LoadUserProfileW(_In_ HANDLE hToken, _Inout_ LPPROFILEINFOW lpProfileInfo)
BOOL WINAPI UnloadUserProfile(_In_ HANDLE hToken, _In_ HANDLE hProfile)
static const WCHAR Cleanup[]
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define THREAD_SET_THREAD_TOKEN
#define EXCEPTION_EXECUTE_HANDLER
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE
#define SE_SHUTDOWN_PRIVILEGE
static SCRIPT_CACHE SCRIPT_ANALYSIS * psa
struct _SECURITY_DESCRIPTOR * PSECURITY_DESCRIPTOR
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
#define UNREFERENCED_PARAMETER(P)
NTSTATUS NTAPI NtSetDefaultLocale(IN BOOLEAN UserProfile, IN LCID DefaultLocaleId)
NTSTATUS NTAPI NtShutdownSystem(IN SHUTDOWN_ACTION Action)
#define MAKEINTRESOURCE(i)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
static NTSTATUS CreateLogoffSecurityAttributes(OUT PSECURITY_ATTRIBUTES *ppsa)
#define WINLOGON_SAS_TITLE
static BOOL StartUserShell(IN OUT PWLSESSION Session)
static BOOL RegisterHotKeys(IN PWLSESSION Session, IN HWND hwndSAS)
struct tagLOGOFF_SHUTDOWN_DATA LOGOFF_SHUTDOWN_DATA
static DWORD WINAPI PlayLogonSoundThread(_In_ LPVOID lpParameter)
static DWORD WINAPI KillComProcesses(LPVOID Parameter)
static VOID FreeWlxMprInfo(_Inout_ PWLX_MPR_NOTIFY_INFO MprNotifyInfo)
Frees the MPR information structure allocated by the GINA.
#define WINLOGON_SAS_CLASS
#define IDHK_CTRL_ALT_DEL
struct tagLOGON_SOUND_DATA LOGON_SOUND_DATA
static LRESULT CALLBACK SASWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
static VOID FreeWlxProfileInfo(_Inout_ PVOID Profile)
Frees the Profile information structure (WLX_PROFILE_V1_0 or WLX_PROFILE_V2_0) allocated by the GINA.
static INT_PTR CALLBACK ShutdownComputerWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
BOOL SetDefaultLanguage(IN PWLSESSION Session)
static VOID DispatchSAS(IN OUT PWLSESSION Session, IN DWORD dwSasType)
NTSTATUS HandleShutdown(IN OUT PWLSESSION Session, IN DWORD wlxAction)
static NTSTATUS RunLogoffShutdownThread(_In_ PWLSESSION Session, _In_opt_ PSECURITY_ATTRIBUTES psa, _In_ DWORD wlxAction)
static VOID UninitializeSAS(IN OUT PWLSESSION Session)
static VOID PlayLogoffShutdownSound(_In_ PWLSESSION Session, _In_ BOOL bShutdown)
static VOID DoGenericAction(IN OUT PWLSESSION Session, IN DWORD wlxAction)
static VOID PlayLogonSound(_In_ PWLSESSION Session)
static BOOL StartTaskManager(IN OUT PWLSESSION Session)
static BOOL HandleMessageBeep(_In_ PWLSESSION Session, _In_ UINT uType)
static BOOL PlayEventSound(_In_ PWLSESSION Session, _In_ LPCWSTR EventName)
static BOOL HandleLogon(IN OUT PWLSESSION Session)
struct tagLOGOFF_SHUTDOWN_DATA * PLOGOFF_SHUTDOWN_DATA
struct tagLOGON_SOUND_DATA * PLOGON_SOUND_DATA
static VOID DestroyLogoffSecurityAttributes(IN PSECURITY_ATTRIBUTES psa)
BOOL InitializeSAS(IN OUT PWLSESSION Session)
static VOID RestoreAllConnections(PWLSESSION Session)
static DWORD WINAPI LogoffShutdownThread(LPVOID Parameter)
BOOL PlaySoundRoutine(IN LPCWSTR FileName, IN UINT bLogon, IN UINT Flags)
#define IDHK_CTRL_SHIFT_ESC
static BOOL UnregisterHotKeys(IN PWLSESSION Session, IN HWND hwndSAS)
static BOOL ExitReactOSInProgress
static NTSTATUS HandleLogoff(_Inout_ PWLSESSION Session, _In_ DWORD wlxAction)
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
DWORD grfAccessPermissions
ACCESS_MODE grfAccessMode
HANDLE hScreenSaverParametersChanged
PWSTR pszNetworkDefaultUserProfile
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define LN_LOCK_WORKSTATION
BOOL WINAPI SetLogonNotifyWindow(HWND Wnd)
#define EWX_CALLER_WINLOGON
#define LN_START_SCREENSAVE
#define LN_LOGOFF_CANCELED
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
DWORD WINAPI GetLastError(void)
BOOL DisplayStatusMessage(IN PWLSESSION Session, IN HDESK hDesktop, IN UINT ResourceId)
BOOL RemoveStatusMessage(IN PWLSESSION Session)
FORCEINLINE BOOL IsFirstLogon(_In_ PWLSESSION Session)
BOOL WINAPI SetWindowStationUser(IN HWINSTA hWindowStation, IN PLUID pluid, IN PSID psid OPTIONAL, IN DWORD size)
struct _WLSESSION * PWLSESSION
FORCEINLINE VOID SetLogonTimestamp(_Inout_ PWLSESSION Session)
#define WLX_LOGGINGOFF(wlxAction)
VOID CloseAllDialogWindows(VOID)
#define WLX_SHUTTINGDOWN(wlxAction)
UINT WINAPI waveOutGetNumDevs(void)
#define RESOURCETYPE_DISK
#define RESOURCE_REMEMBERED
#define WNetAddConnection
#define WN_NO_MORE_ENTRIES
#define HKEY_LOCAL_MACHINE
#define SC_MANAGER_CONNECT
BOOL WINAPI SwitchDesktop(_In_ HDESK)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI UnregisterHotKey(_In_opt_ HWND, _In_ int)
#define SPI_SETSCREENSAVEACTIVE
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI RegisterHotKey(_In_opt_ HWND, _In_ int, _In_ UINT, _In_ UINT)
HWND WINAPI SetFocus(_In_opt_ HWND)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define MB_ICONEXCLAMATION
BOOL WINAPI ExitWindowsEx(_In_ UINT, _In_ DWORD)
struct _WNDCLASSEXW WNDCLASSEXW
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
BOOL WINAPI DestroyWindow(_In_ HWND)
#define SPI_SETSCREENSAVETIMEOUT
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
struct _WLX_PROFILE_V2_0 * PWLX_PROFILE_V2_0
#define WLX_SAS_TYPE_TIMEOUT
#define WLX_SAS_ACTION_NONE
#define WLX_PROFILE_TYPE_V1_0
#define WLX_SAS_ACTION_FORCE_LOGOFF
#define WLX_SAS_ACTION_UNLOCK_WKSTA
#define WLX_SAS_TYPE_CTRL_ALT_DEL
#define WLX_PROFILE_TYPE_V2_0
#define WLX_SAS_ACTION_LOGON
#define WLX_SAS_ACTION_TASKLIST
#define WLX_SAS_ACTION_SHUTDOWN_POWER_OFF
#define WLX_SAS_TYPE_SCRNSVR_TIMEOUT
#define WLX_SAS_ACTION_SHUTDOWN
#define WLX_SAS_TYPE_SCRNSVR_ACTIVITY
#define WLX_LOGON_OPT_NO_PROFILE
#define WLX_SAS_ACTION_SHUTDOWN_REBOOT
#define WLX_SAS_ACTION_LOCK_WKSTA
#define WLX_SAS_ACTION_LOGOFF
DWORD WINAPI WNetClearConnections(HWND owner)
DWORD WINAPI WNetCloseEnum(HANDLE hEnum)
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
_Must_inspect_result_ _In_ ULONG Flags
_In_ CONST DEVPROPKEY _In_ LCID Lcid
_Inout_opt_ PVOID Parameter
#define SECURITY_WORLD_SID_AUTHORITY
#define SECURITY_WORLD_RID
#define SECURITY_DESCRIPTOR_REVISION
#define SECURITY_DESCRIPTOR_MIN_LENGTH