ReactOS 0.4.16-dev-306-g647d351
precomp.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <ole2.h>
#include <objsel.h>
#include <aclui.h>
#include <ndk/rtlfuncs.h>
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ACE_ENTRY
 
struct  _PRINCIPAL_LISTITEM
 
struct  _SECURITY_PAGE
 
struct  _NMCHANGEITEMCHECKBOX
 
struct  _SIDREQRESULT
 

Macros

#define _ACLUI_
 
#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define NTOS_MODE_USER
 
#define EnableRedrawWindow(hwnd)    SendMessage((hwnd), WM_SETREDRAW, TRUE, 0)
 
#define DisableRedrawWindow(hwnd)    SendMessage((hwnd), WM_SETREDRAW, FALSE, 0)
 
#define CIS_DENYDISABLED   (0x8)
 
#define CIS_DENYENABLED   (0x0)
 
#define CIS_ALLOWDISABLED   (0x4)
 
#define CIS_ALLOWENABLED   (0x0)
 
#define CIS_ALLOW   (0x2)
 
#define CIS_DENY   (0x1)
 
#define CIS_NONE   (0x0)
 
#define CIS_DISABLED   (CIS_ALLOWDISABLED | CIS_DENYDISABLED)
 
#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)
 
#define CLM_CLEARCHECKBOXES   (WM_USER + 7)
 
#define CLM_SETITEMSTATE   (WM_USER + 8)
 
#define CLM_ENABLEQUICKSEARCH   (WM_USER + 9)
 
#define CLM_SETQUICKSEARCH_TIMEOUT_RESET   (WM_USER + 10)
 
#define CLM_SETQUICKSEARCH_TIMEOUT_SETFOCUS   (WM_USER + 11)
 
#define CLM_FINDITEMBYACCESSMASK   (WM_USER + 12)
 
#define CLN_CHANGINGITEMCHECKBOX   (101)
 

Typedefs

typedef struct _ACE_ENTRY ACE_ENTRY
 
typedef struct _ACE_ENTRYPACE_ENTRY
 
typedef struct _PRINCIPAL_LISTITEM PRINCIPAL_LISTITEM
 
typedef struct _PRINCIPAL_LISTITEMPPRINCIPAL_LISTITEM
 
typedef struct _SECURITY_PAGE SECURITY_PAGE
 
typedef struct _SECURITY_PAGEPSECURITY_PAGE
 
typedef BOOL(* POBJPICK_SELECTED_SID) (IN IDsObjectPicker *pDsObjectPicker, IN HWND hwndParent OPTIONAL, IN PSID pSid, IN PVOID Context OPTIONAL)
 
typedef struct _NMCHANGEITEMCHECKBOX NMCHANGEITEMCHECKBOX
 
typedef struct _NMCHANGEITEMCHECKBOXPNMCHANGEITEMCHECKBOX
 
typedef struct _SIDREQRESULT SIDREQRESULT
 
typedef struct _SIDREQRESULTPSIDREQRESULT
 
typedef VOID(* PSIDREQCOMPLETIONPROC) (IN HANDLE SidCacheMgr, IN PSID Sid, IN PSIDREQRESULT SidRequestResult, IN PVOID Context)
 

Functions

DWORD LoadAndFormatString (IN HINSTANCE hInstance, IN UINT uID, OUT LPWSTR *lpTarget,...)
 
LPARAM ListViewGetSelectedItemData (IN HWND hwnd)
 
BOOL ListViewSelectItem (IN HWND hwnd, IN INT Index)
 
HRESULT InitializeObjectPicker (IN PCWSTR ServerName, IN PSI_OBJECT_INFO ObjectInfo, OUT IDsObjectPicker **pDsObjectPicker)
 
VOID FreeObjectPicker (IN IDsObjectPicker *pDsObjectPicker)
 
