ReactOS
0.4.16-dev-91-g764881a
wdfassert.h
Go to the documentation of this file.
1
/*++
2
3
Copyright (c) Microsoft Corporation. All rights reserved.
4
5
_WdfVersionBuild_
6
7
Module Name:
8
9
WdfAssert.h
10
11
Abstract:
12
13
Contains prototypes for dealing with run time asserts
14
15
Author:
16
17
Environment:
18
19
kernel mode only
20
21
Revision History:
22
23
--*/
24
25
//
26
// NOTE: This header is generated by stubwork. Please make any
27
// modifications to the corresponding template files
28
// (.x or .y) and use stubwork to regenerate the header
29
//
30
31
#ifndef _WDFASSERT_H_
32
#define _WDFASSERT_H_
33
34
#ifndef WDF_EXTERN_C
35
#ifdef __cplusplus
36
#define WDF_EXTERN_C extern "C"
37
#define WDF_EXTERN_C_START extern "C"
{
38
#define WDF_EXTERN_C_END }
39
#else
40
#define WDF_EXTERN_C
41
#define WDF_EXTERN_C_START
42
#define WDF_EXTERN_C_END
43
#endif
44
#endif
45
46
WDF_EXTERN_C_START
47
48
49
50
51
#if (NTDDI_VERSION >= NTDDI_WIN2K)
52
53
//
54
// Including here because RtlAssert is not declared in XP and Win2K headers for
55
// free builds
56
//
57
NTSYSAPI
58
VOID
59
NTAPI
60
RtlAssert
(
61
_In_
PVOID
FailedAssertion,
62
_In_
PVOID
FileName
,
63
_In_
ULONG
LineNumber
,
64
_In_opt_
PSTR
Message
65
);
66
67
68
69
//
70
// WDFVERIFY is active both on checked and free build only if
71
// the wdf verifier is tuned on
72
//
73
#define WDFVERIFY(exp) { \
74
if ((WdfDriverGlobals->DriverFlags & WdfVerifyOn) && !(exp)) { \
75
RtlAssert( #exp, __FILE__, __LINE__, NULL ); \
76
} \
77
}
78
79
#define VERIFY_IS_IRQL_PASSIVE_LEVEL() WDFVERIFY(KeGetCurrentIrql() == PASSIVE_LEVEL)
80
81
//
82
// Following macro is obsolete and it will be phased out in due course
83
//
84
#define IS_AT_PASSIVE() WDFVERIFY(KeGetCurrentIrql() == PASSIVE_LEVEL)
85
86
//
87
// Compile time active "assert". File will not compile if this assert is FALSE.
88
//
89
// This compile time assert is designed to catch mismatch in the values of the
90
// declared constants. So suppress the OACR warning #6326 generated about the
91
// potential comparison of constants.
92
//
93
#define WDFCASSERT(c) { \
94
__pragma(warning(suppress: 6326)) \
95
switch(0) case (c): case 0: ; \
96
}
97
98
99
100
101
102
#endif
// (NTDDI_VERSION >= NTDDI_WIN2K)
103
104
WDF_EXTERN_C_END
105
106
#endif
// _WDFASSERT_H_
107
LineNumber
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
NTSYSAPI
#define NTSYSAPI
Definition:
ntoskrnl.h:12
Message
static const WCHAR Message[]
Definition:
register.c:74
void
Definition:
nsiface.idl:2307
_In_
#define _In_
Definition:
ms_sal.h:308
_In_opt_
#define _In_opt_
Definition:
ms_sal.h:309
_FileName
Definition:
filecomp.c:348
PSTR
char * PSTR
Definition:
typedefs.h:51
NTAPI
#define NTAPI
Definition:
typedefs.h:36
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
WDF_EXTERN_C_END
#define WDF_EXTERN_C_END
Definition:
wdfassert.h:42
RtlAssert
WDF_EXTERN_C_START NTSYSAPI VOID NTAPI RtlAssert(_In_ PVOID FailedAssertion, _In_ PVOID FileName, _In_ ULONG LineNumber, _In_opt_ PSTR Message)
WDF_EXTERN_C_START
#define WDF_EXTERN_C_START
Definition:
wdfassert.h:41
sdk
include
wdf
kmdf
1.17
wdfassert.h
Generated on Sun Oct 6 2024 06:12:15 for ReactOS by
1.9.6