ReactOS  0.4.13-dev-455-g28ed234
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 
24 const 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  {
63  case DLL_PROCESS_ATTACH:
66  SdbpHeapInit();
67  break;
68  case DLL_PROCESS_DETACH:
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 
82 BOOL 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 
117  if (Level > g_ShimDebugLevel)
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 
182 BOOL
183 WINAPI
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 
218 
219  *SdbQueryAppCompatData = result = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SDBQUERYRESULT));
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,
317  (PVOID)pszDatabasePath, ((ULONG)wcslen(pszDatabasePath) + 1) * sizeof(WCHAR));
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,
344  &dwDatabaseType, sizeof(dwDatabaseType));
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 {
475  return BaseFlushAppcompatCache();
476 }
ACCESS_MASK Wow64QueryFlag(void)
Definition: layer.c:179
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4711
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static PWSTR GuidString
Definition: apphelp.c:91
PVOID PVOID PWCHAR PVOID Environment
Definition: env.c:45
#define APPHELP_DONTWRITE_REASON
Definition: apphelp.c:154
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
#define _In_opt_z_
Definition: no_sal2.h:221
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG PULONG FusionFlags
Definition: env.c:45
#define TRUE
Definition: types.h:120
#define SDBGMEF_IGNORE_ENVIRONMENT
Definition: apphelp.h:59
#define RTL_INIT_OBJECT_ATTRIBUTES(n, a)
static PDB pdb
Definition: db.cpp:170
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
BOOL WINAPI BaseFlushAppcompatCache(VOID)
Definition: appcache.c:329
void SdbpHeapDeinit(void)
Definition: sdbapi.c:42
enum _SHIM_LOG_LEVEL SHIM_LOG_LEVEL
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define DbgPrint
Definition: loader.c:25
static IN LPSTR IN PVOID Unk2
Definition: ldrinit.c:47
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
#define INVALID_HANDLE_VALUE
Definition: apphelp.c:45
void SdbpHeapInit(void)
Definition: sdbapi.c:34
#define REFCLSID
Definition: guiddef.h:112
#define DPFLTR_INFO_LEVEL
Definition: kdtypes.h:33
HSDB WINAPI SdbInitDatabase(DWORD, LPCWSTR)
Definition: hsdb.c:369
LONG NTSTATUS
Definition: precomp.h:26
#define DPFLTR_MASK
Definition: kdtypes.h:34
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
$ULONG LowPart
Definition: ntbasedef.h:576
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
BOOL WINAPI SdbGetMatchingExe(HSDB hsdb, LPCWSTR path, LPCWSTR module_name, LPCWSTR env, DWORD flags, PSDBQUERYRESULT result)
Definition: hsdb.c:439
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
#define APPHELP_CLEARBITS
Definition: apphelp.c:155
uint16_t * PWCHAR
Definition: typedefs.h:54
STRSAFEAPI StringCchPrintfExA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCSTR pszFormat,...)
Definition: strsafe.h:575
VOID WINAPI SdbFreeDatabaseInformation(PDB_INFORMATION information)
Definition: sdbapi.c:527
#define DPFLTR_WARNING_LEVEL
Definition: kdtypes.h:31
#define _In_opt_
Definition: no_sal2.h:213
Definition: apphelp.h:27
#define SDB_DATABASE_MAIN_SHIM
Definition: apphelp.h:24
DWORD const PULONGLONG pTimeStamp
Definition: register.cpp:76
HANDLE FileHandle
Definition: stats.c:38
DWORD dwHighDateTime
Definition: mapidefs.h:66
HINSTANCE hInstance
Definition: charmap.c:20
#define va_end(ap)
Definition: acmsvcex.h:90
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG PULONG PULONG64 SomeFlag1
Definition: env.c:45
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI ApphelpCheckShellObject(REFCLSID ObjectCLSID, BOOL bShimIfNecessary, ULONGLONG *pullFlags)
Definition: apphelp.c:82
LPCWSTR pszDatabasePath
Definition: env.c:36
static PVOID ptr
Definition: dispmode.c:27
r reserved
Definition: btrfs.c:2704
BOOL WINAPI ShimFlushCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow)
Definition: apphelp.c:473
BOOL WINAPI BaseDumpAppcompatCache(VOID)
Definition: appcache.c:316
BOOL WINAPI SdbGUIDToString(CONST GUID *Guid, PWSTR GuidString, SIZE_T Length)
Definition: sdbapi.c:412
NTSYSAPI NTSTATUS NTAPI RtlQueryEnvironmentVariable_U(_In_opt_ PWSTR Environment, _In_ PCUNICODE_STRING Name, _Out_ PUNICODE_STRING Value)
smooth NULL
Definition: ftsmooth.c:416
char * va_list
Definition: acmsvcex.h:78
Definition: bufpool.h:45
BOOL WINAPIV ShimDbgPrint(SHIM_LOG_LEVEL Level, PCSTR FunctionName, PCSTR Format,...)
Definition: apphelp.c:106
const char * LPCSTR
Definition: xmlstorage.h:183
#define DLL_PROCESS_DETACH
Definition: compat.h:119
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:585
#define DB_INFO_FLAGS_VALID_GUID
Definition: apphelp.h:76
#define KEY_WRITE
Definition: nt_native.h:1031
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
Definition: string_lib.cpp:62
#define _Out_opt_
Definition: no_sal2.h:339
$ULONG HighPart
Definition: ntbasedef.h:577
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define MAX_GUID_STRING_LEN
Definition: apphelp.c:29
BOOL WINAPI ShimDumpCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow)
Definition: apphelp.c:458
uint64_t ULONGLONG
Definition: typedefs.h:65
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
#define APPHELP_RESULT_NOTFOUND
Definition: apphelp.c:159
unsigned long DWORD
Definition: ntddk_ex.h:95
static IN LPSTR Unk1
Definition: ldrinit.c:47
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
BOOL WINAPI SdbRegisterDatabaseEx(_In_ LPCWSTR pszDatabasePath, _In_ DWORD dwDatabaseType, _In_opt_ const PULONGLONG pTimeStamp)
Definition: apphelp.c:261
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3399
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define HID_DOS_PATHS
Definition: apphelp.h:19
void WINAPI SdbCloseDatabase(PDB)
Definition: sdbapi.c:373
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
BOOL WINAPI ApphelpCheckInstallShieldPackage(void *ptr, LPCWSTR path)
Definition: apphelp.c:75
static const WCHAR L[]
Definition: oid.c:1250
#define APPHELP_IGNORE_ENVIRONMENT
Definition: apphelp.c:156
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
ULONG g_ShimDebugLevel
Definition: apphelp.c:35
void WINAPI SdbReleaseDatabase(HSDB)
Definition: hsdb.c:417
BOOL WINAPI ApphelpCheckRunAppEx(_In_ HANDLE FileHandle, _In_opt_ PVOID Unk1, _In_opt_ PVOID Unk2, _In_opt_z_ PWCHAR 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
BOOL WINAPI SdbGetDatabaseInformation(PDB pdb, PDB_INFORMATION information)
Definition: sdbapi.c:502
#define WINAPIV
Definition: sdbpapi.h:64
BOOL WINAPI SdbRegisterDatabase(_In_ LPCWSTR pszDatabasePath, _In_ DWORD dwDatabaseType)
Definition: apphelp.c:391
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI NtDeleteKey(IN HANDLE KeyHandle)
Definition: ntapi.c:408
#define _In_
Definition: no_sal2.h:204
void ApphelppInitDebugLevel(void)
Definition: apphelp.c:38
PVOID PVOID PWCHAR ApplicationName
Definition: env.c:45
PVOID PVOID PWCHAR PVOID USHORT ExeType
Definition: env.c:45
const UNICODE_STRING InstalledSDBKeyName
Definition: apphelp.c:24
#define DPFLTR_ERROR_LEVEL
Definition: main.cpp:32
unsigned short USHORT
Definition: pedump.c:61
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG SxsDataSize
Definition: env.c:45
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
Definition: services.c:325
#define DPFLTR_APPCOMPAT_ID
Definition: apphelp.c:27
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID PULONG PULONG PULONG64 PULONG SomeFlag2
Definition: env.c:45
unsigned int * PULONG
Definition: retypes.h:1
#define va_start(ap, A)
Definition: acmsvcex.h:91
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
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
DWORD dwDatabaseType
Definition: register.cpp:75
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:1252
BOOL WINAPI SdbUnregisterDatabase(_In_ const GUID *pguidDB)
Definition: apphelp.c:406
#define STRSAFE_NULL_ON_FAILURE
Definition: ntstrsafe.h:47
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:390
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
HANDLE RootDirectory
Definition: umtypes.h:184
#define REG_QWORD
Definition: sdbapi.c:597
unsigned int ULONG
Definition: retypes.h:1
#define APPHELP_RESULT_FOUND
Definition: apphelp.c:160
static HINSTANCE hinst
Definition: edit.c:551
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
unsigned __int64 * PULONG64
Definition: imports.h:198
HMODULE g_hInstance
Definition: apphelp.c:36
const char * PCSTR
Definition: typedefs.h:51
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG PVOID * SxsData
Definition: env.c:45
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
Definition: env.c:45
GLuint64EXT * result
Definition: glext.h:11304
#define REG_DWORD
Definition: sdbapi.c:596
#define APPHELP_VALID_RESULT
Definition: apphelp.c:158
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID * SdbQueryAppCompatData
Definition: env.c:45
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
ULONG ACCESS_MASK
Definition: nt_native.h:40
DWORD dwLowDateTime
Definition: mapidefs.h:65
Iosb Information
Definition: create.c:4377
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
Definition: apphelp.c:59
#define DELETE
Definition: nt_native.h:57
#define _Inout_opt_
Definition: no_sal2.h:258
PVOID PVOID PWCHAR PVOID USHORT PULONG PVOID PULONG SdbQueryAppCompatDataSize
Definition: env.c:45
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
PDB WINAPI SdbOpenDatabase(LPCWSTR path, PATH_TYPE type)
Definition: sdbapi.c:329
#define REG_SZ
Definition: layer.c:22