HRESULT InvokeObjectPickerDialog (IN IDsObjectPicker *pDsObjectPicker, IN HWND hwndParent OPTIONAL, IN POBJPICK_SELECTED_SID SelectedSidCallback, IN PVOID Context OPTIONAL)
 
BOOL RegisterCheckListControl (HINSTANCE hInstance)
 
VOID UnregisterCheckListControl (HINSTANCE hInstance)
 
BOOL WINAPI DllMain (IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
 
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)
 

Variables

HINSTANCE hDllInstance
 

Macro Definition Documentation

◆ _ACLUI_

#define _ACLUI_

Definition at line 4 of file precomp.h.

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 9 of file precomp.h.

◆ CIS_ALLOW

#define CIS_ALLOW   (0x2)

Definition at line 117 of file precomp.h.

◆ CIS_ALLOWDISABLED

#define CIS_ALLOWDISABLED   (0x4)

Definition at line 115 of file precomp.h.

◆ CIS_ALLOWENABLED

#define CIS_ALLOWENABLED   (0x0)

Definition at line 116 of file precomp.h.

◆ CIS_DENY

#define CIS_DENY   (0x1)

Definition at line 118 of file precomp.h.

◆ CIS_DENYDISABLED

#define CIS_DENYDISABLED   (0x8)

Definition at line 113 of file precomp.h.

◆ CIS_DENYENABLED

#define CIS_DENYENABLED   (0x0)

Definition at line 114 of file precomp.h.

◆ CIS_DISABLED

#define CIS_DISABLED   (CIS_ALLOWDISABLED | CIS_DENYDISABLED)

Definition at line 120 of file precomp.h.

◆ CIS_MASK

#define CIS_MASK   (CIS_DISABLED | CIS_ALLOW | CIS_DENY)

Definition at line 125 of file precomp.h.

◆ CIS_NONE

#define CIS_NONE   (0x0)

Definition at line 119 of file precomp.h.

◆ CLB_ALLOW

#define CLB_ALLOW   (0x1)

Definition at line 122 of file precomp.h.

◆ CLB_DENY

#define CLB_DENY   (0x0)

Definition at line 123 of file precomp.h.

◆ CLM_ADDITEM

#define CLM_ADDITEM   (WM_USER + 1)

Definition at line 127 of file precomp.h.

◆ CLM_CLEAR

#define CLM_CLEAR   (WM_USER + 4)

Definition at line 130 of file precomp.h.

◆ CLM_CLEARCHECKBOXES

#define CLM_CLEARCHECKBOXES   (WM_USER + 7)

Definition at line 133 of file precomp.h.

◆ CLM_DELITEM

#define CLM_DELITEM   (WM_USER + 2)

Definition at line 128 of file precomp.h.

◆ CLM_ENABLEQUICKSEARCH

#define CLM_ENABLEQUICKSEARCH   (WM_USER + 9)

Definition at line 135 of file precomp.h.

◆ CLM_FINDITEMBYACCESSMASK

#define CLM_FINDITEMBYACCESSMASK   (WM_USER + 12)

Definition at line 138 of file precomp.h.

◆ CLM_GETCHECKBOXCOLUMN

#define CLM_GETCHECKBOXCOLUMN   (WM_USER + 6)

Definition at line 132 of file precomp.h.

◆ CLM_GETITEMCOUNT

#define CLM_GETITEMCOUNT   (WM_USER + 3)

Definition at line 129 of file precomp.h.

◆ CLM_SETCHECKBOXCOLUMN

#define CLM_SETCHECKBOXCOLUMN   (WM_USER + 5)

Definition at line 131 of file precomp.h.

◆ CLM_SETITEMSTATE

#define CLM_SETITEMSTATE   (WM_USER + 8)

Definition at line 134 of file precomp.h.

◆ CLM_SETQUICKSEARCH_TIMEOUT_RESET

#define CLM_SETQUICKSEARCH_TIMEOUT_RESET   (WM_USER + 10)

