ReactOS  0.4.15-dev-3165-gdf6fff7
fxdriver.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxDriver.cpp
8 
9 Abstract:
10 
11  This is the main driver framework.
12 
13 Author:
14 
15 
16 
17 Environment:
18 
19  Both kernel and user mode
20 
21 Revision History:
22 
23 --*/
24 
25 #include "coreprivshared.hpp"
26 #include "fxiotarget.hpp"
27 
28 // Tracing support
29 extern "C" {
30 // #include "FxDriver.tmh"
31 }
32 
34  __in MdDriverObject ArgDriverObject,
36  __in PFX_DRIVER_GLOBALS FxDriverGlobals
37  ) :
38  FxNonPagedObject(FX_TYPE_DRIVER, sizeof(FxDriver), FxDriverGlobals),
39  m_DriverObject(ArgDriverObject),
40  m_CallbackMutexLock(FxDriverGlobals)
41 {
43 
44 
45 
46 
47 
48 
49 #if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
51 #else
53 #endif
54 
56 
59 
61 
62  //
63  // These are initialized up front so that sub objects
64  // can have the right configuration
65  //
67 
68  // Only copy the smallest of what is specified and our size
70 
72 
73 #if FX_IS_USER_MODE
74  m_DriverParametersKey = NULL;
75 #endif
76 }
77 
79 {
80  // Make it always present right now even on free builds
81  if (IsDisposed() == FALSE) {
84  "FxDriver 0x%p not disposed: this maybe a driver reference count "
85  "problem with WDFDRIVER 0x%p", this, GetObjectHandleUnchecked());
86 
90  (ULONG_PTR) this);
91  }
92 
93  //
94  // Free the memory for the registry path if required.
95  //
96  if (m_RegistryPath.Buffer) {
98  }
99 
100  if (m_DisposeList != NULL) {
102  }
103 
104 #if FX_IS_USER_MODE
105  //
106  // Close the R/W handle to the driver's service parameters key
107  // that we opened during Initialize.
108  //
109  if (m_DriverParametersKey != NULL) {
110  NTSTATUS status = FxRegKey::_Close(m_DriverParametersKey);
111  if (!NT_SUCCESS(status)) {
113  "Cannot close Driver Parameters key %!STATUS!",
114  status);
115  }
116  m_DriverParametersKey = NULL;
117  }
118 
119  //
120  // The host-created driver object holds a reference to this
121  // FxDriver object. Clear it, since this object was deleted.
122  //
123  ClearDriverObjectFxDriver();
124 #endif
125 }
126 
127 BOOLEAN
129  VOID
130  )
131 {
132  if (m_DisposeList != NULL) {
134  }
135 
136  return FxNonPagedObject::Dispose(); // __super call
137 }
138 
139 VOID
142  )
143 {
145  FxDriver *pDriver;
146 
148  if (pDriver == NULL) {
149  return;
150  }
151 
153 
155  "Unloading WDFDRIVER %p, PDRIVER_OBJECT_UM %p",
157  //
158  // Invoke the driver if they specified an unload routine.
159  //
163  "Driver unload routine Exit WDFDRIVER %p, PDRIVER_OBJECT_UM %p",
165  }
166 
167  //
168  // Delete the FxDriver object.
169  //
170  // This releases the FxDriver reference. Must be called at PASSIVE
171  //
173 
175 
177 }
178 
179 VOID
181  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
183  )
184 /*++
185 
186 Routine Description:
187  Create a CHAR version of the service name contained in RegistryPath.
188 
189 Arguments:
190  RegistryPath - the path to the service name in the registry.
191 
192 Return Value:
193  None
194 
195  --*/
196 {
197  PWCHAR pCur, pBegin, pEnd;
198 
199  RtlZeroMemory(&FxDriverGlobals->Public.DriverName[0],
200  sizeof(FxDriverGlobals->Public.DriverName) );
201 
202  if (RegistryPath == NULL) {
203  return;
204  }
205 
206  pBegin = RegistryPath->Buffer;
207 
208  //
209  // pEnd is one past the end of the string, while pCur is a pointer to the
210  // last character of the string. We will decrement pCur down towards the
211  // beginning of the string.
212  //
213  pEnd = pBegin + (RegistryPath->Length / sizeof(WCHAR));
214  pCur = pEnd - 1;
215 
216  for ( ; *pCur != L'\\' && pCur != pBegin; pCur--) {
217  DO_NOTHING();
218  }
219 
220  if (pCur != pBegin && *pCur == L'\\') {
221  size_t regLen;
222  ULONG i;
223 
224  pCur++;
225 
226  //
227  // Can't use wcslen becuase this is a UNICODE_STRING which means that it
228  // does not necessarily have a terminating NULL in the buffer.
229  //
230  regLen = pEnd - pCur;
231  if (regLen > WDF_DRIVER_GLOBALS_NAME_LEN-1) {
232  regLen = WDF_DRIVER_GLOBALS_NAME_LEN-1;
233  }
234 
235 
236  for (i = 0; i < regLen; i++) {
237  FxDriverGlobals->Public.DriverName[i] = (CHAR) pCur[i];
238  }
239  }
240  else {
242 
243 #if FX_CORE_MODE==FX_CORE_KERNEL_MODE
244  status = RtlStringCbCopyA(FxDriverGlobals->Public.DriverName,
245  sizeof(FxDriverGlobals->Public.DriverName),
246  "WDF");
247 #else // USER_MODE
248  HRESULT hr;
249  hr = StringCbCopyA(FxDriverGlobals->Public.DriverName,
250  sizeof(FxDriverGlobals->Public.DriverName),
251  "WDF");
254  }
255  else {
257  }
258 #endif
259 
262  }
263 }
264 
265 VOID
267  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
269  )
270 /*++
271 
272 Routine Description:
273  Tries to create a tag for the driver based off of its name. This tag is
274  used for allocations made on behalf of the driver so that it is easier to
275  track which allocations belong to which image.
276 
277 Arguments:
278  Config - driver writer provided config. in the future, may contain a tag
279  value in it
280 
281 Return Value:
282  None
283 
284  --*/
285 {
286  PCHAR pBegin;
287  size_t length;
288 
290 
291  length = strlen(FxDriverGlobals->Public.DriverName);
292  pBegin = &FxDriverGlobals->Public.DriverName[0];
293 
294  if (length >= 3) {
295  //
296  // If the driver name begins with "WDF" (case insensitive), start after
297  // "WDF"
298  //
299  if ((pBegin[0] == 'w' || pBegin[0] == 'W') &&
300  (pBegin[1] == 'd' || pBegin[1] == 'D') &&
301  (pBegin[2] == 'f' || pBegin[2] == 'F')) {
302  length -=3;
303  pBegin += 3;
304  }
305  }
306 
307  if (length <= 2) {
308  //
309  // 2 or less characters is not a unique enough tag, just use the default
310  // tag.
311  //
312  FxDriverGlobals->Tag = FX_TAG;
313  }
314  else {
315 
316  if (length > sizeof(ULONG)) {
317  length = sizeof(ULONG);
318  }
319 
320  //
321  // This copies the bytes in the right order (so that they appear correct
322  // when dumped as a sequence of chars)
323  //
324  RtlCopyMemory(&FxDriverGlobals->Tag,
325  pBegin,
326  length);
327 
328  FxDriverGlobals->Public.DriverTag = FxDriverGlobals->Tag;
329  }
330 }
331 
333 NTSTATUS
335  __in PCUNICODE_STRING ArgRegistryPath,
338  )
339 {
340  PFX_DRIVER_GLOBALS FxDriverGlobals = GetDriverGlobals();
342 
343  // WDFDRIVER can not be deleted by the device driver
344  MarkNoDeleteDDI();
345 
347 
348  //
349  // Configure Constraints
350  //
352 
353  if (m_DriverObject.GetObject() == NULL) {
354  return STATUS_UNSUCCESSFUL;
355  }
356 
357  // Allocate FxDisposeList
359  if (!NT_SUCCESS(status)) {
360  return status;
361  }
362 
363  //
364  // Store FxDriver in Driver object extension
365  //
367  if (!NT_SUCCESS(status)) {
368  return status;
369  }
370 
371  //
372  // Store away the callback functions.
373  //
374  if ((Config->DriverInitFlags & WdfDriverInitNoDispatchOverride) == 0) {
375  //
376  // Caller doesn't want to override the dispatch table. That
377  // means that they want to create everything and still be in
378  // control (or at least the port driver will take over)
379  //
380  m_DriverDeviceAdd.Method = Config->EvtDriverDeviceAdd;
381  m_DriverUnload.Method = Config->EvtDriverUnload;
382  }
383 
384  if (ArgRegistryPath != NULL) {
385  USHORT length;
386 
387  length = ArgRegistryPath->Length + sizeof(UNICODE_NULL);
388 
389  m_RegistryPath.Length = ArgRegistryPath->Length;
391  m_RegistryPath.Buffer = (PWSTR) FxPoolAllocate(
393 
394  if (m_RegistryPath.Buffer != NULL) {
396  ArgRegistryPath->Buffer,
397  ArgRegistryPath->Length);
398 
399  //
400  // other parts of WDF assumes m_RegistryPath.Buffer is
401  // a null terminated string. make sure it is.
402  //
404  }
405  else {
406  //
407  // We failed to allocate space for the registry path
408  // so set the length to 0.
409  //
412 
414  }
415  }
416 
417  if (NT_SUCCESS(status)) {
418  if ((Config->DriverInitFlags & WdfDriverInitNoDispatchOverride) == 0) {
419  UCHAR i;
420 
421  //
422  // Set up dispatch routines.
423  //
424  if (Config->DriverInitFlags & WdfDriverInitNonPnpDriver) {
425  //
426  // NT4 style drivers must clear the AddDevice field in the
427  // driver object so that they can be unloaded while still
428  // having device objects around.
429  //
430  // If AddDevice is set, NT considers the driver a pnp driver
431  // and will not allow net stop to unload the driver.
432  //
434 
435  //
436  // Unload for an NT4 driver is still optional if the driver
437  // does not want to be stopped (through net stop for
438  // instance).
439  //
440  if (Config->EvtDriverUnload != NULL) {
442  }
443  else {
445  }
446 
447  }
448  else {
449  //
450  // PnP driver, set our routines up
451  //
454  }
455 
456  //
457  // For any major control code that we use a remove lock, the
458  // following locations must be updated:
459  //
460  // 1) FxDevice::_RequiresRemLock() which decides if the remlock
461  // is required
462  // 2) FxDefaultIrpHandler::Dispatch might need to be changed if
463  // there is catchall generic post processing that must be done
464  // 3) Whereever the major code irp handler completes the irp or
465  // sends it down the stack. A good design would have all
466  // spots in the irp handler where this is done to call a
467  // common function.
468  //
470 
471 #if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
472  for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++) {
475  }
476  else {
478  }
479  }
480 #else // USER_MODE
481  for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++) {
484  }
485  else {
487  }
488  }
489 #endif
490  }
491 
492  //
493  // Determine if the debugger is connected.
494  //
495 #if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
498  }
499 #endif
500 
501  //
502  // Log this notable event after tracing has been initialized.
503  //
504 
505 
506 
507 
508 
509 
510  if ((Config->DriverInitFlags & WdfDriverInitNonPnpDriver) &&
511  Config->EvtDriverUnload == NULL) {
512 
514  FxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGDRIVER,
515  "Driver Object %p, reg path %wZ cannot be "
516  "unloaded, no DriverUnload routine specified",
518  }
519 
520 #if FX_IS_USER_MODE
521  //
522  // Open a R/W handle to the driver's service parameters key
523  //
524  status = OpenParametersKey();
525  if (!NT_SUCCESS(status)) {
527  FxDriverGlobals, TRACE_LEVEL_ERROR, TRACINGDRIVER,
528  "Cannot open Driver Parameters key %!STATUS!",
529  status);
530  }
531 #endif
532  }
533 
534  return status;
535 }
536 
538 FxString *
540  VOID
541  )
542 {
543  FxString *pString;
544 
547 
548  if (pString != NULL) {
550 
552 
553  if (!NT_SUCCESS(status)) {
554  pString->Release();
555  pString = NULL;
556  }
557  }
558 
559  return pString;
560 }
561 
562 
563 VOID
566  )
567 /*++
568 
569 Routine Description:
570 
571  Determine the pointer to the proper lock to acquire
572  for event callbacks from the FxDriver to the device driver
573  depending on the configured locking model.
574 
575 Arguments:
576  DriverAttributes - caller supplied scope and level, used only if they
577  are not InheritFromParent.
578 
579 Returns:
580  None
581 
582 --*/
583 {
584  BOOLEAN automaticLockingRequired;
585 
586  automaticLockingRequired = FALSE;
587 
588  // Initialize the mutex lock
590 
591 
592 
593 
594 
595 
596 
597 
598 
600 
603 
604  //
605  // Use the caller supplied scope and level only if they are not
606  // InheritFromParent.
607  //
608  if (DriverAttributes != NULL) {
609 
610  if (DriverAttributes->ExecutionLevel !=
612  m_ExecutionLevel = DriverAttributes->ExecutionLevel;
613  }
614 
615  if (DriverAttributes->SynchronizationScope !=
617  m_SynchronizationScope = DriverAttributes->SynchronizationScope;
618  }
619  }
620 
621  //
622  // If the driver asks for any synchronization, we synchronize the
623  // WDFDRIVER object's own callbacks as well.
624  //
625  // (No option to extend synchronization for regular operations
626  // across all WDFDEVICE objects)
627  //
630 
631  automaticLockingRequired = TRUE;
632  }
633 
634  //
635  // No FxDriver events are delivered from a thread that is
636  // not already at PASSIVE_LEVEL, so we don't need to
637  // allocate an FxSystemWorkItem if the execution level
638  // constraint is WdfExecutionLevelPassive.
639  //
640  // If any events are added FxDriver that could occur on a thread
641  // that is above PASSIVE_LEVEL, then an FxSystemWorkItem would
642  // need to be allocated to deliver those events similar to the
643  // code in FxIoQueue.
644  //
645 
646  //
647  // Configure FxDriver event callback locks
648  //
649  if (automaticLockingRequired) {
651  }
652  else {
654  }
655 }
656 
signed char * PCHAR
Definition: retypes.h:7
static VOID DispatchUm(_In_ MdDeviceObject DeviceObject, _In_ MdIrp Irp, _In_opt_ IUnknown *Context)
Definition: fxdeviceum.cpp:32
virtual VOID DeleteObject(VOID)
_Must_inspect_result_ FxString * GetRegistryPath(VOID)
Definition: fxdriver.cpp:539
static MdDriverUnloadType Unload
Definition: fxdriver.hpp:369
PFN_WDF_DRIVER_DEVICE_ADD Method
VOID ConfigureConstraints(__in_opt PWDF_OBJECT_ATTRIBUTES DriverAttributes)
Definition: fxdriver.cpp:564
virtual ULONG Release(__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
Definition: fxobject.hpp:853
FxCallbackMutexLock m_CallbackMutexLock
Definition: fxdriver.hpp:93
NTSTATUS WinErrorToNtStatus(__in ULONG WinError)
Definition: errtostatus.cpp:60
#define IRP_MN_REMOVE_DEVICE
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
HRESULT hr
Definition: shlfolder.c:183
GLint x0
Definition: linetemp.h:95
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
USHORT MaximumLength
Definition: env_spec_w32.h:370
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define __in_opt
Definition: dbghelp.h:38
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
uint16_t * PWSTR
Definition: typedefs.h:56
FxDisposeList * m_DisposeList
Definition: fxdriver.hpp:111
WDFCASSERT(sizeof(WDF_DRIVER_CONFIG_V1_0)==sizeof(WDF_DRIVER_CONFIG_V1_1))
_Must_inspect_result_ NTSTATUS Initialize(__in PCUNICODE_STRING RegistryPath, __in PWDF_DRIVER_CONFIG Config, __in_opt PWDF_OBJECT_ATTRIBUTES DriverAttributes)
Definition: fxdriver.cpp:334
#define IRP_MJ_MAXIMUM_FUNCTION
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
#define TRACINGDRIVER
Definition: dbgtrace.h:68
#define KD_DEBUGGER_NOT_PRESENT
Definition: kdfuncs.h:133
static VOID DispatchWithLockUm(_In_ MdDeviceObject DeviceObject, _In_ MdIrp Irp, _In_opt_ IUnknown *Context)
Definition: fxdeviceum.cpp:48
uint16_t * PWCHAR
Definition: typedefs.h:56
#define TRACE_LEVEL_INFORMATION
Definition: storswtr.h:29
static _Must_inspect_result_ NTSTATUS STDCALL DispatchWithLock(__in MdDeviceObject DeviceObject, __in MdIrp OriginalIrp)
Definition: fxdevice.cpp:1336
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
NTSTRSAFEAPI RtlStringCbCopyA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:156
#define FALSE
Definition: types.h:117
#define UNICODE_NULL
FORCEINLINE VOID WDF_DRIVER_CONFIG_INIT(_Out_ PWDF_DRIVER_CONFIG Config, _In_opt_ PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd)
Definition: wdfdriver.h:148
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
FxObject * m_CallbackLockObjectPtr
Definition: fxdriver.hpp:101
#define TRACE_LEVEL_FATAL
Definition: storswtr.h:26
#define HRESULT_FACILITY(hr)
Definition: winerror.h:79
if SUCCEEDED(hr)
FxDriver * Driver
Definition: fxglobals.h:374
VOID SetMajorFunction(_In_ UCHAR i, _In_ MdDriverDispatch Value)
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
PFN_WDF_DRIVER_UNLOAD Method
VOID MarkDisposeOverride(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:1101
unsigned char BOOLEAN
#define FX_TAG
Definition: fxmacros.hpp:155
STRSAFEAPI StringCbCopyA(STRSAFE_LPSTR pszDest, size_t cbDest, STRSAFE_LPCSTR pszSrc)
Definition: strsafe.h:161
static FxDriver * GetFxDriver(__in MdDriverObject DriverObject)
Definition: fxdriverkm.cpp:159
static VOID _InitializeTag(__in PFX_DRIVER_GLOBALS Globals, __in PWDF_DRIVER_CONFIG Config)
Definition: fxdriver.cpp:266
_Must_inspect_result_ NTSTATUS AllocateDriverObjectExtensionAndStoreFxDriver(VOID)
Definition: fxdriverkm.cpp:130
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
VOID MarkPassiveCallbacks(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:972
__inline WDFDRIVER GetHandle(VOID)
Definition: fxdriver.hpp:202
FxDriver * pDriver
FxCallbackLock * m_CallbackLockPtr
Definition: fxdriver.hpp:100
PFX_DRIVER_GLOBALS pFxDriverGlobals
#define ASSERT(a)
Definition: mode.c:44
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOLEAN IsDisposed(VOID)
Definition: fxobject.hpp:1241
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
LONG HRESULT
Definition: typedefs.h:79
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES DriverAttributes
Definition: wdfdriver.h:213
#define KD_DEBUGGER_ENABLED
Definition: kdfuncs.h:130
virtual VOID DeleteObject(VOID)
Definition: fxdriver.hpp:332
_Must_inspect_result_ NTSTATUS Assign(__in PCWSTR SourceString)
Definition: fxstring.cpp:57
WDF_DRIVER_CONFIG m_Config
Definition: fxdriver.hpp:106
static MdDriverAddDeviceType AddDevice
Definition: fxdriver.hpp:125
VOID SetDriverUnload(_In_ MdDriverUnload Value)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
unsigned char UCHAR
Definition: xmlstorage.h:181
void SetCallbackLockPtr(FxCallbackLock *Lock)
Definition: fxcallback.hpp:105
PVOID __inline GetObjectHandleUnchecked(VOID)
Definition: fxobject.hpp:446
static const WCHAR L[]
Definition: oid.c:1250
virtual void Initialize(FxObject *ParentObject)
VOID MarkNoDeleteDDI(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:1118
WDF_EXECUTION_LEVEL m_ExecutionLevel
Definition: fxdriver.hpp:77
#define _Must_inspect_result_
Definition: ms_sal.h:558
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
__inline MdDriverObject GetObject(VOID)
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
#define FACILITY_WIN32
Definition: winerror.h:27
FxDriverUnload m_DriverUnload
Definition: fxdriver.hpp:130
static NTSTATUS _Create(PFX_DRIVER_GLOBALS FxDriverGlobals, PVOID WdmObject, FxDisposeList **pObject)
WDF_SYNCHRONIZATION_SCOPE m_SynchronizationScope
Definition: fxdriver.hpp:78
FxString * pString
VOID FxDestroy(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: globals.cpp:981
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
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
unsigned short USHORT
Definition: pedump.c:61
SINGLE_LIST_ENTRY * pCur
UNICODE_STRING m_RegistryPath
Definition: fxdriver.hpp:63
VOID WaitForEmpty(VOID)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
static FxDeviceRemLockAction __inline _RequiresRemLock(__in UCHAR MajorCode, __in UCHAR MinorCode)
Definition: fxdevice.hpp:933
#define min(a, b)
Definition: monoChain.cc:55
#define NULL
Definition: types.h:112
void Invoke(__in WDFDRIVER Driver)
#define WDF_NO_OBJECT_ATTRIBUTES
Definition: wdftypes.h:105
~FxDriver()
Definition: fxdriver.cpp:78
#define HRESULT_CODE(hr)
Definition: winerror.h:76
unsigned int ULONG
Definition: retypes.h:1
BOOLEAN m_DebuggerConnected
Definition: fxdriver.hpp:65
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define STATUS_SUCCESS
Definition: shellext.h:65
FxDriver(__in MdDriverObject DriverObject, __in PWDF_DRIVER_CONFIG DriverConfig, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxdriver.cpp:33
virtual BOOLEAN Dispose(VOID)
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361
static _Must_inspect_result_ NTSTATUS STDCALL Dispatch(__in MdDeviceObject DeviceObject, __in MdIrp OriginalIrp)
Definition: fxdevice.cpp:1551
VOID SetDriverExtensionAddDevice(_In_ MdDriverAddDevice Value)
static VOID _InitializeDriverName(__in PFX_DRIVER_GLOBALS Globals, __in PCUNICODE_STRING RegistryPath)
Definition: fxdriver.cpp:180
#define __in
Definition: dbghelp.h:35
#define CHAR(Char)
static SERVICE_STATUS status
Definition: service.c:31
virtual BOOLEAN Dispose(VOID)
Definition: fxdriver.cpp:128
#define WDF_DRIVER_GLOBALS_NAME_LEN
Definition: wdfglobals.h:51
MxDriverObject m_DriverObject
Definition: fxdriver.hpp:62
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213
FxDriverDeviceAdd m_DriverDeviceAdd
Definition: fxdriver.hpp:70
#define DO_NOTHING()
Definition: mxgeneral.h:32
Definition: ps.c:97