ReactOS 0.4.16-dev-2498-g8632030
debug.c
Go to the documentation of this file.
1/*
2 * FreeLoader
3 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#include <freeldr.h>
21#include <debug.h>
22
23#if DBG
24
25// #define DEBUG_ALL
26// #define DEBUG_WARN
27// #define DEBUG_ERR
28// #define DEBUG_INIFILE
29// #define DEBUG_REACTOS
30// #define DEBUG_CUSTOM
31#define DEBUG_NONE
32
33#define DBG_DEFAULT_LEVELS (ERR_LEVEL|FIXME_LEVEL)
34
35static UCHAR DbgChannels[DBG_CHANNELS_COUNT];
36
37#define SCREEN 1
38#define RS232 2
39#define BOCHS 4
40
41#define BOCHS_OUTPUT_PORT 0xE9
42
43ULONG DebugPort = RS232;
44
45/* Serial debug connection */
46#include <cportlib/uartinfo.h>
47ULONG ComPortBaudRate = DEFAULT_DEBUG_BAUD_RATE;
48// The COM port initializer chooses the first available port starting from COM4 down to COM1.
49PUCHAR ComPortAddress = NULL;
50
51BOOLEAN DebugStartOfLine = TRUE;
52
53VOID
56{
57#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1)
58
59 static BOOLEAN Initialized = FALSE;
60 PSTR CommandLine, PortString, BaudString;
62 CHAR DbgStringBuffer[256];
63
64 /* Always reset the debugging channels */
65
66#if defined (DEBUG_ALL)
67 memset(DbgChannels, MAX_LEVEL, DBG_CHANNELS_COUNT);
68#elif defined (DEBUG_WARN)
69 memset(DbgChannels, WARN_LEVEL|FIXME_LEVEL|ERR_LEVEL, DBG_CHANNELS_COUNT);
70#elif defined (DEBUG_ERR)
71 memset(DbgChannels, ERR_LEVEL, DBG_CHANNELS_COUNT);
72#else
73 memset(DbgChannels, 0, DBG_CHANNELS_COUNT);
74#endif
75
76#if defined (DEBUG_INIFILE)
77 DbgChannels[DPRINT_INIFILE] = MAX_LEVEL;
78#elif defined (DEBUG_REACTOS)
79 DbgChannels[DPRINT_REACTOS] = MAX_LEVEL;
80 DbgChannels[DPRINT_REGISTRY] = MAX_LEVEL;
81#elif defined (DEBUG_CUSTOM)
82 DbgChannels[DPRINT_WARNING] = MAX_LEVEL;
83 DbgChannels[DPRINT_WINDOWS] = MAX_LEVEL;
84#endif
85
86 CommandLine = NULL;
87 if (!DebugString || !*DebugString)
88 {
89 /* No command-line is provided: during pre-initialization,
90 * initialize the debug port with default settings;
91 * otherwise just return during main initialization */
92 if (!Initialized)
93 goto Done;
94 return;
95 }
96
97 /* Get a copy of the command-line */
98 strcpy(DbgStringBuffer, DebugString);
99 CommandLine = DbgStringBuffer;
100
101 /* Upcase it */
102 _strupr(CommandLine);
103
104 /* Get the port and baud rate */
105 PortString = strstr(CommandLine, "DEBUGPORT");
106 BaudString = strstr(CommandLine, "BAUDRATE");
107
108 /*
109 * Check if we got DEBUGPORT parameters.
110 * NOTE: Inspired by ntoskrnl/kd/kdinit.c, KdInitSystem(...)
111 */
112 while (PortString)
113 {
114 /* Move past the actual string and any spaces */
115 PortString += CONST_STR_LEN("DEBUGPORT");
116 while (*PortString == ' ') ++PortString;
117 /* Skip the equals sign */
118 if (*PortString) ++PortString;
119
120 /* Check for possible ports and set the port to use */
121 if (_strnicmp(PortString, "SCREEN", CONST_STR_LEN("SCREEN")) == 0)
122 {
123 PortString += CONST_STR_LEN("SCREEN");
124 DebugPort |= SCREEN;
125 }
126 else if (_strnicmp(PortString, "BOCHS", CONST_STR_LEN("BOCHS")) == 0)
127 {
128 PortString += CONST_STR_LEN("BOCHS");
129 DebugPort |= BOCHS;
130 }
131 else if (_strnicmp(PortString, "COM", CONST_STR_LEN("COM")) == 0)
132 {
133 PortString += CONST_STR_LEN("COM");
134 DebugPort |= RS232;
135
136 /* Set the port to use */
137 if (*PortString != ':')
138 {
139 /* Read the port and set its address */
140 Value = (ULONG)atol(PortString);
141 if (Value > 0 && Value <= MAX_COM_PORTS)
142 ComPortAddress = UlongToPtr(BaseArray[Value]);
143 }
144 else
145 {
146 /* Retrieve and set its address */
147 Value = strtoul(PortString + 1, NULL, 0);
148 if (Value)
149 ComPortAddress = UlongToPtr(Value);
150 }
151 }
152
153 PortString = strstr(PortString, "DEBUGPORT");
154 }
155
156 /* Check if we got a baud rate */
157 if (BaudString)
158 {
159 /* Move past the actual string and any spaces */
160 BaudString += CONST_STR_LEN("BAUDRATE");
161 while (*BaudString == ' ') ++BaudString;
162
163 /* Make sure we have a rate */
164 if (*BaudString)
165 {
166 /* Read and set it */
167 Value = (ULONG)atol(BaudString + 1);
168 if (Value) ComPortBaudRate = Value;
169 }
170 }
171
172Done:
174
175 /* Try to initialize the port; if it fails, remove the corresponding flag */
176 if (DebugPort & RS232)
177 {
178 if (!Rs232PortInitialize(ComPortAddress, ComPortBaudRate))
179 DebugPort &= ~RS232;
180 }
181}
182
183VOID DebugPrintChar(UCHAR Character)
184{
185 if (Character == '\n')
186 DebugStartOfLine = TRUE;
187
188 if (DebugPort & RS232)
189 {
190 if (Character == '\n')
191 Rs232PortPutByte('\r');
192
193 Rs232PortPutByte(Character);
194 }
195 if (DebugPort & BOCHS)
196 {
197 WRITE_PORT_UCHAR((PUCHAR)BOCHS_OUTPUT_PORT, Character);
198 }
199 if (DebugPort & SCREEN)
200 {
201 MachConsPutChar(Character);
202 }
203}
204
205ULONG
206DbgPrint(const char *Format, ...)
207{
208 va_list ap;
209 int Length;
210 char* ptr;
211 CHAR Buffer[512];
212
214 Length = _vsnprintf(Buffer, sizeof(Buffer), Format, ap);
215 va_end(ap);
216
217 /* Check if we went past the buffer */
218 if (Length == -1)
219 {
220 /* Terminate it if we went over-board */
221 Buffer[sizeof(Buffer) - 1] = '\n';
222
223 /* Put maximum */
224 Length = sizeof(Buffer);
225 }
226
227 ptr = Buffer;
228 while (Length--)
229 DebugPrintChar(*ptr++);
230
231 return 0;
232}
233
234VOID
235DbgPrint2(ULONG Mask, ULONG Level, const char *File, ULONG Line, char *Format, ...)
236{
237 va_list ap;
238 char Buffer[2096];
239 char *ptr = Buffer;
240
241 /* Mask out unwanted debug messages */
242 if (!(DbgChannels[Mask] & Level) && !(Level & DBG_DEFAULT_LEVELS))
243 {
244 return;
245 }
246
247 /* Print the header if we have started a new line */
248 if (DebugStartOfLine)
249 {
250 DbgPrint("(%s:%lu) ", File, Line);
251
252 switch (Level)
253 {
254 case ERR_LEVEL:
255 DbgPrint("err: ");
256 break;
257 case FIXME_LEVEL:
258 DbgPrint("fixme: ");
259 break;
260 case WARN_LEVEL:
261 DbgPrint("warn: ");
262 break;
263 case TRACE_LEVEL:
264 DbgPrint("trace: ");
265 break;
266 }
267
268 DebugStartOfLine = FALSE;
269 }
270
273 va_end(ap);
274
275 while (*ptr)
276 {
277 DebugPrintChar(*ptr++);
278 }
279}
280
281VOID
283{
284 PUCHAR BufPtr = (PUCHAR)Buffer;
286
287 /* Mask out unwanted debug messages */
288 if (!(DbgChannels[Mask] & TRACE_LEVEL))
289 return;
290
291 DebugStartOfLine = FALSE; // We don't want line headers
292 DbgPrint("Dumping buffer at %p with length of %lu bytes:\n", Buffer, Length);
293
294 Offset = 0;
295 while (Offset < Length)
296 {
297 /* We don't want line headers */
298 DebugStartOfLine = FALSE;
299
300 /* Print the offset */
301 DbgPrint("%04x:\t", Offset);
302
303 /* Print either 16 or the remaining number of bytes */
304 Count = min(Length - Offset, 16);
305 for (i = 0; i < Count; i++, Offset++)
306 {
307 DbgPrint("%02x%c", BufPtr[Offset], (i == 7) ? '-' : ' ');
308 }
309
310 DbgPrint("\n");
311 }
312}
313
314VOID
316{
317 DebugPort &= ~SCREEN;
318}
319
320static BOOLEAN
321DbgAddDebugChannel(CHAR* channel, CHAR* level, CHAR op)
322{
323 int iLevel, iChannel;
324
325 if (channel == NULL || *channel == '\0' || strlen(channel) == 0)
326 return FALSE;
327
328 if (level == NULL || *level == '\0' || strlen(level) == 0)
329 iLevel = MAX_LEVEL;
330 else if (strcmp(level, "err") == 0)
331 iLevel = ERR_LEVEL;
332 else if (strcmp(level, "fixme") == 0)
333 iLevel = FIXME_LEVEL;
334 else if (strcmp(level, "warn") == 0)
335 iLevel = WARN_LEVEL;
336 else if (strcmp(level, "trace") == 0)
337 iLevel = TRACE_LEVEL;
338 else
339 return FALSE;
340
341 if (strcmp(channel, "memory" ) == 0) iChannel = DPRINT_MEMORY;
342 else if (strcmp(channel, "filesystem") == 0) iChannel = DPRINT_FILESYSTEM;
343 else if (strcmp(channel, "inifile" ) == 0) iChannel = DPRINT_INIFILE;
344 else if (strcmp(channel, "ui" ) == 0) iChannel = DPRINT_UI;
345 else if (strcmp(channel, "disk" ) == 0) iChannel = DPRINT_DISK;
346 else if (strcmp(channel, "cache" ) == 0) iChannel = DPRINT_CACHE;
347 else if (strcmp(channel, "registry" ) == 0) iChannel = DPRINT_REGISTRY;
348 else if (strcmp(channel, "linux" ) == 0) iChannel = DPRINT_LINUX;
349 else if (strcmp(channel, "hwdetect" ) == 0) iChannel = DPRINT_HWDETECT;
350 else if (strcmp(channel, "windows" ) == 0) iChannel = DPRINT_WINDOWS;
351 else if (strcmp(channel, "peloader" ) == 0) iChannel = DPRINT_PELOADER;
352 else if (strcmp(channel, "scsiport" ) == 0) iChannel = DPRINT_SCSIPORT;
353 else if (strcmp(channel, "heap" ) == 0) iChannel = DPRINT_HEAP;
354 else if (strcmp(channel, "all" ) == 0)
355 {
356 int i;
357
358 for (i = 0; i < DBG_CHANNELS_COUNT; i++)
359 {
360 if (op == '+')
361 DbgChannels[i] |= iLevel;
362 else
363 DbgChannels[i] &= ~iLevel;
364 }
365
366 return TRUE;
367 }
368 else return FALSE;
369
370 if (op == '+')
371 DbgChannels[iChannel] |= iLevel;
372 else
373 DbgChannels[iChannel] &= ~iLevel;
374
375 return TRUE;
376}
377
378VOID
380{
381 CHAR *str, *separator, *c, op;
382
383 str = Value;
384
385 do
386 {
387 separator = strchr(str, ',');
388 if (separator != NULL)
389 *separator = '\0';
390
391 c = strchr(str, '+');
392 if (c == NULL)
393 c = strchr(str, '-');
394
395 if (c != NULL)
396 {
397 op = *c;
398 *c = '\0';
399 c++;
400
401 DbgAddDebugChannel(c, str, op);
402 }
403
404 str = separator + 1;
405 } while (separator != NULL);
406}
407
408#else
409
410#undef DebugInit
411VOID
414{
416}
417
418ULONG
420{
422 return 0;
423}
424
425VOID
426DbgPrint2(ULONG Mask, ULONG Level, const char *File, ULONG Line, char *Format, ...)
427{
433}
434
435VOID
437{
441}
442
443#undef DbgParseDebugChannels
444VOID
446{
448}
449
450#endif // DBG
451
452ULONG
453MsgBoxPrint(const char *Format, ...)
454{
455 va_list ap;
456 CHAR Buffer[512];
458
460
461 /* Construct a string */
462 Length = _vsnprintf(Buffer, 512, Format, ap);
463
464 /* Check if we went past the buffer */
465 if (Length == MAXULONG)
466 {
467 /* Terminate it if we went over-board */
468 Buffer[sizeof(Buffer) - 1] = '\n';
469
470 /* Put maximum */
471 Length = sizeof(Buffer);
472 }
473
474 /* Show it as a message box */
476
477 /* Cleanup and exit */
478 va_end(ap);
479 return 0;
480}
481
483VOID
484NTAPI
486 IN ULONG BugCheckCode,
487 IN ULONG_PTR BugCheckParameter1,
488 IN ULONG_PTR BugCheckParameter2,
489 IN ULONG_PTR BugCheckParameter3,
490 IN ULONG_PTR BugCheckParameter4)
491{
492 char Buffer[70];
493
495 "*** STOP: 0x%08lX (0x%p,0x%p,0x%p,0x%p)",
496 BugCheckCode,
497 (PVOID)BugCheckParameter1,
498 (PVOID)BugCheckParameter2,
499 (PVOID)BugCheckParameter3,
500 (PVOID)BugCheckParameter4);
501
503 ASSERT(FALSE);
504 for (;;);
505}
506
507VOID
508NTAPI
509RtlAssert(IN PVOID FailedAssertion,
513{
515
516 if (Message)
517 {
518 Format = "Assertion \'%s\' failed at %s line %lu: %s\n";
519
521 (PCHAR)FailedAssertion,
524 Message);
525
528 Format,
529 (PCHAR)FailedAssertion,
532 Message);
533 }
534 else
535 {
536 Format = "Assertion \'%s\' failed at %s line %lu\n";
537
539 (PCHAR)FailedAssertion,
541 LineNumber);
542
545 Format,
546 (PCHAR)FailedAssertion,
548 LineNumber);
549 }
550
552}
553
555{
556 "TEST_BUGCHECK",
557 "MISSING_HARDWARE_REQUIREMENTS",
558 "FREELDR_IMAGE_CORRUPTION",
559 "MEMORY_INIT_FAILURE",
560 "ASSERT_FAILURE",
561#ifdef UEFIBOOT
562 "EXIT_BOOTSERVICES_FAILURE",
563#endif
564};
565
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 LineNumber
Definition: acpixf.h:1220
unsigned char BOOLEAN
Definition: actypes.h:127
BOOLEAN Rs232PortInitialize(_In_ PUCHAR PortAddress, _In_ ULONG BaudRate)
Definition: debug.c:15
DECLSPEC_NORETURN VOID FrLdrBugCheckWithMessage(ULONG BugCode, PCHAR File, ULONG Line, PCSTR Format,...)
Definition: debug.c:30
VOID Rs232PortPutByte(UCHAR ByteToSend)
Definition: debug.c:23
#define DPRINT_CACHE
Definition: debug.h:30
#define DPRINT_LINUX
Definition: debug.h:33
@ ASSERT_FAILURE
Definition: debug.h:159
#define DPRINT_UI
Definition: debug.h:28
#define DbgParseDebugChannels(val)
Definition: debug.h:124
#define DPRINT_FILESYSTEM
Definition: debug.h:26
#define DebugInit(DebugString)
Definition: debug.h:120
#define DPRINT_SCSIPORT
Definition: debug.h:37
#define DBG_CHANNELS_COUNT
Definition: debug.h:39
#define DPRINT_HEAP
Definition: debug.h:38
#define DPRINT_INIFILE
Definition: debug.h:27
#define DPRINT_REACTOS
Definition: debug.h:32
#define DPRINT_HWDETECT
Definition: debug.h:34
#define DPRINT_REGISTRY
Definition: debug.h:31
#define DPRINT_DISK
Definition: debug.h:29
#define DPRINT_WINDOWS
Definition: debug.h:35
#define DebugDisableScreenPort()
Definition: debug.h:123
#define DPRINT_MEMORY
Definition: debug.h:25
#define DPRINT_WARNING
Definition: debug.h:24
#define DPRINT_PELOADER
Definition: debug.h:36
#define MachConsPutChar(Ch)
Definition: machine.h:86
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
Definition: ui.c:372
VOID UiMessageBox(_In_ PCSTR Format,...)
Definition: ui.c:359
ULONG_PTR BugCheckInfo[5]
Definition: debug.c:566
char * BugCodeStrings[]
Definition: debug.c:554
VOID DbgPrint2(ULONG Mask, ULONG Level, const char *File, ULONG Line, char *Format,...)
Definition: debug.c:426
DECLSPEC_NORETURN VOID NTAPI KeBugCheckEx(IN ULONG BugCheckCode, IN ULONG_PTR BugCheckParameter1, IN ULONG_PTR BugCheckParameter2, IN ULONG_PTR BugCheckParameter3, IN ULONG_PTR BugCheckParameter4)
Definition: debug.c:485
ULONG MsgBoxPrint(const char *Format,...)
Definition: debug.c:453
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length)
Definition: debug.c:436
VOID NTAPI RtlAssert(IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)
Definition: debug.c:509
static CCHAR DebugString[256]
Definition: settings.c:16
Definition: bufpool.h:45
Definition: File.h:16
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
UINT op
Definition: effect.c:236
#define _strnicmp(_String1, _String2, _MaxCount)
Definition: compat.h:23
static const WCHAR separator[]
Definition: asmname.c:65
#define DECLSPEC_NORETURN
Definition: corecrt.h:131
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl vsprintf(char *, const char *, va_list) __WINE_CRT_PRINTF_ATTR(2
_ACRTIMP __msvcrt_long __cdecl atol(const char *)
Definition: string.c:1782
_ACRTIMP __msvcrt_ulong __cdecl strtoul(const char *, char **, int)
Definition: string.c:1859
_ACRTIMP char *__cdecl strchr(const char *, int)
Definition: string.c:3286
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
_ACRTIMP char *__cdecl strstr(const char *, const char *)
Definition: string.c:3415
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3319
char * va_list
Definition: vadefs.h:50
static const WCHAR Message[]
Definition: register.c:74
#define UlongToPtr(u)
Definition: config.h:106
unsigned int Mask
Definition: fpcontrol.c:82
GLint level
Definition: gl.h:1546
const GLubyte * c
Definition: glext.h:8905
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
#define DbgPrint
Definition: hal.h:12
#define c
Definition: ke_i.h:80
#define MAX_COM_PORTS
Definition: machpc.c:29
#define ASSERT(a)
Definition: mode.c:44
static PVOID ptr
Definition: dispmode.c:27
#define sprintf
Definition: sprintf.c:45
#define min(a, b)
Definition: monoChain.cc:55
@ Initialized
Definition: ketypes.h:388
#define _In_
Definition: no_sal2.h:158
int Count
Definition: noreturn.cpp:7
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
CONST CHAR * PCCH
Definition: ntbasedef.h:404
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21
#define CONST_STR_LEN(str)
Definition: procpage.c:19
const WCHAR * str
_strupr
Definition: string.h:453
strcpy
Definition: string.h:131
#define memset(x, y, z)
Definition: compat.h:39
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: ncftp.h:79
#define MAXULONG
Definition: typedefs.h:251
char * PSTR
Definition: typedefs.h:51
#define NTAPI
Definition: typedefs.h:36
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
#define DEFAULT_DEBUG_BAUD_RATE
Definition: uartinfo.h:17
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
NTSYSAPI void WINAPI DbgBreakPoint(void)
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
#define _vsnprintf
Definition: xmlstorage.h:202
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175