Definition at line 136 of file precomp.h.

◆ CLM_SETQUICKSEARCH_TIMEOUT_SETFOCUS

#define CLM_SETQUICKSEARCH_TIMEOUT_SETFOCUS   (WM_USER + 11)

Definition at line 137 of file precomp.h.

◆ CLN_CHANGINGITEMCHECKBOX

#define CLN_CHANGINGITEMCHECKBOX   (101)

Definition at line 140 of file precomp.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 10 of file precomp.h.

◆ DisableRedrawWindow

#define DisableRedrawWindow (   hwnd)     SendMessage((hwnd), WM_SETREDRAW, FALSE, 0)

Definition at line 24 of file precomp.h.

◆ EnableRedrawWindow

#define EnableRedrawWindow (   hwnd)     SendMessage((hwnd), WM_SETREDRAW, TRUE, 0)

Definition at line 21 of file precomp.h.

◆ NTOS_MODE_USER

#define NTOS_MODE_USER

Definition at line 18 of file precomp.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 8 of file precomp.h.

Typedef Documentation

◆ ACE_ENTRY

◆ NMCHANGEITEMCHECKBOX

◆ PACE_ENTRY

◆ PNMCHANGEITEMCHECKBOX

◆ POBJPICK_SELECTED_SID

typedef BOOL(* POBJPICK_SELECTED_SID) (IN IDsObjectPicker *pDsObjectPicker, IN HWND hwndParent OPTIONAL, IN PSID pSid, IN PVOID Context OPTIONAL)

Definition at line 100 of file precomp.h.

◆ PPRINCIPAL_LISTITEM

◆ PRINCIPAL_LISTITEM

◆ PSECURITY_PAGE

◆ PSIDREQCOMPLETIONPROC

typedef VOID(* PSIDREQCOMPLETIONPROC) (IN HANDLE SidCacheMgr, IN PSID Sid, IN PSIDREQRESULT SidRequestResult, IN PVOID Context)

Definition at line 175 of file precomp.h.

◆ PSIDREQRESULT

◆ SECURITY_PAGE

◆ SIDREQRESULT

Function Documentation

◆ CreateSidCacheMgr()

HANDLE CreateSidCacheMgr ( IN HANDLE  Heap,
IN LPCWSTR  SystemName 
)

Definition at line 596 of file sidcache.c.

