ReactOS 0.4.15-dev-7897-g78dc504
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 sizeof("{12345678-1234-1234-0123-456789abcdef}")
30
31#ifndef NT_SUCCESS
32#define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0)
33#endif
34
37
39{
40 static const UNICODE_STRING DebugKey = RTL_CONSTANT_STRING(L"SHIM_DEBUG_LEVEL");
41 UNICODE_STRING DebugValue;
43 ULONG NewLevel = SHIM_ERR;
44 WCHAR Buffer[40];
45
46 RtlInitEmptyUnicodeString(&DebugValue, Buffer, sizeof(Buffer));
47
48 Status = RtlQueryEnvironmentVariable_U(NULL, &DebugKey, &DebugValue);
49
50 if (NT_SUCCESS(Status))
51 {
52 if (!NT_SUCCESS(RtlUnicodeStringToInteger(&DebugValue, 10, &NewLevel)))
53 NewLevel = SHIM_ERR;
54 }
55 g_ShimDebugLevel = NewLevel;
56}
57
58
60{
61 switch (reason)
62 {
67 break;
70 break;
71 }
72 return TRUE;
73}
74
76{
77 SHIM_WARN("stub: ptr=%p, path='%S'\n", ptr, path);
78 return TRUE;
79}
80
81
82BOOL WINAPI ApphelpCheckShellObject(REFCLSID ObjectCLSID, BOOL bShimIfNecessary, ULONGLONG *pullFlags)
83{
85 if (!ObjectCLSID || !SdbGUIDToString(ObjectCLSID, GuidString, RTL_NUMBER_OF(GuidString)))
86 GuidString[0] = L'\0';
87 SHIM_WARN("stub: ObjectCLSID='%S', bShimIfNecessary=%d, pullFlags=%p)\n", GuidString, bShimIfNecessary, pullFlags);
88
89 if (pullFlags)
90 *pullFlags = 0;
91
92 return TRUE;
93}
94
107{
108 char Buffer[512];
109 va_list ArgList;
110 char* Current = Buffer;
111 const char* LevelStr;
112 size_t Length = sizeof(Buffer);
113
114 if (g_ShimDebugLevel == ~0)
116
118 return FALSE;
119
120 switch (Level)
121 {
122 case SHIM_ERR:
123 LevelStr = "Err ";
125 break;
126 case SHIM_WARN:
127 LevelStr = "Warn";
129 break;
130 case SHIM_INFO:
131 LevelStr = "Info";
133 break;
134 default:
135 LevelStr = "User";
137 break;
138 }
139 StringCchPrintfExA(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, "[%s][%-20s] ", LevelStr, FunctionName);
140
141 va_start(ArgList, Format);
142 StringCchVPrintfExA(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, Format, ArgList);
143 va_end(ArgList);
144
145#if defined(APPCOMPAT_USE_DBGPRINTEX) && APPCOMPAT_USE_DBGPRINTEX
147#else
148 DbgPrint("%s", Buffer);
149 return TRUE;
150#endif
151}
152
153
154#define APPHELP_DONTWRITE_REASON 2
155#define APPHELP_CLEARBITS 0x100 /* TODO: Investigate */
156#define APPHELP_IGNORE_ENVIRONMENT 0x400
157
158#define APPHELP_VALID_RESULT 0x10000
159#define APPHELP_RESULT_NOTFOUND 0x20000
160#define APPHELP_RESULT_FOUND 0x40000
161
182BOOL
183WINAPI
199{
201 HSDB hsdb = NULL;
202 DWORD dwFlags = 0;
203
204 if (SxsData)
205 *SxsData = NULL;
206 if (SxsDataSize)
207 *SxsDataSize = 0;
208 if (FusionFlags)
209 *FusionFlags = 0;
210 if (SomeFlag1)
211 *SomeFlag1 = 0;
212 if (SomeFlag2)
213 *SomeFlag2 = 0;
214 if (Reason)
215 dwFlags = *Reason;
216
217 dwFlags &= ~APPHELP_CLEARBITS;
218
221 *SdbQueryAppCompatDataSize = sizeof(*result);
222
223
225 if (hsdb)
226 {
227 BOOL FoundMatch;
228 DWORD MatchingExeFlags = 0;
229
231 MatchingExeFlags |= SDBGMEF_IGNORE_ENVIRONMENT;
232
233 FoundMatch = SdbGetMatchingExe(hsdb, ApplicationName, NULL, Environment, MatchingExeFlags, result);
235 {
238 }
239
240 SdbReleaseDatabase(hsdb);
241 }
242
244 *Reason = dwFlags;
245
246
247 /* We should _ALWAYS_ return TRUE here, unless we want to block an application from starting! */
248 return TRUE;
249}
250
251
265{
266 PDB pdb;
268 WCHAR GuidBuffer[MAX_GUID_STRING_LEN];
270 ACCESS_MASK KeyAccess;
273 HANDLE InstalledSDBKey;
274
276 if (!pdb)
277 {
278 SHIM_ERR("Unable to open DB %S\n", pszDatabasePath);
279 return FALSE;
280 }
281
284 {
285 SHIM_ERR("Unable to retrieve DB info\n");
287 return FALSE;
288 }
289
290 if (!SdbGUIDToString(&Information.Id, GuidBuffer, RTL_NUMBER_OF(GuidBuffer)))
291 {
292 SHIM_ERR("Unable to Convert GUID to string\n");
295 return FALSE;
296 }
297
300 Status = NtCreateKey(&InstalledSDBKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL);
301 if (NT_SUCCESS(Status))
302 {
303 HANDLE DbKey;
304
305 RtlInitUnicodeString(&KeyName, GuidBuffer);
306 ObjectKey.RootDirectory = InstalledSDBKey;
307
308 Status = NtCreateKey(&DbKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL);
309 if (NT_SUCCESS(Status))
310 {
311 UNICODE_STRING DatabasePathKey = RTL_CONSTANT_STRING(L"DatabasePath");
312 UNICODE_STRING DatabaseInstallTimeStampKey = RTL_CONSTANT_STRING(L"DatabaseInstallTimeStamp");
313 UNICODE_STRING DatabaseTypeKey = RTL_CONSTANT_STRING(L"DatabaseType");
314 UNICODE_STRING DatabaseDescriptionKey = RTL_CONSTANT_STRING(L"DatabaseDescription");
315
316 Status = NtSetValueKey(DbKey, &DatabasePathKey, 0, REG_SZ,
318 if (!NT_SUCCESS(Status))
319 SHIM_ERR("Unable to write %wZ\n", &DatabasePathKey);
320
321 if (NT_SUCCESS(Status))
322 {
323 ULARGE_INTEGER ulTimeStamp;
324 if (pTimeStamp)
325 {
326 ulTimeStamp.QuadPart = *pTimeStamp;
327 }
328 else
329 {
330 FILETIME fi;
332 ulTimeStamp.LowPart = fi.dwLowDateTime;
333 ulTimeStamp.HighPart = fi.dwHighDateTime;
334 }
335 Status = NtSetValueKey(DbKey, &DatabaseInstallTimeStampKey, 0, REG_QWORD,
336 &ulTimeStamp.QuadPart, sizeof(ulTimeStamp));
337 if (!NT_SUCCESS(Status))
338 SHIM_ERR("Unable to write %wZ\n", &DatabaseInstallTimeStampKey);
339 }
340
341 if (NT_SUCCESS(Status))
342 {
343 Status = NtSetValueKey(DbKey, &DatabaseTypeKey, 0, REG_DWORD,
345 if (!NT_SUCCESS(Status))
346 SHIM_ERR("Unable to write %wZ\n", &DatabaseTypeKey);
347 }
348
349 if (NT_SUCCESS(Status) && Information.Description)
350 {
351 Status = NtSetValueKey(DbKey, &DatabaseDescriptionKey, 0, REG_SZ,
352 (PVOID)Information.Description, ((ULONG)wcslen(Information.Description) + 1) * sizeof(WCHAR));
353 if (!NT_SUCCESS(Status))
354 SHIM_ERR("Unable to write %wZ\n", &DatabaseDescriptionKey);
355 }
356
357 NtClose(DbKey);
358
359 if (NT_SUCCESS(Status))
360 {
361 SHIM_INFO("Installed %wS as %wZ\n", pszDatabasePath, &KeyName);
362 }
363 }
364 else
365 {
366 SHIM_ERR("Unable to create key %wZ\n", &KeyName);
367 }
368
369 NtClose(InstalledSDBKey);
370 }
371 else
372 {
373 SHIM_ERR("Unable to create key %wZ\n", &KeyName);
374 }
375
378
379 return NT_SUCCESS(Status);
380}
381
382
394{
396}
397
398
407{
408 WCHAR KeyBuffer[MAX_PATH], GuidBuffer[50];
410 ACCESS_MASK KeyAccess;
413 HANDLE DbKey;
414
415 if (!SdbGUIDToString(pguidDB, GuidBuffer, RTL_NUMBER_OF(GuidBuffer)))
416 {
417 SHIM_ERR("Unable to Convert GUID to string\n");
418 return FALSE;
419 }
420
421 RtlInitEmptyUnicodeString(&KeyName, KeyBuffer, sizeof(KeyBuffer));
424 RtlAppendUnicodeToString(&KeyName, GuidBuffer);
425
426 KeyAccess = Wow64QueryFlag() | DELETE;
427 Status = NtCreateKey(&DbKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL);
428 if (!NT_SUCCESS(Status))
429 {
430 SHIM_ERR("Unable to open %wZ\n", &KeyName);
431 return FALSE;
432 }
433
434 Status = NtDeleteKey(DbKey);
435 if (!NT_SUCCESS(Status))
436 SHIM_ERR("Unable to delete %wZ\n", &KeyName);
437
438 NtClose(DbKey);
439 return NT_SUCCESS(Status);
440}
441
442
443/* kernel32.dll */
446
447
459{
460 return BaseDumpAppcompatCache();
461}
462
474{
476}
#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:106
#define APPHELP_IGNORE_ENVIRONMENT
Definition: apphelp.c:156
const UNICODE_STRING InstalledSDBKeyName
Definition: apphelp.c:24
BOOL WINAPI SdbUnregisterDatabase(_In_ const GUID *pguidDB)
Definition: apphelp.c:406
ULONG g_ShimDebugLevel
Definition: apphelp.c:35
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
Definition: apphelp.c:59
BOOL WINAPI ApphelpCheckShellObject(REFCLSID ObjectCLSID, BOOL bShimIfNecessary, ULONGLONG *pullFlags)
Definition: apphelp.c:82
#define APPHELP_VALID_RESULT
Definition: apphelp.c:158
#define DPFLTR_APPCOMPAT_ID
Definition: apphelp.c:27
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
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:184
#define APPHELP_RESULT_NOTFOUND
Definition: apphelp.c:159
BOOL WINAPI SdbRegisterDatabase(_In_ LPCWSTR pszDatabasePath, _In_ DWORD dwDatabaseType)
Definition: apphelp.c:391
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:261
#define APPHELP_DONTWRITE_REASON
Definition: apphelp.c:154
#define MAX_GUID_STRING_LEN
Definition: apphelp.c:29
BOOL WINAPI ShimDumpCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow)
Definition: apphelp.c:458
void ApphelppInitDebugLevel(void)
Definition: apphelp.c:38
BOOL WINAPI ShimFlushCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow)
Definition: apphelp.c:473
HMODULE g_hInstance
Definition: apphelp.c:36
BOOL WINAPI ApphelpCheckInstallShieldPackage(void *ptr, LPCWSTR path)
Definition: apphelp.c:75
#define APPHELP_RESULT_FOUND
Definition: apphelp.c:160
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 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