ReactOS 0.4.16-dev-401-g45b008d
appcache.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Win32 Base API
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/win32/kernel32/client/appcache.c
5 * PURPOSE: Application Compatibility Cache
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include <k32.h>
12
13#define NDEBUG
14#include <debug.h>
15
16/* GLOBALS ********************************************************************/
17
22
27
28#define APPHELP_VALID_RESULT 0x10000
29#define APPHELP_RESULT_NOTFOUND 0x20000
30#define APPHELP_RESULT_FOUND 0x40000
31
32
33/* FUNCTIONS ******************************************************************/
34
38{
43 UNICODE_STRING OptionKey = RTL_CONSTANT_STRING(L"\\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\SafeBoot\\Option");
44 UNICODE_STRING AppCompatKey = RTL_CONSTANT_STRING(L"\\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility");
45 UNICODE_STRING PolicyKey = RTL_CONSTANT_STRING(L"\\Registry\\MACHINE\\Software\\Policies\\Microsoft\\Windows\\AppCompat");
46 UNICODE_STRING OptionValue = RTL_CONSTANT_STRING(L"OptionValue");
47 UNICODE_STRING DisableAppCompat = RTL_CONSTANT_STRING(L"DisableAppCompat");
48 UNICODE_STRING DisableEngine = RTL_CONSTANT_STRING(L"DisableEngine");
52
53 /*
54 * This is a TROOLEAN, -1 means we haven't yet figured it out.
55 * 0 means shims are enabled, and 1 means shims are disabled!
56 */
57 if (g_ShimsDisabled == -1)
58 {
59 ULONG DisableShims = FALSE;
60
61 /* Open the safe mode key */
62 Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &OptionKeyAttributes);
63 if (NT_SUCCESS(Status))
64 {
65 /* Check if this is safemode */
67 &OptionValue,
69 &KeyInfo,
70 sizeof(KeyInfo),
73 if ((NT_SUCCESS(Status)) &&
74 (KeyInfo.Type == REG_DWORD) &&
75 (KeyInfo.DataLength == sizeof(ULONG)) &&
76 (KeyInfo.Data[0] != FALSE))
77 {
78 /* It is, so disable shims! */
79 DisableShims = TRUE;
80 }
81 }
82
83 if (!DisableShims)
84 {
85 /* Open the app compatibility engine settings key */
87 if (NT_SUCCESS(Status))
88 {
89 /* Check if the app compat engine is turned off */
91 &DisableAppCompat,
93 &KeyInfo,
94 sizeof(KeyInfo),
97 if ((NT_SUCCESS(Status)) &&
98 (KeyInfo.Type == REG_DWORD) &&
99 (KeyInfo.DataLength == sizeof(ULONG)) &&
100 (KeyInfo.Data[0] == TRUE))
101 {
102 /* It is, so disable shims! */
103 DisableShims = TRUE;
104 }
105 }
106 }
107 if (!DisableShims)
108 {
109 /* Finally, open the app compatibility policy key */
110 Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &PolicyKeyAttributes);
111 if (NT_SUCCESS(Status))
112 {
113 /* Check if the system policy disables app compat */
115 &DisableEngine,
117 &KeyInfo,
118 sizeof(KeyInfo),
119 &ResultLength);
121 if ((NT_SUCCESS(Status)) &&
122 (KeyInfo.Type == REG_DWORD) &&
123 (KeyInfo.DataLength == sizeof(ULONG)) &&
124 (KeyInfo.Data[0] == TRUE))
125 {
126 /* It does, so disable shims! */
127 DisableShims = TRUE;
128 }
129 }
130 }
131 g_ShimsDisabled = DisableShims;
132 }
133
134 /* Return if shims are disabled or not ("Enabled == 1" means disabled!) */
135 return g_ShimsDisabled ? TRUE : FALSE;
136}
137
138/*
139 * @unimplemented
140 */
141BOOL
146 _In_ BOOL bUnknown,
147 _Out_opt_ PULONG pdwReason)
148{
149 DPRINT("fixme:(%S, %p, %S, %d, %p)\n", ApplicationName, FileHandle, Environment, bUnknown,
150 pdwReason);
151 return FALSE;
152}
153
154/*
155 * @implemented
156 */
157BOOL
161{
164 Lookup.ImageHandle = FileHandle;
166}
167
168/*
169 * @unimplemented
170 */
171BOOL
174{
175 return FALSE;
176}
177
178/*
179 * @unimplemented
180 */
181BOOL
184{
185 return FALSE;
186}
187
188/*
189 * @implemented
190 */
191VOID
194{
197 Lookup.ImageHandle = INVALID_HANDLE_VALUE;
199}
200
201/*
202 * @unimplemented
203 */
204BOOL
208{
209 DPRINT("fixme:(%S, %p)\n", ApplicationName, FileHandle);
210
212 return FALSE;
213
216 {
218 return FALSE;
219 }
220
221 return TRUE;
222}
223
224/*
225 * @implemented
226 */
227BOOL
228WINAPI
233 _Out_opt_ PULONG pdwReason)
234{
235 BOOL ret = FALSE;
237
238 DPRINT("(%S, %p, %S, %p)\n", ApplicationName, FileHandle, Environment, pdwReason);
239
240 dwReason = 0;
242 {
243 dwReason |= 2;
244 }
245 else
246 {
248 if (!ret)
249 dwReason |= 1;
250 }
251
252 if (pdwReason)
253 *pdwReason = dwReason;
254
255 return ret;
256}
257
258static
259VOID
261{
264 PVOID ApphelpAddress;
265 PVOID pApphelpCheckRunAppEx = NULL, pSdbPackAppCompatData = NULL;
266
267 RtlInitEmptyUnicodeString(&DllPath, Buffer, sizeof(Buffer));
269 RtlAppendUnicodeToString(&DllPath, L"\\system32\\apphelp.dll");
270
271 if (NT_SUCCESS(LdrLoadDll(NULL, NULL, &DllPath, &ApphelpAddress)))
272 {
273 ANSI_STRING ProcName;
274
275 RtlInitAnsiString(&ProcName, "ApphelpCheckRunAppEx");
276 if (!NT_SUCCESS(LdrGetProcedureAddress(ApphelpAddress, &ProcName, 0, &pApphelpCheckRunAppEx)))
277 pApphelpCheckRunAppEx = NULL;
278
279 RtlInitAnsiString(&ProcName, "SdbPackAppCompatData");
280 if (!NT_SUCCESS(LdrGetProcedureAddress(ApphelpAddress, &ProcName, 0, &pSdbPackAppCompatData)))
281 pSdbPackAppCompatData = NULL;
282 }
283
285 {
286 g_pSdbPackAppCompatData = RtlEncodeSystemPointer(pSdbPackAppCompatData);
287 }
288}
289
290/*
291 *
292 */
293BOOL
294WINAPI
299 IN PULONG pReason,
305{
306 ULONG Reason = 0;
307 ULONG64 Flags1 = 0;
308 ULONG Flags2 = 0;
309 BOOL Continue, NeedCleanup = FALSE;
310 tApphelpCheckRunAppEx pApphelpCheckRunAppEx;
311 tSdbPackAppCompatData pSdbPackAppCompatData;
312 PVOID QueryResult = NULL;
313 ULONG QueryResultSize = 0;
314
316 {
319 }
320
321 pApphelpCheckRunAppEx = RtlDecodeSystemPointer(g_pApphelpCheckRunAppEx);
322 pSdbPackAppCompatData = RtlDecodeSystemPointer(g_pSdbPackAppCompatData);
323
324 if (!pApphelpCheckRunAppEx || !pSdbPackAppCompatData)
325 return TRUE;
326
327 if (pReason)
328 Reason = *pReason;
329
330 Continue = pApphelpCheckRunAppEx(FileHandle, NULL, NULL, ApplicationName, Environment, ExeType, &Reason,
331 &QueryResult, &QueryResultSize, SxsData, SxsDataSize, FusionFlags, &Flags1, &Flags2);
332
333 if (pReason)
334 *pReason = Reason;
335
336 if (Continue)
337 {
339 {
340 if (!pSdbPackAppCompatData(NULL, QueryResult, SdbQueryAppCompatData, SdbQueryAppCompatDataSize))
341 {
342 DPRINT1("SdbPackAppCompatData returned a failure!\n");
343 NeedCleanup = TRUE;
344 }
345 }
346 else
347 {
348 NeedCleanup = TRUE;
349 }
350 }
351
352 if (QueryResult)
353 RtlFreeHeap(RtlGetProcessHeap(), 0, QueryResult);
354
355 if (NeedCleanup)
356 {
361 *SxsData = NULL;
362 if (SxsDataSize)
363 *SxsDataSize = 0;
364 }
365
366 return Continue;
367}
368
369/*
370 * @implemented
371 */
373WINAPI
383{
385 ULONG Reason = 0;
386
387 /* Is shimming enabled by group policy? */
389 {
390 /* Nothing to worry about */
392 }
393 else
394 {
395 /* It is, check if we know about this app */
399 &Reason))
400 {
403 {
405 }
406 }
407 }
408
409 /* Return caller the status */
410 return Status;
411}
412
413/*
414 * @implemented
415 */
416BOOL
417WINAPI
419{
421
423 return NT_SUCCESS(Status);
424}
425
426/*
427 * @implemented
428 */
429BOOL
430WINAPI
432{
434
436 return NT_SUCCESS(Status);
437}
438
439/*
440 * @implemented
441 */
442VOID
443WINAPI
445 IN PVOID AppCompatSxsData)
446{
447 /* Free the input pointers if present */
448 if (AppCompatData) RtlFreeHeap(RtlGetProcessHeap(), 0, AppCompatData);
449 if (AppCompatSxsData) RtlFreeHeap(RtlGetProcessHeap(), 0, AppCompatSxsData);
450}
451
452/*
453 * @unimplemented
454 */
455VOID
456WINAPI
458 ULONG Unknown2,
460{
461 STUB;
462}
463
464/*
465 * @unimplemented
466 */
468WINAPI
470{
471 STUB;
473}
474
475/*
476 * @unimplemented
477 */
479WINAPI
481{
482 STUB;
484}
485
486/*
487 * @unimplemented
488 */
489BOOL
490WINAPI
492{
493 STUB;
494 return FALSE;
495}
496
497/*
498 * @unimplemented
499 */
500BOOL
501WINAPI
503{
504 STUB;
505 return FALSE;
506}
507
508/*
509 * @unimplemented
510 */
511PVOID
512WINAPI
514{
515 STUB;
516 return NULL;
517}
518
519/*
520 * @implemented
521 */
522BOOL
523WINAPI
525{
527
528 DPRINT("(0x%X)\n", ComPlusPackage);
529
530 if (ComPlusPackage & ~1)
531 {
532 DPRINT1("0x%lX\n", ComPlusPackage);
534 return FALSE;
535 }
536
537 Status = NtSetSystemInformation(SystemComPlusPackage, &ComPlusPackage, sizeof(ComPlusPackage));
538 if (!NT_SUCCESS(Status))
539 {
540 DPRINT1("0x%lX\n", Status);
542 return FALSE;
543 }
544
545 return TRUE;
546}
547
548/*
549 * @unimplemented
550 */
551VOID
552WINAPI
554{
555 STUB;
556}
557
558/*
559 * @unimplemented
560 */
561BOOL
562WINAPI
564{
565 STUB;
566 return FALSE;
567}
NTSYSAPI NTSTATUS NTAPI NtSetSystemInformation(IN INT SystemInformationClass, IN PVOID SystemInformation, IN ULONG SystemInformationLength)
unsigned char BOOLEAN
BOOL WINAPI BaseInitAppcompatCache(VOID)
Definition: appcache.c:491
BOOL WINAPI BaseCheckAppcompatCache(_In_ PCWSTR ApplicationName, _In_ HANDLE FileHandle, _In_opt_ PCWSTR Environment, _Out_opt_ PULONG pdwReason)
Definition: appcache.c:229
static PVOID g_pSdbPackAppCompatData
Definition: appcache.c:21
VOID WINAPI SetTermsrvAppInstallMode(IN BOOL bInstallMode)
Definition: appcache.c:553
VOID BasepShimCacheRemoveEntry(_In_ PCWSTR ApplicationName)
Definition: appcache.c:192
BOOL WINAPI BaseInitAppcompatCacheSupport(VOID)
Definition: appcache.c:502
ULONG g_ShimsDisabled
Definition: appcache.c:18
BOOL(WINAPI * tApphelpCheckRunAppEx)(HANDLE FileHandle, PVOID Unk1, PVOID Unk2, PWCHAR ApplicationName, PVOID Environment, USHORT ExeType, PULONG Reason, PVOID *SdbQueryAppCompatData, PULONG SdbQueryAppCompatDataSize, PVOID *SxsData, PULONG SxsDataSize, PULONG FusionFlags, PULONG64 SomeFlag1, PULONG SomeFlag2)
Definition: appcache.c:23
#define APPHELP_VALID_RESULT
Definition: appcache.c:28
BOOL WINAPI BaseCheckRunApp(IN HANDLE FileHandle, IN PWCHAR ApplicationName, IN PWCHAR Environment, IN USHORT ExeType, IN PULONG pReason, IN PVOID *SdbQueryAppCompatData, IN PULONG SdbQueryAppCompatDataSize, IN PVOID *SxsData, IN PULONG SxsDataSize, OUT PULONG FusionFlags)
Definition: appcache.c:295
BOOL BasepShimCacheSearch(_In_ PCWSTR ApplicationName, _In_ HANDLE FileHandle)
Definition: appcache.c:158
BOOL BasepShimCacheCheckBypass(_In_ PCWSTR ApplicationName, _In_ HANDLE FileHandle, _In_opt_ PCWSTR Environment, _In_ BOOL bUnknown, _Out_opt_ PULONG pdwReason)
Definition: appcache.c:142
static VOID BaseInitApphelp(VOID)
Definition: appcache.c:260
NTSTATUS WINAPI BasepCheckBadapp(IN HANDLE FileHandle, IN PWCHAR ApplicationName, IN PWCHAR Environment, IN USHORT ExeType, IN PVOID *SdbQueryAppCompatData, IN PULONG SdbQueryAppCompatDataSize, IN PVOID *SxsData, IN PULONG SxsDataSize, OUT PULONG FusionFlags)
Definition: appcache.c:374
BOOL WINAPI BaseDumpAppcompatCache(VOID)
Definition: appcache.c:418
BOOL BasepCheckCacheExcludeCustom(_In_ PCWSTR ApplicationName)
Definition: appcache.c:182
BOOL WINAPI SetComPlusPackageInstallStatus(IN ULONG ComPlusPackage)
Definition: appcache.c:524
BOOLEAN WINAPI IsShimInfrastructureDisabled(VOID)
Definition: appcache.c:37
VOID WINAPI BasepFreeAppCompatData(IN PVOID AppCompatData, IN PVOID AppCompatSxsData)
Definition: appcache.c:444
NTSTATUS WINAPI BaseCleanupAppcompatCache(VOID)
Definition: appcache.c:469
static PVOID g_pApphelpCheckRunAppEx
Definition: appcache.c:20
static BOOL g_ApphelpInitialized
Definition: appcache.c:19
NTSTATUS WINAPI BaseCleanupAppcompatCacheSupport(PVOID pUnknown)
Definition: appcache.c:480
PVOID WINAPI GetComPlusPackageInstallStatus(VOID)
Definition: appcache.c:513
VOID WINAPI BaseUpdateAppcompatCache(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
Definition: appcache.c:457
BOOL(WINAPI * tSdbPackAppCompatData)(PVOID hsdb, PVOID pQueryResult, PVOID *ppData, DWORD *dwSize)
Definition: appcache.c:26
BOOL WINAPI TermsrvAppInstallMode(VOID)
Definition: appcache.c:563
#define APPHELP_RESULT_FOUND
Definition: appcache.c:30
BOOL WINAPI BaseFlushAppcompatCache(VOID)
Definition: appcache.c:431
BOOL BasepCheckCacheExcludeList(_In_ PCWSTR ApplicationName)
Definition: appcache.c:172
BOOL BasepShimCacheLookup(_In_ PCWSTR ApplicationName, _In_ HANDLE FileHandle)
Definition: appcache.c:205
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
DWORD dwReason
Definition: misc.cpp:141
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
Definition: bufpool.h:45
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:37
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
UNICODE_STRING BaseWindowsDirectory
Definition: path.c:20
static void Lookup(RTF_Info *, char *)
Definition: reader.c:2228
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
Definition: string_lib.cpp:62
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
localAdvHdr Flags2
Definition: fsrtlfuncs.h:1692
Status
Definition: gdiplustypes.h:25
@ ApphelpCacheServiceLookup
Definition: pstypes.h:974
@ ApphelpCacheServiceRemove
Definition: pstypes.h:975
@ ApphelpCacheServiceDump
Definition: pstypes.h:978
@ ApphelpCacheServiceFlush
Definition: pstypes.h:977
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define STUB
Definition: kernel32.h:27
NTSTATUS NTAPI DECLSPEC_HOTPATCH LdrLoadDll(_In_opt_ PWSTR SearchPath, _In_opt_ PULONG DllCharacteristics, _In_ PUNICODE_STRING DllName, _Out_ PVOID *BaseAddress)
Definition: ldrapi.c:312
NTSTATUS NTAPI LdrGetProcedureAddress(_In_ PVOID BaseAddress, _In_opt_ _When_(Ordinal==0, _Notnull_) PANSI_STRING Name, _In_opt_ _When_(Name==NULL, _In_range_(>, 0)) ULONG Ordinal, _Out_ PVOID *ProcedureAddress)
Definition: ldrapi.c:789
static IN LPSTR IN PVOID Unk2
Definition: ldrinit.c:47
static IN LPSTR Unk1
Definition: ldrinit.c:47
unsigned __int64 * PULONG64
Definition: imports.h:198
unsigned __int64 ULONG64
Definition: imports.h:198
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG PULONG PULONG64 PULONG SomeFlag2
Definition: env.c:49
LPCWSTR LPCWSTR LPCWSTR DWORD PSDBQUERYRESULT_VISTA pQueryResult
Definition: env.c:37
PVOID PVOID PWCHAR PVOID USHORT ExeType
Definition: env.c:47
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
Definition: env.c:47
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID * SdbQueryAppCompatData
Definition: env.c:48
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG SxsDataSize
Definition: env.c:48
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG PULONG PULONG64 SomeFlag1
Definition: env.c:49
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID * SxsData
Definition: env.c:48
PSDBQUERYRESULT_VISTA PVOID * ppData
Definition: env.c:56
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG PULONG FusionFlags
Definition: env.c:49
PVOID PVOID PWCHAR PVOID Environment
Definition: env.c:47
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG SdbQueryAppCompatDataSize
Definition: env.c:48
PVOID PVOID PWCHAR ApplicationName
Definition: env.c:47
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static const char const char * DllPath
Definition: image.c:34
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4715
@ SystemComPlusPackage
Definition: extypes.h:276
#define _Out_opt_
Definition: no_sal2.h:214
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define BOOL
Definition: nt_native.h:43
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: ntapi.c:336
@ KeyValuePartialInformation
Definition: nt_native.h:1182
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
NTSTATUS NTAPI NtApphelpCacheControl(_In_ APPHELPCACHESERVICECLASS Service, _In_opt_ PAPPHELP_CACHE_SERVICE_LOOKUP ServiceData)
Definition: apphelp.c:728
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
#define REG_DWORD
Definition: sdbapi.c:596
PVOID NTAPI RtlEncodeSystemPointer(IN PVOID Pointer)
Definition: process.c:429
PVOID NTAPI RtlDecodeSystemPointer(IN PVOID Pointer)
Definition: process.c:439
#define STATUS_SUCCESS
Definition: shellext.h:65
OBJECT_ATTRIBUTES AppCompatKeyAttributes
Definition: shimdbg.c:228
#define DPRINT
Definition: sndvol32.h:73
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
int ret
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
#define WINAPI
Definition: msvc.h:6
__wchar_t WCHAR
Definition: xmlstorage.h:180