598{
599 PSIDCACHEMGR scm;
600
601 if (SystemName == NULL)
602 SystemName = L"";
603
604 scm = HeapAlloc(Heap,
605 0,
607 SystemName[wcslen(SystemName) + 1]));
608 if (scm != NULL)
609 {
610 /* zero the static part of the structure */
611 ZeroMemory(scm,
613 SystemName));
614
615 scm->RefCount = 1;
616 scm->Heap = Heap;
617
618 wcscpy(scm->SystemName,
619 SystemName);
620
624
626 FALSE,
627 FALSE,
628 NULL);
629 if (scm->LookupEvent == NULL)
630 {
631 goto Cleanup;
632 }
633
636 &scm->LsaHandle))
637 {
638 goto Cleanup;
639 }
640
642 0,
644 scm,
645 0,
646 NULL);
647 if (scm->LookupThread == NULL)
648 {
649Cleanup:
650 if (scm->LookupEvent != NULL)
651 {
653 }
654
655 if (scm->LsaHandle != NULL)
656 {
657 LsaClose(scm->LsaHandle);
658 }
659
660 HeapFree(Heap,
661 0,
662 scm);
663 scm = NULL;
664 }
665 }
666 else
667 {
669 }
670
671 return (HANDLE)scm;
672}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
Definition: lsa.c:194
#define CloseHandle
Definition: compat.h:739
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
static const WCHAR Cleanup[]
Definition: register.c:80
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define POLICY_VIEW_LOCAL_INFORMATION
Definition: ntsecapi.h:61
#define POLICY_LOOKUP_NAMES
Definition: ntsecapi.h:72
#define L(x)
Definition: ntvdm.h:50
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static DWORD WINAPI LookupThreadProc(IN LPVOID lpParameter)
Definition: sidcache.c:455
static BOOL OpenLSAPolicyHandle(IN LPWSTR SystemName, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
Definition: sidcache.c:172
WCHAR SystemName[1]
Definition: sidcache.c:50
HANDLE LookupEvent
Definition: sidcache.c:48
LIST_ENTRY QueueListHead
Definition: sidcache.c:44
volatile LONG RefCount
Definition: sidcache.c:41
CRITICAL_SECTION Lock
Definition: sidcache.c:43
LSA_HANDLE LsaHandle
Definition: sidcache.c:42
LIST_ENTRY CacheListHead
Definition: sidcache.c:46
HANDLE Heap
Definition: sidcache.c:47
HANDLE LookupThread
Definition: sidcache.c:49
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define ZeroMemory
Definition: winbase.h:1737
#define CreateEvent
Definition: winbase.h:3773

Referenced by CreateSecurityPage().

◆ DequeueSidLookup()

VOID DequeueSidLookup ( IN HANDLE  SidCacheMgr,
IN PSID  pSid 
)

Definition at line 791 of file sidcache.c.

793{
794 PLIST_ENTRY CurrentEntry;
795 PSIDQUEUEENTRY QueueEntry;
796 PSIDCACHEMGR scm;
797
798 scm = ReferenceSidCacheMgr(SidCacheMgr);
799 if (scm != NULL)
800 {
802
803 if (scm->QueueLookingUp != NULL &&
805 (PSID)(scm->QueueLookingUp + 1)))
806 {
807 /* don't free the queue lookup item! this will be
808 done in the lookup thread */
809 scm->QueueLookingUp = NULL;
810 }
811 else
812 {
813 for (CurrentEntry = scm->QueueListHead.Flink;
814 CurrentEntry != &scm->QueueListHead;
815 CurrentEntry = CurrentEntry->Flink)
816 {
817 QueueEntry = CONTAINING_RECORD(CurrentEntry,
819 ListEntry);
820
821 if (EqualSid(pSid,
822 (PSID)(QueueEntry + 1)))
823 {
824 FreeQueueEntry(scm,
825 QueueEntry);
826 break;
827 }
828 }
829 }
830
832
834 }
835}
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
Definition: security.c:829
static PSID pSid
Definition: security.c:74
static VOID DereferenceSidCacheMgr(IN PSIDCACHEMGR scm)
Definition: sidcache.c:161
static VOID FreeQueueEntry(IN PSIDCACHEMGR scm, IN PSIDQUEUEENTRY QueueEntry)
Definition: sidcache.c:81
static PSIDCACHEMGR ReferenceSidCacheMgr(IN HANDLE SidCacheMgr)
Definition: sidcache.c:147
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
struct _SIDQUEUEENTRY * QueueLookingUp
Definition: sidcache.c:45
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

◆ DereferenceSidReqResult()

VOID DereferenceSidReqResult ( IN HANDLE  SidCacheMgr,
IN PSIDREQRESULT  ReqResult 
)

Definition at line 855 of file sidcache.c.

857{
858 PSIDCACHEMGR scm;
859
860 scm = ReferenceSidCacheMgr(SidCacheMgr);
861 if (scm != NULL)
862 {
863 if (InterlockedDecrement(&ReqResult->RefCount) == 0)
864 {
865 HeapFree(scm->Heap,
866 0,
867 ReqResult);
868 }
869
871 }
872}
#define InterlockedDecrement
Definition: armddk.h:52

Referenced by FreePrincipalsList(), LookupSidCache(), LookupThreadProc(), and UpdatePrincipalListItem().

◆ DestroySidCacheMgr()

VOID DestroySidCacheMgr ( IN HANDLE  SidCacheMgr)

