ReactOS  0.4.15-dev-3440-g915569a
wdfcore.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WDF_EXTERN_C
 
#define WDF_EXTERN_C_START
 
#define WDF_EXTERN_C_END
 
#define WDF_TIMEOUT_TO_SEC   ((LONGLONG) 1 * 10 * 1000 * 1000)
 
#define WDF_TIMEOUT_TO_MS   ((LONGLONG) 1 * 10 * 1000)
 
#define WDF_TIMEOUT_TO_US   ((LONGLONG) 1 * 10)
 
#define WDF_PTR_ADD_OFFSET_TYPE(_ptr, _offset, _type)   ((_type) (((PUCHAR) (_ptr)) + (_offset)))
 
#define WDF_PTR_ADD_OFFSET(_ptr, _offset)   WDF_PTR_ADD_OFFSET_TYPE(_ptr, _offset, PVOID)
 
#define WDF_PTR_GET_OFFSET(_base, _addr)   (size_t) (((PUCHAR) _addr) - ((PUCHAR) _base))
 
#define DECLARE_UNICODE_STRING_SIZE(_var, _size)
 
#define DECLARE_CONST_UNICODE_STRING(_variablename, _string)
 

Functions

FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_SEC (_In_ ULONGLONG Time)
 
FORCEINLINE LONGLONG WDF_ABS_TIMEOUT_IN_SEC (_In_ ULONGLONG Time)
 
FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_MS (_In_ ULONGLONG Time)
 
FORCEINLINE LONGLONG WDF_ABS_TIMEOUT_IN_MS (_In_ ULONGLONG Time)
 
FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_US (_In_ ULONGLONG Time)
 
FORCEINLINE LONGLONG WDF_ABS_TIMEOUT_IN_US (_In_ ULONGLONG Time)
 
FORCEINLINE size_t WDF_ALIGN_SIZE_DOWN (_In_ size_t Length, _In_ size_t AlignTo)
 
FORCEINLINE size_t WDF_ALIGN_SIZE_UP (_In_ size_t Length, _In_ size_t AlignTo)
 

Macro Definition Documentation

◆ DECLARE_CONST_UNICODE_STRING

#define DECLARE_CONST_UNICODE_STRING (   _variablename,
  _string 
)
Value:
const WCHAR _variablename ## _buffer[] = _string; \
__pragma(warning(suppress:4204)) __pragma(warning(suppress:4221)) \
const UNICODE_STRING _variablename = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWSTR) _variablename ## _buffer }
boolean suppress
Definition: jpeglib.h:1006
uint16_t * PWSTR
Definition: typedefs.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define __pragma(x)
Definition: debug.h:260
#define warning(s)
Definition: debug.h:83

Definition at line 161 of file wdfcore.h.

◆ DECLARE_UNICODE_STRING_SIZE

#define DECLARE_UNICODE_STRING_SIZE (   _var,
  _size 
)
Value:
WCHAR _var ## _buffer[_size]; \
UNICODE_STRING _var = { 0, _size * sizeof(WCHAR) , _var ## _buffer }
__wchar_t WCHAR
Definition: xmlstorage.h:180

Definition at line 155 of file wdfcore.h.

◆ WDF_EXTERN_C

#define WDF_EXTERN_C

Definition at line 38 of file wdfcore.h.

◆ WDF_EXTERN_C_END

#define WDF_EXTERN_C_END

Definition at line 40 of file wdfcore.h.

◆ WDF_EXTERN_C_START

#define WDF_EXTERN_C_START

Definition at line 39 of file wdfcore.h.

◆ WDF_PTR_ADD_OFFSET

#define WDF_PTR_ADD_OFFSET (   _ptr,
  _offset 
)    WDF_PTR_ADD_OFFSET_TYPE(_ptr, _offset, PVOID)

Definition at line 144 of file wdfcore.h.

◆ WDF_PTR_ADD_OFFSET_TYPE

#define WDF_PTR_ADD_OFFSET_TYPE (   _ptr,
  _offset,
  _type 
)    ((_type) (((PUCHAR) (_ptr)) + (_offset)))

Definition at line 141 of file wdfcore.h.

◆ WDF_PTR_GET_OFFSET

#define WDF_PTR_GET_OFFSET (   _base,
  _addr 
)    (size_t) (((PUCHAR) _addr) - ((PUCHAR) _base))

Definition at line 147 of file wdfcore.h.

◆ WDF_TIMEOUT_TO_MS

