5507b10422b84611903237e4af5647d1c196e85b
[reactos.git] / reactos / dll / win32 / msgina / msgina.h
1 #ifndef _MSGINA_H
2 #define _MSGINA_H
3
4 #include <stdarg.h>
5
6 #define WIN32_NO_STATUS
7 #define _INC_WINDOWS
8 #define COM_NO_WINDOWS_H
9
10 #include <windef.h>
11 #include <winbase.h>
12 #include <winuser.h>
13 #include <winwlx.h>
14 #include <ndk/rtlfuncs.h>
15 #include <ntsecapi.h>
16
17 #include <wine/debug.h>
18 WINE_DEFAULT_DEBUG_CHANNEL(msgina);
19
20 #include "resource.h"
21
22 /* Values for GINA_CONTEXT.AutoLogonState */
23 #define AUTOLOGON_CHECK_REGISTRY 1
24 #define AUTOLOGON_ONCE 2
25 #define AUTOLOGON_DISABLED 3
26
27 typedef struct
28 {
29 HANDLE hWlx;
30 LPWSTR station;
31 PWLX_DISPATCH_VERSION_1_3 pWlxFuncs;
32 HANDLE hDllInstance;
33 HWND hStatusWindow;
34 HANDLE LsaHandle;
35 ULONG AuthenticationPackage;
36 DWORD AutoLogonState;
37 BOOL bDisableCAD;
38 BOOL bAutoAdminLogon;
39 BOOL bDontDisplayLastUserName;
40 BOOL bShutdownWithoutLogon;
41
42 INT nShutdownAction;
43
44 /* Information to be filled during logon */
45 WCHAR UserName[256];
46 WCHAR Domain[256];
47 WCHAR Password[256];
48 SYSTEMTIME LogonTime;
49 HANDLE UserToken;
50 PLUID pAuthenticationId;
51 PDWORD pdwOptions;
52 PWLX_MPR_NOTIFY_INFO pMprNotifyInfo;
53 PVOID *pProfile;
54
55 /* Current logo to display */
56 HBITMAP hBitmap;
57 } GINA_CONTEXT, *PGINA_CONTEXT;
58
59 extern HINSTANCE hDllInstance;
60
61 typedef BOOL (*PFGINA_INITIALIZE)(PGINA_CONTEXT);
62 typedef BOOL (*PFGINA_DISPLAYSTATUSMESSAGE)(PGINA_CONTEXT, HDESK, DWORD, PWSTR, PWSTR);
63 typedef BOOL (*PFGINA_REMOVESTATUSMESSAGE)(PGINA_CONTEXT);
64 typedef VOID (*PFGINA_DISPLAYSASNOTICE)(PGINA_CONTEXT);
65 typedef INT (*PFGINA_LOGGEDONSAS)(PGINA_CONTEXT, DWORD);
66 typedef INT (*PFGINA_LOGGEDOUTSAS)(PGINA_CONTEXT);
67 typedef INT (*PFGINA_LOCKEDSAS)(PGINA_CONTEXT);
68 typedef VOID (*PFGINA_DISPLAYLOCKEDNOTICE)(PGINA_CONTEXT);
69
70 typedef struct _GINA_UI
71 {
72 PFGINA_INITIALIZE Initialize;
73 PFGINA_DISPLAYSTATUSMESSAGE DisplayStatusMessage;
74 PFGINA_REMOVESTATUSMESSAGE RemoveStatusMessage;
75 PFGINA_DISPLAYSASNOTICE DisplaySASNotice;
76 PFGINA_LOGGEDONSAS LoggedOnSAS;
77 PFGINA_LOGGEDOUTSAS LoggedOutSAS;
78 PFGINA_LOCKEDSAS LockedSAS;
79 PFGINA_DISPLAYLOCKEDNOTICE DisplayLockedNotice;
80 } GINA_UI, *PGINA_UI;
81
82 /* lsa.c */
83
84 BOOL
85 ConnectToLsa(
86 PGINA_CONTEXT pgContext);
87
88 BOOL
89 MyLogonUser(
90 HANDLE LsaHandle,
91 ULONG AuthenticationPackage,
92 LPWSTR lpszUsername,
93 LPWSTR lpszDomain,
94 LPWSTR lpszPassword,
95 PHANDLE phToken);
96
97 /* msgina.c */
98
99 BOOL
100 DoAdminUnlock(
101 IN PGINA_CONTEXT pgContext,
102 IN PWSTR UserName,
103 IN PWSTR Domain,
104 IN PWSTR Password);
105
106 BOOL
107 DoLoginTasks(
108 IN OUT PGINA_CONTEXT pgContext,
109 IN PWSTR UserName,
110 IN PWSTR Domain,
111 IN PWSTR Password);
112
113 #endif /* _MSGINA_H */