Definition at line 676 of file sidcache.c.

677{
678 PSIDCACHEMGR scm = HandleToScm(SidCacheMgr);
679
680 if (scm != NULL)
681 {
682 /* remove the keep-alive reference */
684 }
685}
#define HandleToScm(Handle)
Definition: sidcache.c:36

Referenced by CreateSecurityPage(), and DestroySecurityPage().

◆ DllMain()

BOOL WINAPI DllMain ( IN HINSTANCE  hDllInstance,
IN DWORD  fdwReason,
IN LPVOID  lpvReserved 
)

@DllMain

Core routine of the Utility Manager's library.

Parameters
[in]hDllInstanceThe entry point instance of the library.
[in]fdwReasonThe reason argument to indicate the motive DllMain is being called.
[in]lpvReservedReserved.
Returns
Returns TRUE when main call initialization has succeeded, FALSE otherwise.

Definition at line 95 of file kbsdll.c.

98{
99 switch (dwReason)
100 {
102 {
103 hInstance = hinstDLL;
105 if (!hKbSwitchWnd)
106 {
107 return FALSE;
108 }
109 }
110 break;
111 }
112
113 return TRUE;
114}
DWORD dwReason
Definition: misc.cpp:141
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
HINSTANCE hInstance
Definition: kbsdll.c:12
HWND hKbSwitchWnd
Definition: kbsdll.c:13
TCHAR szKbSwitcherName[]
Definition: kbswitch.h:29
#define FindWindow
Definition: winuser.h:5789

◆ FreeObjectPicker()

VOID FreeObjectPicker ( IN IDsObjectPicker *  pDsObjectPicker)

Definition at line 335 of file misc.c.

336{
337 pDsObjectPicker->lpVtbl->Release(pDsObjectPicker);
338}

◆ InitializeObjectPicker()

HRESULT InitializeObjectPicker ( IN PCWSTR  ServerName,
IN PSI_OBJECT_INFO  ObjectInfo,
OUT IDsObjectPicker **  pDsObjectPicker 
)

Definition at line 176 of file misc.c.