#define WDF_TIMEOUT_TO_MS   ((LONGLONG) 1 * 10 * 1000)

Definition at line 58 of file wdfcore.h.

◆ WDF_TIMEOUT_TO_SEC

#define WDF_TIMEOUT_TO_SEC   ((LONGLONG) 1 * 10 * 1000 * 1000)

Definition at line 57 of file wdfcore.h.

◆ WDF_TIMEOUT_TO_US

#define WDF_TIMEOUT_TO_US   ((LONGLONG) 1 * 10)

Definition at line 59 of file wdfcore.h.

Function Documentation

◆ WDF_ABS_TIMEOUT_IN_MS()

FORCEINLINE LONGLONG WDF_ABS_TIMEOUT_IN_MS ( _In_ ULONGLONG  Time)

Definition at line 89 of file wdfcore.h.

92 {
93  return Time * 1 * WDF_TIMEOUT_TO_MS;
94 }
#define WDF_TIMEOUT_TO_MS
Definition: wdfcore.h:58
static PLARGE_INTEGER Time
Definition: time.c:105

◆ WDF_ABS_TIMEOUT_IN_SEC()

FORCEINLINE LONGLONG WDF_ABS_TIMEOUT_IN_SEC ( _In_ ULONGLONG  Time)

Definition at line 71 of file wdfcore.h.

74 {
75  return Time * 1 * WDF_TIMEOUT_TO_SEC;
76 }
#define WDF_TIMEOUT_TO_SEC
Definition: wdfcore.h:57
static PLARGE_INTEGER Time
Definition: time.c:105

Referenced by IsLoggingEnabledAndNeeded(), and FxPkgPnp::PnpIncrementRestartCountLogic().

◆ WDF_ABS_TIMEOUT_IN_US()

FORCEINLINE LONGLONG WDF_ABS_TIMEOUT_IN_US ( _In_ ULONGLONG  Time)

Definition at line 107 of file wdfcore.h.

110 {
111  return Time * 1 * WDF_TIMEOUT_TO_US;
112 }
#define WDF_TIMEOUT_TO_US
Definition: wdfcore.h:59
static PLARGE_INTEGER Time
Definition: time.c:105

◆ WDF_ALIGN_SIZE_DOWN()

FORCEINLINE size_t WDF_ALIGN_SIZE_DOWN ( _In_ size_t  Length,
_In_ size_t  AlignTo 
)

Definition at line 119 of file wdfcore.h.

123 {
124  return Length & ~(AlignTo - 1);
125 }
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101

Referenced by WDF_ALIGN_SIZE_UP().

◆ WDF_ALIGN_SIZE_UP()

FORCEINLINE size_t WDF_ALIGN_SIZE_UP ( _In_ size_t  Length,
_In_ size_t  AlignTo 
)

Definition at line 129 of file wdfcore.h.

133 {
134  return WDF_ALIGN_SIZE_DOWN(Length + AlignTo - 1, AlignTo);
135 }
FORCEINLINE size_t WDF_ALIGN_SIZE_DOWN(_In_ size_t Length, _In_ size_t AlignTo)
Definition: wdfcore.h:119
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101

Referenced by FxChildList::_ComputeTotalDescriptionSize(), FxWmiIrpHandler::_QueryAllData(), FxCalculateObjectTotalSize2(), FxDeviceDescriptionEntry::FxDeviceDescriptionEntry(), and FxSpinLock::GetHistory().

◆ WDF_REL_TIMEOUT_IN_MS()

FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_MS ( _In_ ULONGLONG  Time)

Definition at line 80 of file wdfcore.h.

83 {
84  return Time * -1 * WDF_TIMEOUT_TO_MS;
85 }
#define WDF_TIMEOUT_TO_MS
Definition: wdfcore.h:58
static PLARGE_INTEGER Time
Definition: time.c:105

Referenced by FxPkgPnp::PowerPolicySendDevicePowerRequest(), and FxPkgPnp::PowerPolicySetS0IdleSettings().

◆ WDF_REL_TIMEOUT_IN_SEC()

◆ WDF_REL_TIMEOUT_IN_US()

FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_US ( _In_ ULONGLONG  Time)

Definition at line 98 of file wdfcore.h.

101 {
102  return Time * -1 * WDF_TIMEOUT_TO_US;
103 }
#define WDF_TIMEOUT_TO_US
Definition: wdfcore.h:59
static PLARGE_INTEGER Time
Definition: time.c:105