[MSGINA]
[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 /* Information to be filled during logon */
43 WCHAR UserName[256];
44 WCHAR Domain[256];
45 LPWSTR Password;
46 SYSTEMTIME LogonTime;
47 HANDLE UserToken;
48 PLUID pAuthenticationId;
49 PDWORD pdwOptions;
50 PWLX_MPR_NOTIFY_INFO pMprNotifyInfo;
51 PVOID *pProfile;
52
53 /* Current logo to display */
54 HBITMAP hBitmap;
55 } GINA_CONTEXT, *PGINA_CONTEXT;
56
57 extern HINSTANCE hDllInstance;
58
59 typedef BOOL (*PFGINA_INITIALIZE)(PGINA_CONTEXT);
60 typedef BOOL (*PFGINA_DISPLAYSTATUSMESSAGE)(PGINA_CONTEXT, HDESK, DWORD, PWSTR, PWSTR);
61 typedef BOOL (*PFGINA_REMOVESTATUSMESSAGE)(PGINA_CONTEXT);
62 typedef VOID (*PFGINA_DISPLAYSASNOTICE)(PGINA_CONTEXT);
63 typedef INT (*PFGINA_LOGGEDONSAS)(PGINA_CONTEXT, DWORD);
64 typedef INT (*PFGINA_LOGGEDOUTSAS)(PGINA_CONTEXT);
65 typedef INT (*PFGINA_LOCKEDSAS)(PGINA_CONTEXT);
66 typedef VOID (*PFGINA_DISPLAYLOCKEDNOTICE)(PGINA_CONTEXT);
67
68 typedef struct _GINA_UI
69 {
70 PFGINA_INITIALIZE Initialize;
71 PFGINA_DISPLAYSTATUSMESSAGE DisplayStatusMessage;
72 PFGINA_REMOVESTATUSMESSAGE RemoveStatusMessage;
73 PFGINA_DISPLAYSASNOTICE DisplaySASNotice;
74 PFGINA_LOGGEDONSAS LoggedOnSAS;
75 PFGINA_LOGGEDOUTSAS LoggedOutSAS;
76 PFGINA_LOCKEDSAS LockedSAS;
77 PFGINA_DISPLAYLOCKEDNOTICE DisplayLockedNotice;
78 } GINA_UI, *PGINA_UI;
79
80 /* lsa.c */
81
82 BOOL
83 ConnectToLsa(
84 PGINA_CONTEXT pgContext);
85
86 BOOL
87 MyLogonUser(
88 HANDLE LsaHandle,
89 ULONG AuthenticationPackage,
90 LPWSTR lpszUsername,
91 LPWSTR lpszDomain,
92 LPWSTR lpszPassword,
93 PHANDLE phToken);
94
95 /* msgina.c */
96
97 BOOL
98 DoAdminUnlock(
99 IN PGINA_CONTEXT pgContext,
100 IN PWSTR UserName,
101 IN PWSTR Domain,
102 IN PWSTR Password);
103
104 BOOL
105 DoLoginTasks(
106 IN OUT PGINA_CONTEXT pgContext,
107 IN PWSTR UserName,
108 IN PWSTR Domain,
109 IN PWSTR Password);
110
111 #endif /* _MSGINA_H */