ReactOS 0.4.15-dev-7788-g1ad9096
shimdbg.c
Go to the documentation of this file.
1/*
2 * PROJECT: shimdbg
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Test tool for SHIM engine caching
5 * COPYRIGHT: Copyright 2016-2017 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8#include <stdio.h>
9#include <stdlib.h>
10#include <ctype.h>
11#include <ntndk.h>
12
14#define DPFLTR_ERROR_LEVEL 0
15
16void xprintf(const char *fmt, ...)
17{
18 va_list ap;
19
20 va_start(ap, fmt);
21 vprintf(fmt, ap);
23 va_end(ap);
24}
25
26
29{
31 xprintf("NtApphelpCacheControl returned 0x%x\n", (unsigned int)Status);
32}
33
34HANDLE MapFile(char* filename, UNICODE_STRING* PathName, int MapIt)
35{
36 OBJECT_ATTRIBUTES LocalObjectAttributes;
41 if (MapIt)
42 {
43 InitializeObjectAttributes(&LocalObjectAttributes, PathName,
47 &LocalObjectAttributes, &IoStatusBlock,
50 if (!NT_SUCCESS(Status))
51 {
52 xprintf("Failed opening the file, using a NULL handle\n");
54 }
55 }
56 return FileHandle;
57}
58
59void CallApphelpWithImage(char* filename, int MapIt,
61{
62 UNICODE_STRING PathName = {0};
64
65 HANDLE FileHandle = MapFile(filename, &PathName, MapIt);
66
67 xprintf("Calling %s %s mapping\n", ServiceName, (MapIt ? "with" : "without"));
68
69 RtlInitUnicodeString(&CacheEntry.ImageName, PathName.Buffer);
70 CacheEntry.ImageHandle = FileHandle ? FileHandle : (HANDLE)-1;
71 CallApphelp(Service, &CacheEntry);
72 // we piggy-back on the PathName, so let the Cleanup take care of the string
73 //RtlFreeUnicodeString(&CacheEntry.ImageName);
74
75 if (FileHandle)
77 RtlFreeUnicodeString(&PathName);
78}
79
80int IsOpt(char* argv, const char* check)
81{
82 if( argv && (argv[0] == '-' || argv[0] == '/') ) {
83 return !_strnicmp(argv + 1, check, strlen(check));
84 }
85 return 0;
86}
87
88int HandleImageArg(int argc, char* argv[], int* pn, char MapItChar,
90{
91 int n = *pn;
92 if (n+1 < argc)
93 {
94 int MapIt = argv[n][1] == MapItChar;
96 (*pn) += 1;
97 return 0;
98 }
99 xprintf("Error: no image name specified\n");
100 return 1;
101}
102
103typedef WORD TAG;
104typedef UINT64 QWORD;
105
106#define TAG_TYPE_MASK 0xF000
107#define TAG_TYPE_DWORD 0x4000
108#define TAG_TYPE_QWORD 0x5000
109#define TAG_TYPE_STRINGREF 0x6000
110
111#define ATTRIBUTE_AVAILABLE 0x1
112#define ATTRIBUTE_FAILED 0x2
113
114typedef struct tagATTRINFO
115{
116 TAG type;
117 DWORD flags; /* ATTRIBUTE_AVAILABLE, ATTRIBUTE_FAILED */
118 union
119 {
122 WCHAR *lpattr;
123 };
125
126static PVOID hdll;
127static LPCWSTR (WINAPI *pSdbTagToString)(TAG);
128static BOOL (WINAPI *pSdbGetFileAttributes)(LPCWSTR, PATTRINFO *, LPDWORD);
129static BOOL (WINAPI *pSdbFreeFileAttributes)(PATTRINFO);
130
132{
133 if (!hdll)
134 {
135 static UNICODE_STRING DllName = RTL_CONSTANT_STRING(L"apphelp.dll");
136 static ANSI_STRING SdbTagToString = RTL_CONSTANT_STRING("SdbTagToString");
137 static ANSI_STRING SdbGetFileAttributes = RTL_CONSTANT_STRING("SdbGetFileAttributes");
138 static ANSI_STRING SdbFreeFileAttributes = RTL_CONSTANT_STRING("SdbFreeFileAttributes");
139 if (!NT_SUCCESS(LdrLoadDll(NULL, NULL, &DllName, &hdll)))
140 {
141 xprintf("Unable to load apphelp.dll\n");
142 return FALSE;
143 }
144 if (!NT_SUCCESS(LdrGetProcedureAddress(hdll, &SdbTagToString, 0, (PVOID)&pSdbTagToString)) ||
145 !NT_SUCCESS(LdrGetProcedureAddress(hdll, &SdbGetFileAttributes, 0, (PVOID)&pSdbGetFileAttributes)) ||
146 !NT_SUCCESS(LdrGetProcedureAddress(hdll, &SdbFreeFileAttributes, 0, (PVOID)&pSdbFreeFileAttributes)))
147 {
149 hdll = NULL;
150 xprintf("Unable to resolve functions\n");
151 return FALSE;
152 }
153 }
154 return TRUE;
155}
156
157
158int HandleDumpAttributes(int argc, char* argv[], int* pn, const char* opt)
159{
162 DWORD num_attr, n;
163 int argn = *pn;
164 const char* arg;
165
166 if (!InitApphelp())
167 return 1;
168
169 if (strlen(argv[argn]) > (strlen(opt)+1))
170 {
171 arg = argv[argn] + strlen(opt);
172 }
173 else if (argn+1 >= argc)
174 {
175 xprintf("Error: no image name specified\n");
176 return 1;
177 }
178 else
179 {
180 arg = argv[argn+1];
181 (*pn) += 1;
182 }
183
185
186 if (pSdbGetFileAttributes(FileName.Buffer, &attr, &num_attr))
187 {
188 xprintf("Dumping attributes for %s\n", arg);
189 for (n = 0; n < num_attr; ++n)
190 {
191 TAG tagType;
192 LPCWSTR tagName;
194 continue;
195
196 tagName = pSdbTagToString(attr[n].type);
197
198 tagType = attr[n].type & TAG_TYPE_MASK;
199 switch (tagType)
200 {
201 case TAG_TYPE_DWORD:
202 xprintf("<%ls>0x%lx</%ls>\n", tagName, attr[n].dwattr, tagName);
203 break;
205 xprintf("<%ls>%ls</%ls>\n", tagName, attr[n].lpattr, tagName);
206 break;
207 case TAG_TYPE_QWORD:
208 xprintf("<%ls>0x%I64x</%ls>\n", tagName, attr[n].qwattr, tagName);
209 break;
210 default:
211 xprintf("<!-- Unknown tag type: 0x%x (from 0x%x)\n", tagType, attr[n].type);
212 break;
213 }
214 }
215 xprintf("Done\n");
216 }
217 else
218 {
219 xprintf("Unable to get attributes from %s\n", arg);
220 }
221
222
224 return 0;
225}
226
227UNICODE_STRING AppCompatCacheKey = RTL_CONSTANT_STRING(L"\\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatCache");
230#define REG_BINARY ( 3 ) // Free form binary
231
232
233/* produce a hex dump, stolen from rdesktop.c */
234void hexdump(unsigned char *p, unsigned int len)
235{
236 unsigned char *line = p;
237 unsigned int i, thisline, offset = 0;
238
239 while (offset < len)
240 {
241 xprintf("%04x ", offset);
242 thisline = len - offset;
243 if (thisline > 16)
244 thisline = 16;
245
246 for (i = 0; i < thisline; i++)
247 xprintf("%02x ", line[i]);
248
249 for (; i < 16; i++)
250 xprintf(" ");
251
252 for (i = 0; i < thisline; i++)
253 xprintf("%c", (line[i] >= 0x20 && line[i] < 0x7f) ? line[i] : '.');
254
255 xprintf("\n");
256 offset += thisline;
257 line += thisline;
258 }
259}
260
261void DumpRegistryData(int IncludeDump)
262{
265 KEY_VALUE_PARTIAL_INFORMATION KeyValueObject;
266 PKEY_VALUE_PARTIAL_INFORMATION KeyValueInformation = &KeyValueObject;
267 ULONG KeyInfoSize, ResultSize;
268
269 xprintf("Dumping AppCompatCache registry key\n");
270
272
274 KeyValuePartialInformation, KeyValueInformation,
275 sizeof(KeyValueObject), &ResultSize);
276
278 {
279 KeyInfoSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + KeyValueInformation->DataLength;
280 KeyValueInformation = malloc(KeyInfoSize);
281 if (KeyValueInformation != NULL)
282 {
284 KeyValuePartialInformation, KeyValueInformation,
285 KeyInfoSize, &ResultSize);
286 }
287 }
288
289 if (NT_SUCCESS(Status) && KeyValueInformation->Type == REG_BINARY)
290 {
291 ULONG crc;
292 if (IncludeDump)
293 hexdump(KeyValueInformation->Data, KeyValueInformation->DataLength);
294 crc = RtlComputeCrc32(0, KeyValueInformation->Data, KeyValueInformation->DataLength);
295 xprintf("Len: %lu, Crc: 0x%lx\n", KeyValueInformation->DataLength, crc);
296 }
297 else
298 {
299 xprintf("Failed reading AppCompatCache from registry (0x%lx)\n", Status);
300 }
301
302 if (KeyValueInformation != &KeyValueObject)
303 free(KeyValueInformation);
304
305 if (KeyHandle)
307}
308
309int _getch();
310
311int main(int argc, char* argv[])
312{
313 int n, unhandled = 0, keepopen = 0;
314
315 for (n = 1; n < argc; ++n)
316 {
317 char* arg = argv[n];
318 if (IsOpt(arg, "d"))
319 {
320 xprintf("Calling ApphelpCacheServiceDump\n");
322 unhandled = 0;
323 }
324 else if (IsOpt(arg, "h"))
325 {
326 DumpRegistryData(arg[1] == 'h');
327 unhandled = 0;
328 }
329 else if (IsOpt(arg, "f"))
330 {
331 xprintf("Calling ApphelpCacheServiceFlush\n");
333 unhandled = 0;
334 }
335 else if (IsOpt(arg, "z"))
336 {
337 xprintf("Calling ApphelpDBGReadRegistry\n");
339 unhandled = 0;
340 }
341 else if (IsOpt(arg, "x"))
342 {
343 xprintf("Calling ApphelpDBGWriteRegistry\n");
345 unhandled = 0;
346 }
347 else if (IsOpt(arg, "l"))
348 {
349 unhandled |= HandleImageArg(argc, argv, &n, 'l',
350 ApphelpCacheServiceLookup, "ApphelpCacheServiceLookup");
351 }
352 else if (IsOpt(arg, "u"))
353 {
354 unhandled |= HandleImageArg(argc, argv, &n, 'u',
355 ApphelpCacheServiceUpdate, "ApphelpCacheServiceUpdate");
356 }
357 else if (IsOpt(arg, "r"))
358 {
359 unhandled |= HandleImageArg(argc, argv, &n, 'r',
360 ApphelpCacheServiceRemove, "ApphelpCacheServiceRemove");
361 }
362 else if (IsOpt(arg, "a"))
363 {
364 unhandled |= HandleDumpAttributes(argc, argv, &n, "a");
365 }
366 else if (IsOpt(arg, "k"))
367 {
368 keepopen = 1;
369 }
370 else
371 {
372 unhandled = 1;
373 }
374 }
375 if (unhandled || argc == 1)
376 {
377 xprintf("Usage: %s [-d|-z|-x|-h|-H|-f|-[l|L] <image>|-[u|U] <image>|-[r|R] <image>|-k]\n", argv[0]);
378 xprintf(" -d: Dump shim cache over debug output\n");
379 xprintf(" -z: DEBUG Read shim cache from registry\n");
380 xprintf(" -x: DEBUG Write shim cache to registry\n");
381 xprintf(" -h: Hexdump shim registry key\n");
382 xprintf(" -H: Crc + Length from shim registry key only\n");
383 xprintf(" -f: Flush (clear) the shim cache\n");
384 xprintf(" -l: Lookup <image> in the shim cache\n");
385 xprintf(" -L: Lookup <image> in the shim cache without mapping it\n");
386 xprintf(" -u: Update (insert) <image> in the shim cache\n");
387 xprintf(" -U: Update (insert) <image> in the shim cache without mapping it\n");
388 xprintf(" -r: Remove <image> from the shim cache\n");
389 xprintf(" -R: Remove <image> from the shim cache without mapping it\n");
390 xprintf(" -a: Dump file attributes as used in the appcompat database\n");
391 xprintf(" -k: Keep the console open\n");
392 }
393 if (keepopen)
394 {
395 _getch();
396 }
397 return unhandled;
398}
unsigned long long UINT64
static int argc
Definition: ServiceArgs.c:12
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
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 const char UINT32 ComponentId
Definition: acpixf.h:1281
BOOL WINAPI SdbFreeFileAttributes(PATTRINFO attr_info)
Definition: sdbfileattr.c:214
LPCWSTR WINAPI SdbTagToString(TAG tag)
Definition: sdbapi.c:752
BOOL WINAPI SdbGetFileAttributes(LPCWSTR path, PATTRINFO *attr_info_ret, LPDWORD attr_count)
Definition: sdbfileattr.c:239
LONG NTSTATUS
Definition: precomp.h:26
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
static WCHAR ServiceName[]
Definition: browser.c:19
#define NTSYSAPI
Definition: ntoskrnl.h:12
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#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:32
#define RtlComputeCrc32
Definition: compat.h:810
#define _strnicmp(_String1, _String2, _MaxCount)
Definition: compat.h:23
#define FILE_SHARE_READ
Definition: compat.h:136
#define check(expected, result)
Definition: dplayx.c:32
int main()
Definition: test.c:6
struct _FileName FileName
Definition: fatprocs.h:896
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
Status
Definition: gdiplustypes.h:25
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLdouble n
Definition: glext.h:7729
GLbitfield flags
Definition: glext.h:7161
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
GLintptr offset
Definition: glext.h:5920
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
_Check_return_opt_ _CRTIMP int __cdecl vprintf(_In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
enum _APPHELPCACHESERVICECLASS APPHELPCACHESERVICECLASS
@ ApphelpDBGReadRegistry
Definition: pstypes.h:979
@ ApphelpCacheServiceLookup
Definition: pstypes.h:973
@ ApphelpCacheServiceRemove
Definition: pstypes.h:974
@ ApphelpCacheServiceUpdate
Definition: pstypes.h:975
@ ApphelpCacheServiceDump
Definition: pstypes.h:977
@ ApphelpDBGWriteRegistry
Definition: pstypes.h:980
@ ApphelpCacheServiceFlush
Definition: pstypes.h:976
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
const char * filename
Definition: ioapi.h:137
NTSTATUS NTAPI LdrUnloadDll(_In_ PVOID BaseAddress)
Definition: ldrapi.c:1331
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:829
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
static int pints_t pn[]
Definition: server.c:129
#define argv
Definition: mplay32.c:18
#define _In_z_
Definition: ms_sal.h:313
#define _In_
Definition: ms_sal.h:308
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4715
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
Definition: file.c:3952
#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
#define SYNCHRONIZE
Definition: nt_native.h:61
#define FILE_READ_DATA
Definition: nt_native.h:628
@ KeyValuePartialInformation
Definition: nt_native.h:1182
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
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 FILE_SHARE_DELETE
Definition: nt_native.h:682
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define FILE_EXECUTE
Definition: nt_native.h:642
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
CONST CHAR * PCCH
Definition: ntbasedef.h:392
#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
NTSTATUS NTAPI NtApphelpCacheControl(_In_ APPHELPCACHESERVICECLASS Service, _In_opt_ PAPPHELP_CACHE_SERVICE_LOOKUP ServiceData)
Definition: apphelp.c:728
@ Service
Definition: ntsecapi.h:292
#define L(x)
Definition: ntvdm.h:50
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define TAG_TYPE_DWORD
Definition: shimdbg.c:107
#define TAG_TYPE_QWORD
Definition: shimdbg.c:108
UNICODE_STRING AppCompatCacheValue
Definition: shimdbg.c:229
static PVOID hdll
Definition: shimdbg.c:126
int _getch()
Definition: getch.c:16
#define TAG_TYPE_STRINGREF
Definition: shimdbg.c:109
OBJECT_ATTRIBUTES AppCompatKeyAttributes
Definition: shimdbg.c:228
UNICODE_STRING AppCompatCacheKey
Definition: shimdbg.c:227
#define REG_BINARY
Definition: shimdbg.c:230
int HandleDumpAttributes(int argc, char *argv[], int *pn, const char *opt)
Definition: shimdbg.c:158
void xprintf(const char *fmt,...)
Definition: shimdbg.c:16
struct tagATTRINFO ATTRINFO
struct tagATTRINFO * PATTRINFO
void DumpRegistryData(int IncludeDump)
Definition: shimdbg.c:261
void CallApphelp(APPHELPCACHESERVICECLASS Service, PAPPHELP_CACHE_SERVICE_LOOKUP CacheEntry)
Definition: shimdbg.c:27
#define ATTRIBUTE_AVAILABLE
Definition: shimdbg.c:111
HANDLE MapFile(char *filename, UNICODE_STRING *PathName, int MapIt)
Definition: shimdbg.c:34
NTSYSAPI ULONG NTAPI vDbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ PCCH Format, _In_ va_list ap)
static BOOL InitApphelp()
Definition: shimdbg.c:131
UINT64 QWORD
Definition: shimdbg.c:104
static PATTRINFO LPDWORD
Definition: shimdbg.c:128
int IsOpt(char *argv, const char *check)
Definition: shimdbg.c:80
void hexdump(unsigned char *p, unsigned int len)
Definition: shimdbg.c:234
#define DPFLTR_ERROR_LEVEL
Definition: shimdbg.c:14
void CallApphelpWithImage(char *filename, int MapIt, APPHELPCACHESERVICECLASS Service, char *ServiceName)
Definition: shimdbg.c:59
WORD TAG
Definition: shimdbg.c:103
int HandleImageArg(int argc, char *argv[], int *pn, char MapItChar, APPHELPCACHESERVICECLASS Service, char *ServiceName)
Definition: shimdbg.c:88
#define TAG_TYPE_MASK
Definition: shimdbg.c:106
UNICODE_STRING ImageName
Definition: pstypes.h:986
Definition: fs_rec.h:143
Definition: cookie.c:202
Definition: dsound.c:943
Definition: parser.c:49
QWORD qwattr
Definition: apphelp.h:39
WCHAR * lpattr
Definition: apphelp.h:41
DWORD dwattr
Definition: apphelp.h:40
DWORD flags
Definition: apphelp.h:37
TAG type
Definition: apphelp.h:36
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define NTAPI
Definition: typedefs.h:36
PVOID HANDLE
Definition: typedefs.h:73
uint32_t ULONG
Definition: typedefs.h:59
void * arg
Definition: msvc.h:10
#define WINAPI
Definition: msvc.h:6
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185