ReactOS 0.4.15-dev-8434-g155a7c7
apphelp.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Application compatibility module
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: apphelp entrypoint / generic interface functions
5 * COPYRIGHT: Copyright 2011 André Hentschel
6 * Copyright 2013 Mislav Blaževic
7 * Copyright 2015-2019 Mark Jansen (mark.jansen@reactos.org)
8 */
9
10#define WIN32_NO_STATUS
11#include "windef.h"
12#include "winbase.h"
13#include "winreg.h"
14#include "strsafe.h"
15#include "apphelp.h"
16#include <ndk/rtlfuncs.h>
17#include <ndk/cmfuncs.h>
18#include <ndk/obfuncs.h>
19#include <ndk/kdtypes.h>
20
21
23
24const UNICODE_STRING InstalledSDBKeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\InstalledSDB");
25
26/* from dpfilter.h */
27#define DPFLTR_APPCOMPAT_ID 123
28
29#define MAX_GUID_STRING_LEN RTL_NUMBER_OF("{12345678-1234-1234-0123-456789abcdef}")
30C_ASSERT(MAX_GUID_STRING_LEN == 39); // See psdk/cfgmgr32.h
31
32#ifndef NT_SUCCESS
33#define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0)
34#endif
35
38
40{
41 static const UNICODE_STRING DebugKey = RTL_CONSTANT_STRING(L"SHIM_DEBUG_LEVEL");
42 UNICODE_STRING DebugValue;
44 ULONG NewLevel = SHIM_ERR;
45 WCHAR Buffer[40];
46
47 RtlInitEmptyUnicodeString(&DebugValue, Buffer, sizeof(Buffer));
48
49 Status = RtlQueryEnvironmentVariable_U(NULL, &DebugKey, &DebugValue);
50
51 if (NT_SUCCESS(Status))
52 {
53 if (!NT_SUCCESS(RtlUnicodeStringToInteger(&DebugValue, 10, &NewLevel)))
54 NewLevel = SHIM_ERR;
55 }
56 g_ShimDebugLevel = NewLevel;
57}
58
59
61{
62 switch (reason)
63 {
68 break;
71 break;
72 }
73 return TRUE;
74}
75
77{
78 SHIM_WARN("stub: ptr=%p, path='%S'\n", ptr, path);
79 return TRUE;
80}
81
82
83BOOL WINAPI ApphelpCheckShellObject(REFCLSID ObjectCLSID, BOOL bShimIfNecessary, ULONGLONG *pullFlags)
84{
86 if (!ObjectCLSID || !SdbGUIDToString(ObjectCLSID, GuidString, RTL_NUMBER_OF(GuidString)))
87 GuidString[0] = L'\0';
88 SHIM_WARN("stub: ObjectCLSID='%S', bShimIfNecessary=%d, pullFlags=%p)\n", GuidString, bShimIfNecessary, pullFlags);
89
90 if (pullFlags)
91 *pullFlags = 0;
92
93 return TRUE;
94}
95
108{
109 char Buffer[512];
110 va_list ArgList;
111 char* Current = Buffer;
112 const char* LevelStr;
113 size_t Length = sizeof(Buffer);
114
115 if (g_ShimDebugLevel == ~0)
117
119 return FALSE;
120
121 switch (Level)
122 {
123 case SHIM_ERR:
124 LevelStr = "Err ";
126 break;
127 case SHIM_WARN:
128 LevelStr = "Warn";
130 break;
131 case SHIM_INFO:
132 LevelStr = "Info";
134 break;
135 default:
136 LevelStr = "User";
138 break;
139 }
140 StringCchPrintfExA(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, "[%s][%-20s] ", LevelStr, FunctionName);
141
142 va_start(ArgList, Format);
143 StringCchVPrintfExA(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, Format, ArgList);
144 va_end(ArgList);
145
146#if defined(APPCOMPAT_USE_DBGPRINTEX) && APPCOMPAT_USE_DBGPRINTEX
148#else
149 DbgPrint("%s", Buffer);
150 return TRUE;
151#endif
152}
153
154
155#define APPHELP_DONTWRITE_REASON 2
156#define APPHELP_CLEARBITS 0x100 /* TODO: Investigate */
157#define APPHELP_IGNORE_ENVIRONMENT 0x400
158
159#define APPHELP_VALID_RESULT 0x10000
160#define APPHELP_RESULT_NOTFOUND 0x20000
161#define APPHELP_RESULT_FOUND 0x40000
162
183BOOL
184WINAPI
200{
202 HSDB hsdb = NULL;
203 DWORD dwFlags = 0;
204
205 if (SxsData)
206 *SxsData = NULL;
207 if (SxsDataSize)
208 *SxsDataSize = 0;
209 if (FusionFlags)
210 *FusionFlags = 0;
211 if (SomeFlag1)
212 *SomeFlag1 = 0;
213 if (SomeFlag2)
214 *SomeFlag2 = 0;
215 if (Reason)
216 dwFlags = *Reason;
217
218 dwFlags &= ~APPHELP_CLEARBITS;
219
222 *SdbQueryAppCompatDataSize = sizeof(*result);
223
224
226 if (hsdb)
227 {
228 BOOL FoundMatch;
229 DWORD MatchingExeFlags = 0;
230
232 MatchingExeFlags |= SDBGMEF_IGNORE_ENVIRONMENT;
233
234 FoundMatch = SdbGetMatchingExe(hsdb, ApplicationName, NULL, Environment, MatchingExeFlags, result);
236 {
239 }
240
241 SdbReleaseDatabase(hsdb);
242 }
243
245 *Reason = dwFlags;
246
247
248 /* We should _ALWAYS_ return TRUE here, unless we want to block an application from starting! */
249 return TRUE;
250}
251
252
266{
267 PDB pdb;
269 WCHAR GuidBuffer[MAX_GUID_STRING_LEN];
271 ACCESS_MASK KeyAccess;
274 HANDLE InstalledSDBKey;
275
277 if (!pdb)
278 {
279 SHIM_ERR("Unable to open DB %S\n", pszDatabasePath);
280 return FALSE;
281 }
282
285 {
286 SHIM_ERR("Unable to retrieve DB info\n");
288 return FALSE;
289 }
290
291 if (!SdbGUIDToString(&Information.Id, GuidBuffer, RTL_NUMBER_OF(GuidBuffer)))
292 {
293 SHIM_ERR("Unable to Convert GUID to string\n");
296 return FALSE;
297 }
298
301 Status = NtCreateKey(&InstalledSDBKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL);
302 if (NT_SUCCESS(Status))
303 {
304 HANDLE DbKey;
305
306 RtlInitUnicodeString(&KeyName, GuidBuffer);
307 ObjectKey.RootDirectory = InstalledSDBKey;
308
309 Status = NtCreateKey(&DbKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL);
310 if (NT_SUCCESS(Status))
311 {
312 UNICODE_STRING DatabasePathKey = RTL_CONSTANT_STRING(L"DatabasePath");
313 UNICODE_STRING DatabaseInstallTimeStampKey = RTL_CONSTANT_STRING(L"DatabaseInstallTimeStamp");
314 UNICODE_STRING DatabaseTypeKey = RTL_CONSTANT_STRING(L"DatabaseType");
315 UNICODE_STRING DatabaseDescriptionKey = RTL_CONSTANT_STRING(L"DatabaseDescription");
316
317 Status = NtSetValueKey(DbKey, &DatabasePathKey, 0, REG_SZ,
319 if (!NT_SUCCESS(Status))
320 SHIM_ERR("Unable to write %wZ\n", &DatabasePathKey);
321
322 if (NT_SUCCESS(Status))
323 {
324 ULARGE_INTEGER ulTimeStamp;
325 if (pTimeStamp)
326 {
327 ulTimeStamp.QuadPart = *pTimeStamp;
328 }
329 else
330 {
331 FILETIME fi;
333 ulTimeStamp.LowPart = fi.dwLowDateTime;
334 ulTimeStamp.HighPart = fi.dwHighDateTime;
335 }
336 Status = NtSetValueKey(DbKey, &DatabaseInstallTimeStampKey, 0, REG_QWORD,
337 &ulTimeStamp.QuadPart, sizeof(ulTimeStamp));
338 if (!NT_SUCCESS(Status))
339 SHIM_ERR("Unable to write %wZ\n", &DatabaseInstallTimeStampKey);
340 }
341
342 if (NT_SUCCESS(Status))
343 {
344 Status = NtSetValueKey(DbKey, &DatabaseTypeKey, 0, REG_DWORD,
346 if (!NT_SUCCESS(Status))
347 SHIM_ERR("Unable to write %wZ\n", &DatabaseTypeKey);
348 }
349
350 if (NT_SUCCESS(Status) && Information.Description)
351 {
352 Status = NtSetValueKey(DbKey, &DatabaseDescriptionKey, 0, REG_SZ,
353 (PVOID)Information.Description, ((ULONG)wcslen(Information.Description) + 1) * sizeof(WCHAR));
354 if (!NT_SUCCESS(Status))
355 SHIM_ERR("Unable to write %wZ\n", &DatabaseDescriptionKey);
356 }
357
358 NtClose(DbKey);
359
360 if (NT_SUCCESS(Status))
361 {
362 SHIM_INFO("Installed %wS as %wZ\n", pszDatabasePath, &KeyName);
363 }
364 }
365 else
366 {
367 SHIM_ERR("Unable to create key %wZ\n", &KeyName);
368 }
369
370 NtClose(InstalledSDBKey);
371 }
372 else
373 {
374 SHIM_ERR("Unable to create key %wZ\n", &KeyName);
375 }
376
379
380 return NT_SUCCESS(Status);
381}
382
383
395{
397}
398
399
408{
409 WCHAR KeyBuffer[MAX_PATH], GuidBuffer[MAX_GUID_STRING_LEN];
411 ACCESS_MASK KeyAccess;
414 HANDLE DbKey;
415
416 if (!SdbGUIDToString(pguidDB, GuidBuffer, RTL_NUMBER_OF(GuidBuffer)))
417 {
418 SHIM_ERR("Unable to Convert GUID to string\n");
419 return FALSE;
420 }
421
422 RtlInitEmptyUnicodeString(&KeyName, KeyBuffer, sizeof(KeyBuffer));
425 RtlAppendUnicodeToString(&KeyName, GuidBuffer);
426
427 KeyAccess = Wow64QueryFlag() | DELETE;
428 Status = NtCreateKey(&DbKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL);
429 if (!NT_SUCCESS(Status))
430 {
431 SHIM_ERR("Unable to open %wZ\n", &KeyName);
432 return FALSE;
433 }
434
435 Status = NtDeleteKey(DbKey);
436 if (!NT_SUCCESS(Status))
437 SHIM_ERR("Unable to delete %wZ\n", &KeyName);
438
439 NtClose(DbKey);
440 return NT_SUCCESS(Status);
441}
442
443
444/* kernel32.dll */
447
448
460{
461 return BaseDumpAppcompatCache();
462}
463
475{
477}
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1279
#define SDB_DATABASE_MAIN_SHIM
Definition: apphelp.h:24
#define DB_INFO_FLAGS_VALID_GUID
Definition: apphelp.h:79
BOOL WINAPI SdbGetDatabaseInformation(PDB pdb, PDB_INFORMATION information)
Definition: sdbapi.c:502
BOOL WINAPI SdbGetMatchingExe(HSDB hsdb, LPCWSTR path, LPCWSTR module_name, LPCWSTR env, DWORD flags, PSDBQUERYRESULT result)
Definition: hsdb.c:439
#define HID_DOS_PATHS
Definition: apphelp.h:19
void WINAPI SdbReleaseDatabase(HSDB)
Definition: hsdb.c:417
BOOL WINAPI SdbGUIDToString(CONST GUID *Guid, PWSTR GuidString, SIZE_T Length)
Definition: sdbapi.c:412
PDB WINAPI SdbOpenDatabase(LPCWSTR path, PATH_TYPE type)
Definition: sdbapi.c:329
#define SDBGMEF_IGNORE_ENVIRONMENT
Definition: apphelp.h:62
VOID WINAPI SdbFreeDatabaseInformation(PDB_INFORMATION information)
Definition: sdbapi.c:527
HSDB WINAPI SdbInitDatabase(DWORD, LPCWSTR)
Definition: hsdb.c:369
void WINAPI SdbCloseDatabase(PDB)
Definition: sdbapi.c:373
#define DPFLTR_ERROR_LEVEL
Definition: main.cpp:32
LONG NTSTATUS
Definition: precomp.h:26
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
HINSTANCE hInstance
Definition: charmap.c:19
Definition: bufpool.h:45
static PDB pdb
Definition: db.cpp:172
#define DOS_PATH
Definition: db.cpp:32
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPIV ShimDbgPrint(SHIM_LOG_LEVEL Level, PCSTR FunctionName, PCSTR Format,...)
Definition: apphelp.c:107
#define APPHELP_IGNORE_ENVIRONMENT
Definition: apphelp.c:157
const UNICODE_STRING InstalledSDBKeyName
Definition: apphelp.c:24
BOOL WINAPI SdbUnregisterDatabase(_In_ const GUID *pguidDB)
Definition: apphelp.c:407
ULONG g_ShimDebugLevel
Definition: apphelp.c:36
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
Definition: apphelp.c:60
BOOL WINAPI ApphelpCheckShellObject(REFCLSID ObjectCLSID, BOOL bShimIfNecessary, ULONGLONG *pullFlags)
Definition: apphelp.c:83
#define APPHELP_VALID_RESULT
Definition: apphelp.c:159
#define DPFLTR_APPCOMPAT_ID
Definition: apphelp.c:27
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
BOOL WINAPI ApphelpCheckRunAppEx(_In_ HANDLE FileHandle, _In_opt_ PVOID Unk1, _In_opt_ PVOID Unk2, _In_opt_z_ PCWSTR ApplicationName, _In_opt_ PVOID Environment, _In_opt_ USHORT ExeType, _Inout_opt_ PULONG Reason, _Out_opt_ PVOID *SdbQueryAppCompatData, _Out_opt_ PULONG SdbQueryAppCompatDataSize, _Out_opt_ PVOID *SxsData, _Out_opt_ PULONG SxsDataSize, _Out_opt_ PULONG FusionFlags, _Out_opt_ PULONG64 SomeFlag1, _Out_opt_ PULONG SomeFlag2)
Definition: apphelp.c:185
#define APPHELP_RESULT_NOTFOUND
Definition: apphelp.c:160
BOOL WINAPI SdbRegisterDatabase(_In_ LPCWSTR pszDatabasePath, _In_ DWORD dwDatabaseType)
Definition: apphelp.c:392
BOOL WINAPI BaseDumpAppcompatCache(VOID)
Definition: appcache.c:418
BOOL WINAPI SdbRegisterDatabaseEx(_In_ LPCWSTR pszDatabasePath, _In_ DWORD dwDatabaseType, _In_opt_ const PULONGLONG pTimeStamp)
Definition: apphelp.c:262
#define APPHELP_DONTWRITE_REASON
Definition: apphelp.c:155
#define MAX_GUID_STRING_LEN
Definition: apphelp.c:29
BOOL WINAPI ShimDumpCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow)
Definition: apphelp.c:459
void ApphelppInitDebugLevel(void)
Definition: apphelp.c:39
BOOL WINAPI ShimFlushCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow)
Definition: apphelp.c:474
HMODULE g_hInstance
Definition: apphelp.c:37
BOOL WINAPI ApphelpCheckInstallShieldPackage(void *ptr, LPCWSTR path)
Definition: apphelp.c:76
#define APPHELP_RESULT_FOUND
Definition: apphelp.c:161
BOOL WINAPI BaseFlushAppcompatCache(VOID)
Definition: appcache.c:431
ACCESS_MASK Wow64QueryFlag(void)
Definition: layer.c:179
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
r reserved
Definition: btrfs.c:3006
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
Status
Definition: gdiplustypes.h:25
GLuint64EXT * result
Definition: glext.h:11304
#define DbgPrint
Definition: hal.h:12
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define C_ASSERT(e)
Definition: intsafe.h:73
#define REG_SZ
Definition: layer.c:22
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
static PWSTR GuidString
Definition: apphelp.c:93
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG PULONG PULONG64 PULONG SomeFlag2
Definition: env.c:49
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
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
LPCWSTR pszDatabasePath
Definition: env.c:38
PVOID PVOID PWCHAR ApplicationName
Definition: env.c:47
static PVOID ptr
Definition: dispmode.c:27
static HINSTANCE hinst
Definition: edit.c:551
#define _Out_opt_
Definition: ms_sal.h:346
#define _In_opt_z_
Definition: ms_sal.h:314
#define _Inout_opt_
Definition: ms_sal.h:379
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define DPFLTR_WARNING_LEVEL
Definition: kdtypes.h:31
#define DPFLTR_INFO_LEVEL
Definition: kdtypes.h:33
#define DPFLTR_MASK
Definition: kdtypes.h:34
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
NTSYSAPI NTSTATUS NTAPI RtlQueryEnvironmentVariable_U(_In_opt_ PWSTR Environment, _In_ PCUNICODE_STRING Name, _Out_ PUNICODE_STRING Value)
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
Definition: ntapi.c:859
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
ULONG ACCESS_MASK
Definition: nt_native.h:40
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
#define DELETE
Definition: nt_native.h:57
#define KEY_WRITE
Definition: nt_native.h:1031
NTSTATUS NTAPI NtDeleteKey(IN HANDLE KeyHandle)
Definition: ntapi.c:408
NTSTATUS NTAPI NtCreateKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class OPTIONAL, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
Definition: ntapi.c:240
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:383
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define RTL_INIT_OBJECT_ATTRIBUTES(n, a)
#define STRSAFE_NULL_ON_FAILURE
Definition: ntstrsafe.h:34
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
#define REFCLSID
Definition: guiddef.h:117
DWORD dwDatabaseType
Definition: register.cpp:75
DWORD const PULONGLONG pTimeStamp
Definition: register.cpp:76
#define REG_QWORD
Definition: sdbapi.c:597
void SdbpHeapInit(void)
Definition: sdbapi.c:34
void SdbpHeapDeinit(void)
Definition: sdbapi.c:42
#define REG_DWORD
Definition: sdbapi.c:596
enum _SHIM_LOG_LEVEL SHIM_LOG_LEVEL
#define SHIM_INFO(fmt,...)
Definition: sdbpapi.h:78
#define SHIM_WARN(fmt,...)
Definition: sdbpapi.h:77
#define WINAPIV
Definition: sdbpapi.h:64
#define SHIM_ERR(fmt,...)
Definition: sdbpapi.h:76
STRSAFEAPI StringCchVPrintfExA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCSTR pszFormat, va_list argList)
Definition: strsafe.h:650
STRSAFEAPI StringCchPrintfExA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCSTR pszFormat,...)
Definition: strsafe.h:575
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
HANDLE RootDirectory
Definition: umtypes.h:184
Definition: apphelp.h:30
$ULONG LowPart
Definition: ntbasedef.h:569
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
$ULONG HighPart
Definition: ntbasedef.h:570
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WINAPI
Definition: msvc.h:6
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185