179{
180 HRESULT hRet;
181
182 *pDsObjectPicker = NULL;
183
184 hRet = CoCreateInstance(&CLSID_DsObjectPicker,
185 NULL,
186 CLSCTX_INPROC_SERVER,
187 &IID_IDsObjectPicker,
188 (LPVOID*)pDsObjectPicker);
189 if (SUCCEEDED(hRet))
190 {
191 DSOP_INIT_INFO InitInfo;
192 UINT i;
193 static DSOP_SCOPE_INIT_INFO Scopes[] =
194 {
195 {
196 sizeof(DSOP_SCOPE_INIT_INFO),
200 {
201 {
202 0,
203 0,
204 0
205 },
208 },
209 NULL,
210 NULL,
211 S_OK
212 },
213 };
214
215 InitInfo.cbSize = sizeof(InitInfo);
216 InitInfo.pwzTargetComputer = ServerName;
217 InitInfo.cDsScopeInfos = sizeof(Scopes) / sizeof(Scopes[0]);
218 InitInfo.aDsScopeInfos = Scopes;
222
223 for (i = 0; i < InitInfo.cDsScopeInfos; i++)
224 {
225 if ((ObjectInfo->dwFlags & SI_SERVER_IS_DC) &&
227 {
228 /* only set the domain controller string if we know the target
229 computer is a domain controller and the scope type is an
230 up-level domain to which the target computer is joined */
231 InitInfo.aDsScopeInfos[i].pwzDcName = InitInfo.pwzTargetComputer;
232 }
233 }
234
235 hRet = (*pDsObjectPicker)->lpVtbl->Initialize(*pDsObjectPicker,
236 &InitInfo);
237
238 if (FAILED(hRet))
239 {
240 /* delete the object picker in case initialization failed! */
241 (*pDsObjectPicker)->lpVtbl->Release(*pDsObjectPicker);
242 }
243 }
244
245 return hRet;
246}
#define SI_SERVER_IS_DC
Definition: accctrl.h:126
static PCWSTR ObjectPickerAttributes[]
Definition: misc.c:34
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
unsigned int UINT
Definition: ndis.h:50
#define DSOP_SCOPE_FLAG_STARTING_SCOPE
Definition: objsel.h:80
#define DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS
Definition: objsel.h:86
#define DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS
Definition: objsel.h:52
#define DSOP_FLAG_MULTISELECT
Definition: objsel.h:104
#define DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS
Definition: objsel.h:87
#define DSOP_SCOPE_TYPE_TARGET_COMPUTER
Definition: objsel.h:121
#define DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS
Definition: objsel.h:68
#define DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN
Definition: objsel.h:122
#define DSOP_DOWNLEVEL_FILTER_USERS
Definition: objsel.h:51
struct _DSOP_SCOPE_INIT_INFO DSOP_SCOPE_INIT_INFO
#define DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS
Definition: objsel.h:53
ULONG cAttributesToFetch
Definition: objsel.h:114
ULONG cbSize
Definition: objsel.h:109
PCWSTR * apwzAttributeNames
Definition: objsel.h:115
PDSOP_SCOPE_INIT_INFO aDsScopeInfos
Definition: objsel.h:112
ULONG cDsScopeInfos
Definition: objsel.h:111
PCWSTR pwzTargetComputer
Definition: objsel.h:110
ULONG flOptions
Definition: objsel.h:113

Referenced by SecurityPageProc().

◆ InvokeObjectPickerDialog()

HRESULT InvokeObjectPickerDialog ( IN IDsObjectPicker *  pDsObjectPicker,
IN HWND hwndParent  OPTIONAL,
IN POBJPICK_SELECTED_SID  SelectedSidCallback,
IN PVOID Context  OPTIONAL 
)

Definition at line 249 of file misc.c.

253{
254 IDataObject *pdo = NULL;
255 HRESULT hRet;
256
257 hRet = pDsObjectPicker->lpVtbl->InvokeDialog(pDsObjectPicker,
259 &pdo);
260 if (hRet == S_OK)
261 {
262 STGMEDIUM stm;
263 FORMATETC fe;
264
266 fe.ptd = NULL;
267 fe.dwAspect = DVASPECT_CONTENT;
268 fe.lindex = -1;
269 fe.tymed = TYMED_HGLOBAL;
270
271 hRet = pdo->lpVtbl->GetData(pdo,
272 &fe,
273 &stm);
274 if (SUCCEEDED(hRet))
275 {
276 PDS_SELECTION_LIST SelectionList = (PDS_SELECTION_LIST)GlobalLock(stm.hGlobal);
277 if (SelectionList != NULL)
278 {
279 LPVARIANT vSid;
280 PSID pSid;
281 UINT i;
282 BOOL contLoop = TRUE;
283
284 for (i = 0; i < SelectionList->cItems && contLoop; i++)
285 {
286 vSid = SelectionList->aDsSelection[i].pvarFetchedAttributes;
287
288 if (vSid != NULL && V_VT(vSid) == (VT_ARRAY | VT_UI1))
289 {
290 hRet = SafeArrayAccessData(V_ARRAY(vSid),
291 (void **)&pSid);
292 if (FAILED(hRet))
293 {
294 break;
295 }
296
297 if (pSid != NULL)
298 {
299 contLoop = SelectedSidCallback(pDsObjectPicker,
301 pSid,
302 Context);
303 }
304
306 }
307 }
308
309 GlobalUnlock(stm.hGlobal);
310
311 if (SUCCEEDED(hRet))
312 {
313 /* return S_OK instead of possible other success codes if
314 everything went well */
315 hRet = S_OK;
316 }
317 }
318 else
319 {
320 /* unable to translate the selection pointer handle, indicate
321 failure */
322 hRet = E_FAIL;
323 }
324
325 ReleaseStgMedium(&stm);
326 }
327
328 pdo->lpVtbl->Release(pdo);
329 }
330
331 return hRet;
332}
static HWND hwndParent
Definition: cryptui.c:300
#define E_FAIL
Definition: ddrawi.h:102
@ VT_ARRAY
Definition: compat.h:2341
@ VT_UI1
Definition: compat.h:2311
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned short WORD
Definition: ntddk_ex.h:93
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
struct _DS_SELECTION_LIST * PDS_SELECTION_LIST
#define CFSTR_DSOP_DS_SELECTION_LIST
Definition: objsel.h:27
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_VT(A)
Definition: oleauto.h:211
DS_SELECTION aDsSelection[ANYSIZE_ARRAY]
Definition: objsel.h:146
VARIANT * pvarFetchedAttributes
Definition: objsel.h:138
#define RegisterClipboardFormat
Definition: winuser.h:5850

Referenced by SecurityPageProc().

◆ ListViewGetSelectedItemData()

LPARAM ListViewGetSelectedItemData ( IN HWND  hwnd)

Definition at line 134 of file misc.c.

135{
136 int Index;
137
139 -1,
141 if (Index != -1)
142 {
143 LVITEM li;
144
145 li.mask = LVIF_PARAM;
146 li.iItem = Index;
147 li.iSubItem = 0;
148
150 &li))
151 {
152 return li.lParam;
153 }
154 }
155
156 return 0;
157}
LARGE_INTEGER li
Definition: fxtimerapi.cpp:235
#define LVNI_SELECTED
Definition: commctrl.h:2429
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2439
#define LVITEM
Definition: commctrl.h:2380
#define LVIF_PARAM
Definition: commctrl.h:2316
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2399
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ ListViewSelectItem()

