2014-02-07 18:02:02 +00:00
|
|
|
#ifndef _ACLUI_PCH_
|
|
|
|
#define _ACLUI_PCH_
|
|
|
|
|
2007-01-26 19:44:42 +00:00
|
|
|
#define _ACLUI_
|
2013-01-24 23:00:42 +00:00
|
|
|
|
2014-01-20 13:14:06 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2011-08-14 12:59:05 +00:00
|
|
|
#define WIN32_NO_STATUS
|
2013-01-24 23:00:42 +00:00
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
2014-01-20 13:14:06 +00:00
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <wingdi.h>
|
|
|
|
#include <ole2.h>
|
2005-07-26 13:42:15 +00:00
|
|
|
#include <objsel.h>
|
2005-07-01 12:09:04 +00:00
|
|
|
#include <aclui.h>
|
2014-01-20 13:14:06 +00:00
|
|
|
#define NTOS_MODE_USER
|
|
|
|
#include <ndk/rtlfuncs.h>
|
2005-07-01 12:09:04 +00:00
|
|
|
|
|
|
|
#define EnableRedrawWindow(hwnd) \
|
|
|
|
SendMessage((hwnd), WM_SETREDRAW, TRUE, 0)
|
|
|
|
|
|
|
|
#define DisableRedrawWindow(hwnd) \
|
|
|
|
SendMessage((hwnd), WM_SETREDRAW, FALSE, 0)
|
|
|
|
|
|
|
|
extern HINSTANCE hDllInstance;
|
|
|
|
|
2005-11-03 11:28:56 +00:00
|
|
|
typedef struct _ACE_ENTRY
|
|
|
|
{
|
|
|
|
struct _ACE_ENTRY *Next;
|
|
|
|
} ACE_ENTRY, *PACE_ENTRY;
|
|
|
|
|
2005-08-06 01:14:09 +00:00
|
|
|
typedef struct _PRINCIPAL_LISTITEM
|
2005-07-01 12:09:04 +00:00
|
|
|
{
|
2005-08-06 01:14:09 +00:00
|
|
|
struct _PRINCIPAL_LISTITEM *Next;
|
2005-12-25 21:20:13 +00:00
|
|
|
struct _SIDREQRESULT *SidReqResult;
|
2005-11-03 11:28:56 +00:00
|
|
|
PACE_ENTRY ACEs;
|
2005-12-25 21:20:13 +00:00
|
|
|
LPWSTR DisplayString;
|
2005-08-06 01:14:09 +00:00
|
|
|
} PRINCIPAL_LISTITEM, *PPRINCIPAL_LISTITEM;
|
2005-07-01 12:09:04 +00:00
|
|
|
|
|
|
|
typedef struct _SECURITY_PAGE
|
|
|
|
{
|
|
|
|
HWND hWnd;
|
2005-08-06 01:14:09 +00:00
|
|
|
HWND hBtnAdd;
|
2005-07-01 23:33:34 +00:00
|
|
|
HWND hBtnRemove;
|
2005-07-02 13:49:23 +00:00
|
|
|
HWND hBtnAdvanced;
|
2005-07-01 23:33:34 +00:00
|
|
|
HWND hAceCheckList;
|
2005-07-02 13:49:23 +00:00
|
|
|
HWND hPermissionsForLabel;
|
2005-07-01 12:09:04 +00:00
|
|
|
|
2005-08-06 01:14:09 +00:00
|
|
|
/* Main Principals List */
|
|
|
|
HWND hWndPrincipalsList;
|
|
|
|
PPRINCIPAL_LISTITEM PrincipalsListHead;
|
2005-12-25 21:20:13 +00:00
|
|
|
|
2007-06-10 10:45:38 +00:00
|
|
|
PSID OwnerSid;
|
|
|
|
BOOL OwnerDefaulted;
|
|
|
|
|
2005-08-06 01:14:09 +00:00
|
|
|
INT ControlsMargin;
|
2005-12-25 21:20:13 +00:00
|
|
|
|
2005-07-02 13:49:23 +00:00
|
|
|
INT SpecialPermCheckIndex;
|
2005-07-01 12:09:04 +00:00
|
|
|
|
2005-08-06 01:14:09 +00:00
|
|
|
HIMAGELIST hiPrincipals;
|
2005-07-01 12:09:04 +00:00
|
|
|
|
|
|
|
LPSECURITYINFO psi;
|
|
|
|
SI_OBJECT_INFO ObjectInfo;
|
2005-09-22 14:30:29 +00:00
|
|
|
IDsObjectPicker *pDsObjectPicker;
|
2005-12-25 21:20:13 +00:00
|
|
|
|
2005-07-02 01:34:18 +00:00
|
|
|
SI_ACCESS DefaultAccess;
|
2005-12-25 21:20:13 +00:00
|
|
|
|
|
|
|
HANDLE SidCacheMgr;
|
2006-01-12 00:19:35 +00:00
|
|
|
LONG SidLookupsPending;
|
2006-04-15 10:41:58 +00:00
|
|
|
UINT Initializing : 1;
|
2006-01-12 00:19:35 +00:00
|
|
|
|
2005-12-25 21:20:13 +00:00
|
|
|
LPCWSTR ServerName;
|
2005-07-01 12:09:04 +00:00
|
|
|
} SECURITY_PAGE, *PSECURITY_PAGE;
|
|
|
|
|
2005-07-01 23:33:34 +00:00
|
|
|
/* MISC ***********************************************************************/
|
|
|
|
|
2005-07-01 12:09:04 +00:00
|
|
|
DWORD
|
|
|
|
LoadAndFormatString(IN HINSTANCE hInstance,
|
|
|
|
IN UINT uID,
|
|
|
|
OUT LPWSTR *lpTarget,
|
|
|
|
...);
|
|
|
|
|
2005-07-01 23:33:34 +00:00
|
|
|
LPARAM
|
|
|
|
ListViewGetSelectedItemData(IN HWND hwnd);
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
ListViewSelectItem(IN HWND hwnd,
|
|
|
|
IN INT Index);
|
|
|
|
|
2005-08-06 01:14:09 +00:00
|
|
|
HRESULT
|
|
|
|
InitializeObjectPicker(IN PCWSTR ServerName,
|
|
|
|
IN PSI_OBJECT_INFO ObjectInfo,
|
|
|
|
OUT IDsObjectPicker **pDsObjectPicker);
|
|
|
|
|
2005-09-22 14:30:29 +00:00
|
|
|
VOID
|
|
|
|
FreeObjectPicker(IN IDsObjectPicker *pDsObjectPicker);
|
|
|
|
|
|
|
|
typedef BOOL (*POBJPICK_SELECTED_SID)(IN IDsObjectPicker *pDsObjectPicker,
|
|
|
|
IN HWND hwndParent OPTIONAL,
|
|
|
|
IN PSID pSid,
|
|
|
|
IN PVOID Context OPTIONAL);
|
|
|
|
|
|
|
|
HRESULT
|
|
|
|
InvokeObjectPickerDialog(IN IDsObjectPicker *pDsObjectPicker,
|
|
|
|
IN HWND hwndParent OPTIONAL,
|
|
|
|
IN POBJPICK_SELECTED_SID SelectedSidCallback,
|
|
|
|
IN PVOID Context OPTIONAL);
|
|
|
|
|
2005-07-01 23:33:34 +00:00
|
|
|
/* CHECKLIST CONTROL **********************************************************/
|
|
|
|
|
2005-07-03 01:44:25 +00:00
|
|
|
#define CIS_DENYDISABLED (0x8)
|
|
|
|
#define CIS_DENYENABLED (0x0)
|
|
|
|
#define CIS_ALLOWDISABLED (0x4)
|
|
|
|
#define CIS_ALLOWENABLED (0x0)
|
2005-07-02 01:34:18 +00:00
|
|
|
#define CIS_ALLOW (0x2)
|
|
|
|
#define CIS_DENY (0x1)
|
|
|
|
#define CIS_NONE (0x0)
|
2005-07-03 01:44:25 +00:00
|
|
|
#define CIS_DISABLED (CIS_ALLOWDISABLED | CIS_DENYDISABLED)
|
2005-07-01 23:33:34 +00:00
|
|
|
|
|
|
|
#define CLB_ALLOW (0x1)
|
|
|
|
#define CLB_DENY (0x0)
|
|
|
|
|
|
|
|
#define CIS_MASK (CIS_DISABLED | CIS_ALLOW | CIS_DENY)
|
|
|
|
|
|
|
|
#define CLM_ADDITEM (WM_USER + 1)
|
|
|
|
#define CLM_DELITEM (WM_USER + 2)
|
|
|
|
#define CLM_GETITEMCOUNT (WM_USER + 3)
|
|
|
|
#define CLM_CLEAR (WM_USER + 4)
|
|
|
|
#define CLM_SETCHECKBOXCOLUMN (WM_USER + 5)
|
|
|
|
#define CLM_GETCHECKBOXCOLUMN (WM_USER + 6)
|
2005-07-02 13:49:23 +00:00
|
|
|
#define CLM_CLEARCHECKBOXES (WM_USER + 7)
|
|
|
|
#define CLM_SETITEMSTATE (WM_USER + 8)
|
2005-07-04 17:22:18 +00:00
|
|
|
#define CLM_ENABLEQUICKSEARCH (WM_USER + 9)
|
|
|
|
#define CLM_SETQUICKSEARCH_TIMEOUT_RESET (WM_USER + 10)
|
|
|
|
#define CLM_SETQUICKSEARCH_TIMEOUT_SETFOCUS (WM_USER + 11)
|
2005-11-03 11:28:56 +00:00
|
|
|
#define CLM_FINDITEMBYACCESSMASK (WM_USER + 12)
|
2005-07-01 23:33:34 +00:00
|
|
|
|
2005-07-14 21:57:57 +00:00
|
|
|
#define CLN_CHANGINGITEMCHECKBOX (101)
|
|
|
|
|
|
|
|
typedef struct _NMCHANGEITEMCHECKBOX
|
|
|
|
{
|
|
|
|
NMHDR nmhdr;
|
|
|
|
DWORD OldState;
|
|
|
|
DWORD NewState;
|
|
|
|
DWORD CheckBox;
|
|
|
|
BOOL Checked;
|
|
|
|
} NMCHANGEITEMCHECKBOX, *PNMCHANGEITEMCHECKBOX;
|
|
|
|
|
2005-07-01 23:33:34 +00:00
|
|
|
BOOL
|
|
|
|
RegisterCheckListControl(HINSTANCE hInstance);
|
|
|
|
|
|
|
|
VOID
|
2006-03-07 23:33:19 +00:00
|
|
|
UnregisterCheckListControl(HINSTANCE hInstance);
|
2005-07-01 23:33:34 +00:00
|
|
|
|
2005-11-03 11:28:56 +00:00
|
|
|
/* DLLMAIN ********************************************************************/
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
WINAPI
|
|
|
|
DllMain(IN HINSTANCE hinstDLL,
|
|
|
|
IN DWORD dwReason,
|
|
|
|
IN LPVOID lpvReserved);
|
|
|
|
|
2005-12-25 21:20:13 +00:00
|
|
|
/* SIDCACHE *******************************************************************/
|
|
|
|
|
|
|
|
typedef struct _SIDREQRESULT
|
|
|
|
{
|
|
|
|
LONG RefCount;
|
|
|
|
SID_NAME_USE SidNameUse;
|
|
|
|
LPWSTR AccountName;
|
|
|
|
LPWSTR DomainName;
|
|
|
|
} SIDREQRESULT, *PSIDREQRESULT;
|
|
|
|
|
|
|
|
typedef VOID (*PSIDREQCOMPLETIONPROC)(IN HANDLE SidCacheMgr,
|
|
|
|
IN PSID Sid,
|
|
|
|
IN PSIDREQRESULT SidRequestResult,
|
|
|
|
IN PVOID Context);
|
|
|
|
|
|
|
|
HANDLE
|
|
|
|
CreateSidCacheMgr(IN HANDLE Heap,
|
|
|
|
IN LPCWSTR SystemName);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
DestroySidCacheMgr(IN HANDLE SidCacheMgr);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
DequeueSidLookup(IN HANDLE SidCacheMgr,
|
|
|
|
IN PSID pSid);
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
LookupSidCache(IN HANDLE SidCacheMgr,
|
|
|
|
IN PSID pSid,
|
|
|
|
IN PSIDREQCOMPLETIONPROC CompletionProc,
|
|
|
|
IN PVOID Context);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
ReferenceSidReqResult(IN HANDLE SidCacheMgr,
|
|
|
|
IN PSIDREQRESULT ReqResult);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
DereferenceSidReqResult(IN HANDLE SidCacheMgr,
|
|
|
|
IN PSIDREQRESULT ReqResult);
|
|
|
|
|
2014-02-07 18:02:02 +00:00
|
|
|
#endif /* _ACLUI_PCH_ */
|