ReactOS 0.4.16-dev-1946-g52006dd
msgina.h
Go to the documentation of this file.
1#ifndef _MSGINA_H
2#define _MSGINA_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdarg.h>
9#include <stdlib.h>
10#include <tchar.h>
11
12#define WIN32_NO_STATUS
13#define _INC_WINDOWS
14#define COM_NO_WINDOWS_H
15
16#include <windef.h>
17#include <winbase.h>
18#include <winreg.h>
19#include <winuser.h>
20#include <winwlx.h>
21#include <ndk/rtlfuncs.h>
22#include <ndk/setypes.h> // For SE_*_PRIVILEGE
23#include <ntsecapi.h>
24
25#include <strsafe.h>
26
27#include <wine/debug.h>
29
30#include "resource.h"
31
32
33typedef struct
34{
47
49
50 /* Information to be filled during logon */
51 WCHAR UserName[256];
52 WCHAR DomainName[256];
61
63
72
73typedef struct _GINA_UI
74{
84
85/* lsa.c */
86
89 PGINA_CONTEXT pgContext);
90
95 LPWSTR lpszUsername,
100
101/* msgina.c */
102
103BOOL
105 IN PGINA_CONTEXT pgContext,
106 IN PWSTR UserName,
107 IN PWSTR Domain,
109
112 IN OUT PGINA_CONTEXT pgContext,
113 IN PWSTR UserName,
114 IN PWSTR Domain,
117
118BOOL
120 IN OUT PGINA_CONTEXT pgContext,
121 IN PWSTR UserName,
122 IN PWSTR Domain,
124
125/* shutdown.c */
126
133#define WLX_SHUTDOWN_STATE_LOGOFF 0x01
134#define WLX_SHUTDOWN_STATE_POWER_OFF 0x02
135#define WLX_SHUTDOWN_STATE_REBOOT 0x04
136// 0x08 ///< "Restart in MS-DOS mode" - Yes, WinNT/2k/XP/2k3 msgina.dll/shell32.dll has it!
137#define WLX_SHUTDOWN_STATE_SLEEP 0x10
138#define WLX_SHUTDOWN_STATE_SLEEP2 0x20
139#define WLX_SHUTDOWN_STATE_HIBERNATE 0x40
140#define WLX_SHUTDOWN_STATE_DISCONNECT 0x80
141#define WLX_SHUTDOWN_AUTOUPDATE 0x100
142
143DWORD
145 _In_ HKEY hKeyCurrentUser);
146
147VOID
149 _In_ HKEY hKeyCurrentUser,
150 _In_ DWORD ShutdownCode);
151
152DWORD
154 _In_opt_ HKEY hKeyCurrentUser,
156
159 IN HWND hwndDlg,
160 IN DWORD ShutdownOptions,
161 IN PGINA_CONTEXT pgContext);
162
163/* utils.c */
164
165LONG
168 _In_ REGSAM samDesired,
169 _Out_ PHKEY phkResult);
170
171LONG
173 _In_ HKEY hKey,
176
177LONG
179 _In_ HKEY hKey,
182
183BOOL
185 _In_opt_ HANDLE hToken,
187
188PWSTR
191
192
193#ifdef __cplusplus
194} // extern "C"
195#endif
196
197#endif /* _MSGINA_H */
#define VOID
Definition: acefi.h:82
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
HANDLE hUserToken
Definition: install.c:39
HANDLE LsaHandle
Definition: wkssvc.c:41
ULONG AuthenticationPackage
Definition: logon.c:18
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
PWCHAR pValue
* PNTSTATUS
Definition: strlen.c:14
DWORD GetAllowedShutdownOptions(_In_opt_ HKEY hKeyCurrentUser, _In_opt_ HANDLE hUserToken)
Definition: shutdown.c:808
INT(* PFGINA_LOGGEDONSAS)(PGINA_CONTEXT, DWORD)
Definition: msgina.h:68
BOOL TestTokenPrivilege(_In_opt_ HANDLE hToken, _In_ ULONG Privilege)
Verifies whether the specified token has the given privilege.
Definition: utils.c:140
struct _GINA_UI GINA_UI
INT(* PFGINA_LOGGEDOUTSAS)(PGINA_CONTEXT)
Definition: msgina.h:69
DWORD LoadShutdownSelState(_In_ HKEY hKeyCurrentUser)
Definition: shutdown.c:696
VOID(* PFGINA_DISPLAYSASNOTICE)(PGINA_CONTEXT)
Definition: msgina.h:67
INT(* PFGINA_LOCKEDSAS)(PGINA_CONTEXT)
Definition: msgina.h:70
NTSTATUS MyLogonUser(HANDLE LsaHandle, ULONG AuthenticationPackage, LPWSTR lpszUsername, LPWSTR lpszDomain, LPWSTR lpszPassword, PHANDLE phToken, PNTSTATUS SubStatus)
Definition: lsa.c:55
BOOL CreateProfile(IN OUT PGINA_CONTEXT pgContext, IN PWSTR UserName, IN PWSTR Domain, IN PWSTR Password)
Definition: msgina.c:759
BOOL(* PFGINA_INITIALIZE)(PGINA_CONTEXT)
Definition: msgina.h:64
VOID SaveShutdownSelState(_In_ HKEY hKeyCurrentUser, _In_ DWORD ShutdownCode)
Definition: shutdown.c:759
NTSTATUS ConnectToLsa(PGINA_CONTEXT pgContext)
Definition: lsa.c:11
INT_PTR ShutdownDialog(IN HWND hwndDlg, IN DWORD ShutdownOptions, IN PGINA_CONTEXT pgContext)
Definition: shutdown.c:1252
struct _GINA_UI * PGINA_UI
BOOL(* PFGINA_REMOVESTATUSMESSAGE)(PGINA_CONTEXT)
Definition: msgina.h:66
BOOL(* PFGINA_DISPLAYSTATUSMESSAGE)(PGINA_CONTEXT, HDESK, DWORD, PWSTR, PWSTR)
Definition: msgina.h:65
LONG ReadRegDwordValue(_In_ HKEY hKey, _In_ PCWSTR pszValue, _Out_ PDWORD pValue)
Definition: utils.c:90
BOOL DoAdminUnlock(IN PGINA_CONTEXT pgContext, IN PWSTR UserName, IN PWSTR Domain, IN PWSTR Password)
Definition: msgina.c:639
struct GINA_CONTEXT * PGINA_CONTEXT
NTSTATUS DoLoginTasks(IN OUT PGINA_CONTEXT pgContext, IN PWSTR UserName, IN PWSTR Domain, IN PWSTR Password, OUT PNTSTATUS SubStatus)
Definition: msgina.c:726
VOID(* PFGINA_DISPLAYLOCKEDNOTICE)(PGINA_CONTEXT)
Definition: msgina.h:71
LONG RegOpenLoggedOnHKCU(_In_opt_ HANDLE hUserToken, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Opens and retrieves a handle to the HKEY_CURRENT_USER corresponding to the specified logged-on user.
Definition: utils.c:31
LONG ReadRegSzValue(_In_ HKEY hKey, _In_ PCWSTR pszValue, _Out_ PWSTR *pValue)
Definition: utils.c:57
HINSTANCE hDllInstance
Definition: browser.c:17
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID _Out_ PHANDLE _Out_ PQUOTA_LIMITS _Out_ PNTSTATUS SubStatus
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
DWORD * PDWORD
Definition: pedump.c:68
long LONG
Definition: pedump.c:60
#define INT
Definition: polytest.cpp:20
_In_opt_ LPCSTR _In_opt_ LPCSTR pszValue
Definition: shlwapi.h:783
#define DuplicateString(x)
Definition: stringutils.h:45
BOOL bAutoAdminLogon
Definition: msgina.h:43
HANDLE LsaHandle
Definition: msgina.h:40
LPWSTR station
Definition: msgina.h:36
PLUID pAuthenticationId
Definition: msgina.h:56
BOOL bIgnoreShiftOverride
Definition: msgina.h:46
SYSTEMTIME LogonTime
Definition: msgina.h:54
BOOL bDontDisplayLastUserName
Definition: msgina.h:44
BOOL bShutdownWithoutLogon
Definition: msgina.h:45
HANDLE UserToken
Definition: msgina.h:55
BOOL bDisableCAD
Definition: msgina.h:42
HWND hStatusWindow
Definition: msgina.h:39
ULONG AuthenticationPackage
Definition: msgina.h:41
ULONG nShutdownAction
Definition: msgina.h:48
PVOID * pProfile
Definition: msgina.h:59
HANDLE hWlx
Definition: msgina.h:35
PWLX_MPR_NOTIFY_INFO pMprNotifyInfo
Definition: msgina.h:58
HANDLE hDllInstance
Definition: msgina.h:38
PWLX_DISPATCH_VERSION_1_3 pWlxFuncs
Definition: msgina.h:37
PDWORD pdwOptions
Definition: msgina.h:57
PFGINA_LOGGEDOUTSAS LoggedOutSAS
Definition: msgina.h:80
PFGINA_LOCKEDSAS LockedSAS
Definition: msgina.h:81
PFGINA_DISPLAYLOCKEDNOTICE DisplayLockedNotice
Definition: msgina.h:82
PFGINA_DISPLAYSASNOTICE DisplaySASNotice
Definition: msgina.h:78
PFGINA_LOGGEDONSAS LoggedOnSAS
Definition: msgina.h:79
PFGINA_REMOVESTATUSMESSAGE RemoveStatusMessage
Definition: msgina.h:77
PFGINA_DISPLAYSTATUSMESSAGE DisplayStatusMessage
Definition: msgina.h:76
PFGINA_INITIALIZE Initialize
Definition: msgina.h:75
@ Password
Definition: telnetd.h:67
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
Definition: user_lib.cpp:531
_In_opt_ LPSTR _In_opt_ LPSTR _In_ DWORD _In_ DWORD _Out_opt_ PHANDLE phToken
Definition: winbase.h:2469
_In_opt_ LPSTR _In_opt_ LPSTR lpszPassword
Definition: winbase.h:2466
_In_opt_ LPSTR lpszDomain
Definition: winbase.h:2465
ACCESS_MASK REGSAM
Definition: winreg.h:76
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184