BOOL ListViewSelectItem ( IN HWND  hwnd,
IN INT  Index 
)

Definition at line 160 of file misc.c.

162{
163 LVITEM li;
164
165 li.mask = LVIF_STATE;
166 li.iItem = Index;
167 li.iSubItem = 0;
168 li.state = LVIS_SELECTED;
169 li.stateMask = LVIS_SELECTED;
170
171 return ListView_SetItem(hwnd,
172 &li);
173}
#define LVIF_STATE
Definition: commctrl.h:2317
#define LVIS_SELECTED
Definition: commctrl.h:2324
#define ListView_SetItem(hwnd, pitem)
Definition: commctrl.h:2406

Referenced by SecurityPageProc().

◆ LoadAndFormatString()

DWORD LoadAndFormatString ( IN HINSTANCE  hInstance,
IN UINT  uID,
OUT LPWSTR lpTarget,
  ... 
)

Definition at line 76 of file misc.c.

80{
81 DWORD Ret = 0;
83 va_list lArgs;
84
87 uID) > 0)
88 {
89 va_start(lArgs, lpTarget);
90 /* let's use Format to format it because it has the ability to allocate
91 memory automatically */
94 0,
95 0,
96 (LPWSTR)lpTarget,
97 0,
98 &lArgs);
99 va_end(lArgs);
100
102 }
103
104 return Ret;
105}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
HINSTANCE hInstance
Definition: charmap.c:19
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
unsigned long DWORD
Definition: ntddk_ex.h:95
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
LPCWSTR lpFormat
Definition: trayclock.cpp:32
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:447
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:445
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ LookupSidCache()

BOOL LookupSidCache ( IN HANDLE  SidCacheMgr,
IN PSID  pSid,
IN PSIDREQCOMPLETIONPROC  CompletionProc,
IN PVOID  Context 
)

Definition at line 876 of file sidcache.c.

