[WDF] Add Windows Driver Framework files

Takern from Microsoft GitHub repo:
d9c6040fe9

Licensed under MIT
This commit is contained in:
Victor Perevertkin 2020-09-24 23:51:15 +03:00
parent 545df81502
commit 8a978a179f
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
475 changed files with 285099 additions and 0 deletions

View file

@ -0,0 +1,107 @@
/*++
Copyright (c) Microsoft Corporation
ModuleName:
MxDrierObjet.h
Abstract:
Mode agnostic definition of Driver Object
See MxDriverObjectKm.h and MxDriverObjectUm.h/cpp for mode
specific implementations
--*/
#pragma once
//
// Forward declare enum
//
enum FxDriverObjectUmFlags : USHORT;
class MxDriverObject
{
private:
//
// MdDeviceObject is typedef'ed to appropriate type for the mode
// in the mode specific file
//
MdDriverObject m_DriverObject;
public:
__inline
MxDriverObject(
__in MdDriverObject DriverObject
) :
m_DriverObject(DriverObject)
{
}
__inline
MxDriverObject(
VOID
) :
m_DriverObject(NULL)
{
}
__inline
MdDriverObject
GetObject(
VOID
)
{
return m_DriverObject;
}
__inline
VOID
SetObject(
__in_opt MdDriverObject DriverObject
)
{
m_DriverObject = DriverObject;
}
PVOID
GetDriverExtensionAddDevice(
VOID
);
VOID
SetDriverExtensionAddDevice(
_In_ MdDriverAddDevice Value
);
MdDriverUnload
GetDriverUnload(
VOID
);
VOID
SetDriverUnload(
_In_ MdDriverUnload Value
);
VOID
SetMajorFunction(
_In_ UCHAR i,
_In_ MdDriverDispatch Value
);
VOID
SetDriverObjectFlag(
_In_ FxDriverObjectUmFlags Flag
);
BOOLEAN
IsDriverObjectFlagSet(
_In_ FxDriverObjectUmFlags Flag
);
};