2013-12-25 15:55:48 +00:00
|
|
|
#ifndef _MSGINA_H
|
|
|
|
#define _MSGINA_H
|
|
|
|
|
2016-09-04 14:17:22 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-02-07 17:38:56 +00:00
|
|
|
#include <stdarg.h>
|
2016-09-18 19:37:25 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <tchar.h>
|
2014-02-07 17:38:56 +00:00
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#define WIN32_NO_STATUS
|
2014-02-07 17:38:56 +00:00
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
2013-01-24 23:00:42 +00:00
|
|
|
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
2016-09-18 19:37:25 +00:00
|
|
|
#include <winreg.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <winuser.h>
|
2006-08-02 21:01:37 +00:00
|
|
|
#include <winwlx.h>
|
2014-01-23 22:05:03 +00:00
|
|
|
#include <ndk/rtlfuncs.h>
|
2014-01-28 19:32:53 +00:00
|
|
|
#include <ntsecapi.h>
|
2013-12-25 15:55:48 +00:00
|
|
|
|
2016-09-18 19:37:25 +00:00
|
|
|
#include <strsafe.h>
|
|
|
|
|
2011-08-11 15:16:48 +00:00
|
|
|
#include <wine/debug.h>
|
2013-12-25 15:55:48 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(msgina);
|
2011-08-11 15:16:48 +00:00
|
|
|
|
2006-08-02 21:01:37 +00:00
|
|
|
#include "resource.h"
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2006-08-04 19:44:35 +00:00
|
|
|
/* Values for GINA_CONTEXT.AutoLogonState */
|
|
|
|
#define AUTOLOGON_CHECK_REGISTRY 1
|
|
|
|
#define AUTOLOGON_ONCE 2
|
|
|
|
#define AUTOLOGON_DISABLED 3
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2013-05-06 21:43:03 +00:00
|
|
|
HANDLE hWlx;
|
|
|
|
LPWSTR station;
|
|
|
|
PWLX_DISPATCH_VERSION_1_3 pWlxFuncs;
|
|
|
|
HANDLE hDllInstance;
|
|
|
|
HWND hStatusWindow;
|
2014-02-02 12:12:59 +00:00
|
|
|
HANDLE LsaHandle;
|
|
|
|
ULONG AuthenticationPackage;
|
2013-05-06 21:43:03 +00:00
|
|
|
DWORD AutoLogonState;
|
2014-01-12 10:57:02 +00:00
|
|
|
BOOL bDisableCAD;
|
|
|
|
BOOL bAutoAdminLogon;
|
2014-01-19 01:33:19 +00:00
|
|
|
BOOL bDontDisplayLastUserName;
|
|
|
|
BOOL bShutdownWithoutLogon;
|
2006-08-02 21:01:37 +00:00
|
|
|
|
2016-09-18 19:37:25 +00:00
|
|
|
ULONG nShutdownAction;
|
2014-02-20 22:00:30 +00:00
|
|
|
|
2014-01-12 10:57:02 +00:00
|
|
|
/* Information to be filled during logon */
|
2013-05-06 21:43:03 +00:00
|
|
|
WCHAR UserName[256];
|
|
|
|
WCHAR Domain[256];
|
2014-02-10 20:08:29 +00:00
|
|
|
WCHAR Password[256];
|
2013-05-06 21:43:03 +00:00
|
|
|
SYSTEMTIME LogonTime;
|
|
|
|
HANDLE UserToken;
|
|
|
|
PLUID pAuthenticationId;
|
|
|
|
PDWORD pdwOptions;
|
|
|
|
PWLX_MPR_NOTIFY_INFO pMprNotifyInfo;
|
|
|
|
PVOID *pProfile;
|
2006-08-03 13:54:44 +00:00
|
|
|
|
2013-05-06 21:43:03 +00:00
|
|
|
/* Current logo to display */
|
|
|
|
HBITMAP hBitmap;
|
2006-02-17 00:04:10 +00:00
|
|
|
} GINA_CONTEXT, *PGINA_CONTEXT;
|
|
|
|
|
2009-10-18 18:52:56 +00:00
|
|
|
extern HINSTANCE hDllInstance;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2006-08-02 21:01:37 +00:00
|
|
|
typedef BOOL (*PFGINA_INITIALIZE)(PGINA_CONTEXT);
|
|
|
|
typedef BOOL (*PFGINA_DISPLAYSTATUSMESSAGE)(PGINA_CONTEXT, HDESK, DWORD, PWSTR, PWSTR);
|
2006-08-04 19:44:35 +00:00
|
|
|
typedef BOOL (*PFGINA_REMOVESTATUSMESSAGE)(PGINA_CONTEXT);
|
2006-08-02 21:01:37 +00:00
|
|
|
typedef VOID (*PFGINA_DISPLAYSASNOTICE)(PGINA_CONTEXT);
|
|
|
|
typedef INT (*PFGINA_LOGGEDONSAS)(PGINA_CONTEXT, DWORD);
|
|
|
|
typedef INT (*PFGINA_LOGGEDOUTSAS)(PGINA_CONTEXT);
|
2006-08-10 18:41:23 +00:00
|
|
|
typedef INT (*PFGINA_LOCKEDSAS)(PGINA_CONTEXT);
|
2013-02-13 23:24:15 +00:00
|
|
|
typedef VOID (*PFGINA_DISPLAYLOCKEDNOTICE)(PGINA_CONTEXT);
|
|
|
|
|
2006-08-02 21:01:37 +00:00
|
|
|
typedef struct _GINA_UI
|
|
|
|
{
|
2013-05-06 21:43:03 +00:00
|
|
|
PFGINA_INITIALIZE Initialize;
|
|
|
|
PFGINA_DISPLAYSTATUSMESSAGE DisplayStatusMessage;
|
|
|
|
PFGINA_REMOVESTATUSMESSAGE RemoveStatusMessage;
|
|
|
|
PFGINA_DISPLAYSASNOTICE DisplaySASNotice;
|
|
|
|
PFGINA_LOGGEDONSAS LoggedOnSAS;
|
|
|
|
PFGINA_LOGGEDOUTSAS LoggedOutSAS;
|
|
|
|
PFGINA_LOCKEDSAS LockedSAS;
|
|
|
|
PFGINA_DISPLAYLOCKEDNOTICE DisplayLockedNotice;
|
2006-08-02 21:01:37 +00:00
|
|
|
} GINA_UI, *PGINA_UI;
|
|
|
|
|
2014-02-02 12:12:59 +00:00
|
|
|
/* lsa.c */
|
|
|
|
|
2014-03-01 20:45:10 +00:00
|
|
|
NTSTATUS
|
2014-02-02 12:12:59 +00:00
|
|
|
ConnectToLsa(
|
|
|
|
PGINA_CONTEXT pgContext);
|
|
|
|
|
2014-03-01 20:45:10 +00:00
|
|
|
NTSTATUS
|
2014-02-02 21:52:27 +00:00
|
|
|
MyLogonUser(
|
|
|
|
HANDLE LsaHandle,
|
|
|
|
ULONG AuthenticationPackage,
|
|
|
|
LPWSTR lpszUsername,
|
|
|
|
LPWSTR lpszDomain,
|
|
|
|
LPWSTR lpszPassword,
|
2014-03-01 20:45:10 +00:00
|
|
|
PHANDLE phToken,
|
|
|
|
PNTSTATUS SubStatus);
|
2014-02-02 21:52:27 +00:00
|
|
|
|
2006-08-02 21:01:37 +00:00
|
|
|
/* msgina.c */
|
|
|
|
|
2014-07-27 21:05:42 +00:00
|
|
|
LONG
|
|
|
|
ReadRegSzValue(
|
|
|
|
IN HKEY hKey,
|
|
|
|
IN LPCWSTR pszValue,
|
|
|
|
OUT LPWSTR *pValue);
|
|
|
|
|
2014-01-23 22:05:03 +00:00
|
|
|
BOOL
|
|
|
|
DoAdminUnlock(
|
2014-02-02 21:52:27 +00:00
|
|
|
IN PGINA_CONTEXT pgContext,
|
2014-01-23 22:05:03 +00:00
|
|
|
IN PWSTR UserName,
|
|
|
|
IN PWSTR Domain,
|
|
|
|
IN PWSTR Password);
|
|
|
|
|
2014-03-08 22:13:19 +00:00
|
|
|
NTSTATUS
|
2006-08-02 21:01:37 +00:00
|
|
|
DoLoginTasks(
|
2014-03-08 22:13:19 +00:00
|
|
|
IN OUT PGINA_CONTEXT pgContext,
|
|
|
|
IN PWSTR UserName,
|
|
|
|
IN PWSTR Domain,
|
|
|
|
IN PWSTR Password,
|
|
|
|
OUT PNTSTATUS SubStatus);
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
CreateProfile(
|
2013-05-06 21:43:03 +00:00
|
|
|
IN OUT PGINA_CONTEXT pgContext,
|
|
|
|
IN PWSTR UserName,
|
|
|
|
IN PWSTR Domain,
|
|
|
|
IN PWSTR Password);
|
2006-08-02 21:01:37 +00:00
|
|
|
|
2016-09-18 19:37:25 +00:00
|
|
|
/* shutdown.c */
|
|
|
|
|
|
|
|
DWORD
|
|
|
|
LoadShutdownSelState(VOID);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
SaveShutdownSelState(DWORD ShutdownCode);
|
|
|
|
|
|
|
|
DWORD
|
|
|
|
GetAllowedShutdownOptions(VOID);
|
|
|
|
|
|
|
|
INT_PTR
|
|
|
|
ShutdownDialog(
|
|
|
|
IN HWND hwndDlg,
|
|
|
|
IN DWORD ShutdownOptions,
|
|
|
|
IN PGINA_CONTEXT pgContext);
|
|
|
|
|
|
|
|
|
2016-09-04 14:17:22 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
2013-12-25 15:55:48 +00:00
|
|
|
#endif /* _MSGINA_H */
|