880{
881 BOOL Found = FALSE;
882 PSIDREQRESULT ReqResult = NULL;
883 PSIDCACHEMGR scm;
884
885 scm = ReferenceSidCacheMgr(SidCacheMgr);
886 if (scm != NULL)
887 {
889
890 /* search the cache */
891 Found = FindSidInCache(scm,
892 pSid,
893 &ReqResult);
894
895 if (!Found)
896 {
897 /* the sid is not in the cache, queue it if not already queued */
898 if (!QueueSidLookup(scm,
899 pSid,
900 CompletionProc,
901 Context))
902 {
903 PSIDREQRESULT FoundReqResult = NULL;
904
905 /* unable to queue it, look it up now */
906
908
909 /* lookup everything we need */
910 if (!LookupSidInformation(scm,
911 pSid,
912 &ReqResult))
913 {
914 ReqResult = NULL;
915 }
916
918
919 /* see if the SID was added to the cache in the meanwhile */
920 if (!FindSidInCache(scm,
921 pSid,
922 &FoundReqResult))
923 {
924 if (ReqResult != NULL)
925 {
926 /* cache the results */
928 pSid,
929 ReqResult);
930 }
931 }
932 else
933 {
934 if (ReqResult != NULL)
935 {
936 /* free the information of our lookup and use the cached
937 information*/
939 ReqResult);
940 }
941
942 ReqResult = FoundReqResult;
943 }
944
945 Found = (ReqResult != NULL);
946 }
947 }
948
950
951 /* call the completion callback */
952 if (Found)
953 {
954 CompletionProc(SidCacheMgr,
955 pSid,
956 ReqResult,
957 Context);
958
959 if (ReqResult != NULL)
960 {
961 HeapFree(scm->Heap,
962 0,
963 ReqResult);
964 }
965 }
966
968 }
969
970 return Found;
971}
return Found
Definition: dirsup.c:1270
static VOID CacheLookupResults(IN PSIDCACHEMGR scm, IN PSID pSid, IN PSIDREQRESULT ReqResult)
Definition: sidcache.c:401
static BOOL LookupSidInformation(IN PSIDCACHEMGR scm, IN PSID pSid, OUT PSIDREQRESULT *ReqResult)
Definition: sidcache.c:214
static BOOL QueueSidLookup(IN PSIDCACHEMGR scm, IN PSID pSid, IN PSIDREQCOMPLETIONPROC CompletionProc, IN PVOID Context)
Definition: sidcache.c:689
static BOOL FindSidInCache(IN PSIDCACHEMGR scm, IN PSID pSid, OUT PSIDREQRESULT *ReqResult)
Definition: sidcache.c:336
VOID DereferenceSidReqResult(IN HANDLE SidCacheMgr, IN PSIDREQRESULT ReqResult)
Definition: sidcache.c:855

Referenced by AddPrincipalToList(), and ReloadPrincipalsList().

◆ ReferenceSidReqResult()

VOID ReferenceSidReqResult ( IN HANDLE  SidCacheMgr,
IN PSIDREQRESULT  ReqResult 
)

Definition at line 839 of file sidcache.c.

841{
842 PSIDCACHEMGR scm;
843
844 scm = ReferenceSidCacheMgr(SidCacheMgr);
845 if (scm != NULL)
846 {
847 InterlockedIncrement(&ReqResult->RefCount);
848
850 }
851}
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by UpdatePrincipalListItem().

◆ RegisterCheckListControl()

BOOL RegisterCheckListControl ( HINSTANCE  hInstance)

◆ UnregisterCheckListControl()

VOID UnregisterCheckListControl ( HINSTANCE  hInstance)

Definition at line 2614 of file checklist.c.

2615{
2617 hInstance);
2618}
static const WCHAR szCheckListWndClass[]
Definition: checklist.c:39
#define UnregisterClass
Definition: winuser.h:5873

Referenced by DllMain().

Variable Documentation

◆ hDllInstance

HINSTANCE hDllInstance
extern

Definition at line 17 of file browser.c.