ReactOS 0.4.16-dev-1408-gbc64f3a
misc.c
Go to the documentation of this file.
1/*
2 * ReactOS kernel
3 * Copyright (C) 2004 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19/*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS system libraries
22 * FILE: dll/win32/userenv/misc.c
23 * PURPOSE: User profile code
24 * PROGRAMMER: Eric Kohl
25 */
26
27#include "precomp.h"
28#include <ndk/sefuncs.h>
29
30#include "resources.h"
31
32#define NDEBUG
33#include <debug.h>
34
37
38/* FUNCTIONS ***************************************************************/
39
42{
44
46 if (String[Length - 1] != L'\\')
47 {
48 String[Length] = L'\\';
49 Length++;
50 String[Length] = (WCHAR)0;
51 }
52
53 return &String[Length];
54}
55
58{
60 PSID AdministratorsSid = NULL;
61 PSID EveryoneSid = NULL;
62 PACL Dacl;
65
66 /* create the SYSTEM, Administrators and Everyone SIDs */
68 1,
70 0,
71 0,
72 0,
73 0,
74 0,
75 0,
76 0,
79 2,
82 0,
83 0,
84 0,
85 0,
86 0,
87 0,
88 &AdministratorsSid) ||
90 1,
92 0,
93 0,
94 0,
95 0,
96 0,
97 0,
98 0,
99 &EveryoneSid))
100 {
101 DPRINT1("Failed initializing the SIDs for the default security descriptor (0x%p, 0x%p, 0x%p)\n",
102 LocalSystemSid, AdministratorsSid, EveryoneSid);
103 goto Cleanup;
104 }
105
106 /* allocate the security descriptor and DACL */
107 DaclSize = sizeof(ACL) +
109 GetLengthSid(AdministratorsSid) +
110 GetLengthSid(EveryoneSid)) +
112 SidStart)));
113
116 if (pSD == NULL)
117 {
118 DPRINT1("Failed to allocate the default security descriptor and ACL\n");
119 goto Cleanup;
120 }
121
124 {
125 DPRINT1("Failed to initialize the default security descriptor\n");
126 goto Cleanup;
127 }
128
129 /* initialize and build the DACL */
130 Dacl = (PACL)((ULONG_PTR)pSD + sizeof(SECURITY_DESCRIPTOR));
131 if (!InitializeAcl(Dacl,
134 {
135 DPRINT1("Failed to initialize the DACL of the default security descriptor\n");
136 goto Cleanup;
137 }
138
139 /* add the SYSTEM Ace */
144 {
145 DPRINT1("Failed to add the SYSTEM ACE\n");
146 goto Cleanup;
147 }
148
149 /* add the Administrators Ace */
153 AdministratorsSid))
154 {
155 DPRINT1("Failed to add the Administrators ACE\n");
156 goto Cleanup;
157 }
158
159 /* add the Everyone Ace */
163 EveryoneSid))
164 {
165 DPRINT1("Failed to add the Everyone ACE\n");
166 goto Cleanup;
167 }
168
169 /* set the DACL */
171 TRUE,
172 Dacl,
173 FALSE))
174 {
175 DPRINT1("Failed to set the DACL of the default security descriptor\n");
176
177Cleanup:
178 if (pSD != NULL)
179 {
180 LocalFree((HLOCAL)pSD);
181 pSD = NULL;
182 }
183 }
184
185 if (LocalSystemSid != NULL)
186 {
188 }
189 if (AdministratorsSid != NULL)
190 {
191 FreeSid(AdministratorsSid);
192 }
193 if (EveryoneSid != NULL)
194 {
195 FreeSid(EveryoneSid);
196 }
197
198 return pSD;
199}
200
201/* Policy values helpers *****************************************************/
202
203LONG
205 _In_ HKEY hRootKey,
207{
208 static PCWSTR PolicyKeys[] =
209 {
210 L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
211 L"Software\\Policies\\Microsoft\\Windows\\System"
212 };
213
214 /* Retrieve the sought policy values in each of the policy keys */
215 DWORD i;
216 for (i = 0; i < _countof(PolicyKeys); ++i)
217 {
218 HKEY hKey;
220 DWORD dwType, cbData;
221
222 if (RegOpenKeyExW(hRootKey, PolicyKeys[i], 0,
224 {
225 continue;
226 }
227
228 for (Value = QueryTable; Value->ValueName || Value->Data; ++Value)
229 {
230 /* Retrieve the type and data length for validation checks */
231 if (RegQueryValueExW(hKey, Value->ValueName, NULL,
232 &dwType, NULL, &cbData) != ERROR_SUCCESS)
233 {
234 continue;
235 }
236
237 /* Verify for compatible types */
238 if ( ((Value->Type == REG_SZ || Value->Type == REG_EXPAND_SZ) &&
239 (dwType == REG_SZ || dwType == REG_EXPAND_SZ)) ||
240 (Value->Type == REG_DWORD && dwType == REG_DWORD) ||
241 (Value->Type == REG_QWORD && dwType == REG_QWORD) ||
242 (Value->Type == REG_MULTI_SZ && dwType == REG_MULTI_SZ) ||
243 (Value->Type == REG_NONE || Value->Type == REG_BINARY) )
244 {
245 /* Verify whether the given buffer can hold the data;
246 * if so, retrieve the actual data */
247 if (Value->Length >= cbData)
248 {
249 RegQueryValueExW(hKey, Value->ValueName, NULL,
250 &dwType, Value->Data, &cbData);
251 }
252 }
253 }
255 }
256
257 return ERROR_SUCCESS;
258}
259
260LONG
262 _In_ HKEY hRootKey,
267{
269 {
270 {ValueName, Type, pData, pcbData ? *pcbData : 0},
271 {NULL, 0, NULL, 0}
272 };
273 LONG ret = GetPolicyValues(hRootKey, QueryTable);
274 if ((ret == ERROR_SUCCESS) && pcbData)
275 *pcbData = QueryTable[0].Length;
276
277 return ret;
278}
279
280/* Timed dialog helpers ******************************************************/
281
282#define IDT_DLGTIMER 1
283
284typedef struct _TIMERDLG_BUTTON
285{
289
290typedef struct _TIMERDLG_INFO
291{
297
298static INT_PTR
302 _In_ HWND hDlg,
303 _In_ UINT uMsg,
306{
307 switch (uMsg)
308 {
309 case WM_INITDIALOG:
310 {
311 /* Setup the timeout */
312 if (Info->ulTimeout)
313 {
314 /* Display the countdown */
315 WCHAR szTimeout[10];
316 StringCchPrintfW(szTimeout, _countof(szTimeout), L"%d", Info->ulTimeout);
317 SetDlgItemTextW(hDlg, IDC_TIMEOUT, szTimeout);
318
319 /* Set a 1-second timer */
320 SetTimer(hDlg, IDT_DLGTIMER, 1000, NULL);
321 }
322 break;
323 }
324
325 case WM_COMMAND:
326 {
327 PTIMERDLG_BUTTON ButtonMap = Info->ButtonMap;
328 WORD wDefBtnOnTimeout = min(Info->wDefBtnOnTimeout, _countof(Info->ButtonMap)-1);
329 WORD i;
330
331 if (LOWORD(wParam) == IDCANCEL)
332 {
333 /* ESC or CANCEL button pressed: stop the timeout,
334 * close the dialog and return the default result */
335 WORD wDefBtnOnCancel = min(Info->wDefBtnOnCancel, _countof(Info->ButtonMap)-1);
336 KillTimer(hDlg, IDT_DLGTIMER);
337 EndDialog(hDlg, ButtonMap[wDefBtnOnCancel].nResult);
338 break;
339 }
340
341 for (i = 0; i < _countof(Info->ButtonMap); ++i)
342 {
343 if (LOWORD(wParam) == ButtonMap[i].uID)
344 {
345 if (HIWORD(wParam) == BN_CLICKED)
346 {
347 /* Button pressed: stop the timeout, close the
348 * dialog and return the corresponding result */
349 KillTimer(hDlg, IDT_DLGTIMER);
350 EndDialog(hDlg, ButtonMap[i].nResult);
351 }
352 else if (HIWORD(wParam) == BN_KILLFOCUS)
353 {
354 /* Button lost the focus: stop the timeout
355 * only if this isn't the default action */
356 if (i != wDefBtnOnTimeout)
357 break;
358 KillTimer(hDlg, IDT_DLGTIMER);
361 }
362 break;
363 }
364 }
365 break;
366 }
367
368 case WM_TIMER:
369 {
370 if (Info->ulTimeout < 1)
371 {
372 /* Timeout ended, close the dialog */
373 WORD wDefBtnOnTimeout = min(Info->wDefBtnOnTimeout, _countof(Info->ButtonMap)-1);
375 MAKEWPARAM(Info->ButtonMap[wDefBtnOnTimeout].uID, BN_CLICKED),
376 0);
377 }
378 else
379 {
380 /* Decrement and display the countdown */
381 WCHAR szTimeout[10];
382 StringCchPrintfW(szTimeout, _countof(szTimeout), L"%d", --(Info->ulTimeout));
383 SetDlgItemTextW(hDlg, IDC_TIMEOUT, szTimeout);
384 }
385 break;
386 }
387 }
388
389 return FALSE;
390}
391
392/* Error reporting helpers ***************************************************/
393
394typedef struct _ERRORDLG_PARAMS
395{
399
401{
402 0,
403 0, 1,
404 {{IDOK, TRUE}, {IDCANCEL, FALSE}}
405};
406
407static INT_PTR
410 _In_ HWND hDlg,
411 _In_ UINT uMsg,
414{
415 if (uMsg == WM_INITDIALOG)
416 {
418
419 /* Position and focus the dialog */
420 // CenterWindow(hDlg); // Already done with the DS_CENTER style.
422
423 /* Display the message */
424 SetDlgItemTextW(hDlg, IDC_ERRORDESC, Params->pszString);
425
426 /* Setup the timeout and display the countdown */
427 ErrorDlg.ulTimeout = Params->ulTimeout;
428 // SetWindowLongPtrW(hDlg, DWLP_USER, &ErrorDlg);
430 return TRUE;
431 }
432 return TimerDlgProc(&ErrorDlg, hDlg, uMsg, wParam, lParam);
433}
434
435VOID
437 _In_ ULONG ulTimeout,
439{
440 ERRORDLG_PARAMS Params = {ulTimeout, pszString};
443}
444
445VOID
448 _In_ PCWSTR pszStr)
449{
450 // TODO: Report event to Application log, "Userenv" source.
451 DPRINT1("%S", pszStr);
452
453 if (!(dwFlags & PI_NOUI))
454 {
455 /* Retrieve the "Profile Dialog Time Out" policy value,
456 * defaulting to 30 seconds timeout */
457 ULONG ulTimeout = 30;
458 DWORD cbData = sizeof(ulTimeout);
460 L"ProfileDlgTimeOut",
461 REG_DWORD,
462 &ulTimeout,
463 &cbData);
464 ErrorDialogEx(ulTimeout, pszStr);
465 }
466}
467
468VOID
471 _In_ PCWSTR pszStr,
473{
474 WCHAR Buffer[4096];
477}
478
479VOID
483 _In_ PCWSTR pszStr,
484 ...)
485{
487
488 va_start(args, pszStr);
489 ReportErrorV(dwFlags, pszStr, args);
490 va_end(args);
491}
492
493
494/* Dynamic DLL loading interface **********************************************/
495
496/* OLE32.DLL import table */
498{
499 L"ole32.dll",
500 {
501 "CoInitialize",
502 "CoCreateInstance",
503 "CoUninitialize",
504 NULL
505 }
506};
507
508/*
509 * Use this function to load functions from other modules. We cannot statically
510 * link to e.g. ole32.dll because those dlls would get loaded on startup with
511 * winlogon and they may try to register classes etc when not even a window station
512 * has been created!
513 */
514BOOL
516 PDYN_FUNCS DynFuncs)
517{
518 LPSTR *fname;
519 PVOID *fn;
520
521 ZeroMemory(DynFuncs, sizeof(DYN_FUNCS));
522
523 DynFuncs->hModule = LoadLibraryW(Module->Library);
524 if (!DynFuncs->hModule)
525 {
526 return FALSE;
527 }
528
529 fn = &DynFuncs->fn.foo;
530
531 /* load the imports */
532 for (fname = Module->Functions; *fname != NULL; fname++)
533 {
534 *fn = GetProcAddress(DynFuncs->hModule, *fname);
535 if (*fn == NULL)
536 {
537 FreeLibrary(DynFuncs->hModule);
538 DynFuncs->hModule = (HMODULE)0;
539
540 return FALSE;
541 }
542
543 fn++;
544 }
545
546 return TRUE;
547}
548
549VOID
551{
552 if (DynFuncs->hModule)
553 {
554 FreeLibrary(DynFuncs->hModule);
555 DynFuncs->hModule = (HMODULE)0;
556 }
557}
558
559/* EOF */
Type
Definition: Type.h:7
#define __cdecl
Definition: accygwin.h:79
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define DPRINT1
Definition: precomp.h:8
PSID LocalSystemSid
Definition: globals.c:16
#define RegCloseKey(hKey)
Definition: registry.h:49
HINSTANCE hInstance
Definition: charmap.c:19
Definition: bufpool.h:45
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
Definition: security.c:674
BOOL WINAPI InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision)
Definition: security.c:1006
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
Definition: security.c:929
BOOL WINAPI AddAccessAllowedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid)
Definition: security.c:1039
DWORD WINAPI GetLengthSid(PSID pSid)
Definition: security.c:919
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:698
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define CALLBACK
Definition: compat.h:35
#define LoadLibraryW(x)
Definition: compat.h:747
#define lstrlenW
Definition: compat.h:750
SID_IDENTIFIER_AUTHORITY WorldAuthority
Definition: misc.c:36
VOID __cdecl ReportError(_In_ DWORD dwFlags, _In_ PCWSTR pszStr,...)
Definition: misc.c:481
static INT_PTR CALLBACK TimerDlgProc(_Inout_ PTIMERDLG_INFO Info, _In_ HWND hDlg, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: misc.c:300
static TIMERDLG_INFO ErrorDlg
Definition: misc.c:400
struct _TIMERDLG_INFO * PTIMERDLG_INFO
struct _ERRORDLG_PARAMS ERRORDLG_PARAMS
struct _TIMERDLG_BUTTON * PTIMERDLG_BUTTON
LPWSTR AppendBackslash(LPWSTR String)
Definition: misc.c:41
struct _TIMERDLG_INFO TIMERDLG_INFO
PSECURITY_DESCRIPTOR CreateDefaultSecurityDescriptor(VOID)
Definition: misc.c:57
#define IDT_DLGTIMER
Definition: misc.c:282
VOID ReportErrorV(_In_ DWORD dwFlags, _In_ PCWSTR pszStr, _In_ va_list args)
Definition: misc.c:469
struct _TIMERDLG_BUTTON TIMERDLG_BUTTON
LONG GetPolicyValue(_In_ HKEY hRootKey, _In_ PCWSTR ValueName, _In_ DWORD Type, _Out_opt_ PVOID pData, _Inout_opt_ PDWORD pcbData)
Definition: misc.c:261
VOID ErrorDialogEx(_In_ ULONG ulTimeout, _In_ PCWSTR pszString)
Definition: misc.c:436
DYN_MODULE DynOle32
Definition: misc.c:497
BOOL LoadDynamicImports(PDYN_MODULE Module, PDYN_FUNCS DynFuncs)
Definition: misc.c:515
SID_IDENTIFIER_AUTHORITY LocalSystemAuthority
Definition: misc.c:35
static INT_PTR CALLBACK ErrorDlgProc(_In_ HWND hDlg, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: misc.c:409
VOID UnloadDynamicImports(PDYN_FUNCS DynFuncs)
Definition: misc.c:550
LONG GetPolicyValues(_In_ HKEY hRootKey, _Inout_ PPOLICY_VALUES QueryTable)
Definition: misc.c:204
VOID ReportErrorWorker(_In_ DWORD dwFlags, _In_ PCWSTR pszStr)
Definition: misc.c:446
struct _ERRORDLG_PARAMS * PERRORDLG_PARAMS
#define IDC_ERRORDESC
Definition: resources.h:18
#define IDD_ERRORDLG
Definition: resources.h:17
#define IDC_TIMEOUTSTATIC
Definition: resources.h:19
#define IDC_TIMEOUT
Definition: resources.h:20
static const WCHAR Cleanup[]
Definition: register.c:80
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
FxAutoRegKey hKey
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
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest, size_t _Count, const wchar_t *_Format, va_list _Args)
#define REG_SZ
Definition: layer.c:22
#define min(a, b)
Definition: monoChain.cc:55
struct _SECURITY_DESCRIPTOR * PSECURITY_DESCRIPTOR
Definition: security.c:98
struct _ACL ACL
struct _SECURITY_DESCRIPTOR SECURITY_DESCRIPTOR
struct _ACL * PACL
Definition: security.c:105
unsigned int UINT
Definition: ndis.h:50
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
Definition: rtlfuncs.h:1617
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:4203
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG DaclSize
Definition: rtlfuncs.h:1618
#define _Out_opt_
Definition: no_sal2.h:214
#define _Inout_
Definition: no_sal2.h:162
#define _Inout_opt_
Definition: no_sal2.h:216
#define _In_
Definition: no_sal2.h:158
#define REG_BINARY
Definition: nt_native.h:1496
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define REG_MULTI_SZ
Definition: nt_native.h:1501
#define GENERIC_ALL
Definition: nt_native.h:92
#define REG_NONE
Definition: nt_native.h:1492
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
#define GENERIC_EXECUTE
Definition: nt_native.h:91
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define LOWORD(l)
Definition: pedump.c:82
DWORD * PDWORD
Definition: pedump.c:68
long LONG
Definition: pedump.c:60
#define REG_QWORD
Definition: sdbapi.c:597
#define REG_DWORD
Definition: sdbapi.c:596
#define args
Definition: format.c:66
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
Definition: sec.c:262
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
union _DYN_FUNCS::@636 fn
HMODULE hModule
Definition: internal.h:49
PVOID foo
Definition: internal.h:52
LPWSTR Library
Definition: internal.h:64
LPSTR Functions[]
Definition: internal.h:65
ULONG ulTimeout
Definition: misc.c:396
PCWSTR pszString
Definition: misc.c:397
INT_PTR nResult
Definition: misc.c:287
WORD wDefBtnOnTimeout
Index in button map for the default action on timeout.
Definition: misc.c:293
WORD wDefBtnOnCancel
Index in button map for the default action on dialog cancel.
Definition: misc.c:294
TIMERDLG_BUTTON ButtonMap[2]
Button/result map for the 1st and 2nd buttons.
Definition: misc.c:295
ULONG ulTimeout
Dialog timeout.
Definition: misc.c:292
Definition: match.c:390
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
HANDLE HMODULE
Definition: typedefs.h:77
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define PI_NOUI
Definition: userenv.h:8
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:308
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
#define ZeroMemory
Definition: winbase.h:1753
#define LMEM_FIXED
Definition: winbase.h:401
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
Definition: wincrypt.h:4950
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define MAKEWPARAM(l, h)
Definition: winuser.h:4085
#define SW_HIDE
Definition: winuser.h:779
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IDCANCEL
Definition: winuser.h:842
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_COMMAND
Definition: winuser.h:1759
BOOL WINAPI SetForegroundWindow(_In_ HWND)
#define BN_KILLFOCUS
Definition: winuser.h:1949
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_INITDIALOG
Definition: winuser.h:1758
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:841
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_TIMER
Definition: winuser.h:1761
#define BN_CLICKED
Definition: winuser.h:1944
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define SECURITY_BUILTIN_DOMAIN_RID
Definition: setypes.h:581
#define SECURITY_WORLD_SID_AUTHORITY
Definition: setypes.h:527
#define SECURITY_WORLD_RID
Definition: setypes.h:541
#define SECURITY_LOCAL_SYSTEM_RID
Definition: setypes.h:574
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:554
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58
#define ACL_REVISION
Definition: setypes.h:39
#define DOMAIN_ALIAS_RID_ADMINS
Definition: setypes.h:652
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184