reactos/sdk/lib/drivers/wdf/shared/core/fxdevicecontrolapi.cpp
Victor Perevertkin 1f377076d7
[WDF] Fix KMDF so it can compile with ReactOS SDK
Not all files are included, but these are necessary to compile cdrom driver.
So far it can only be statically linked with drivers, a proper
implementation requires wdfldr helper driver
2020-11-03 00:06:27 +03:00

68 lines
1.3 KiB
C++

/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
FxDeviceControlAPI.cpp
Abstract:
This module implements external DDIs for control devices
Author:
Environment:
Both kernel and user mode
Revision History:
--*/
#include "coreprivshared.hpp"
extern "C" {
// #include "FxDeviceControlAPI.tmh"
}
extern "C" {
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfControlFinishInitializing)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
__in
WDFDEVICE Device
)
{
PFX_DRIVER_GLOBALS pFxDriverGlobals;
FxDevice* pDevice;
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals),
Device,
FX_TYPE_DEVICE,
(PVOID*) &pDevice,
&pFxDriverGlobals);
MxDeviceObject device(pDevice->GetDeviceObject());
if (pDevice->IsLegacy()) {
// pDevice->m_PkgWmi->Register(); __REACTOS__
device.SetFlags(device.GetFlags() & ~DO_DEVICE_INITIALIZING);
}
else {
DoTraceLevelMessage(
pFxDriverGlobals, TRACE_LEVEL_ERROR, TRACINGDEVICE,
"WDFDEVICE %p not a control device", Device);
FxVerifierDbgBreakPoint(pFxDriverGlobals);
}
}
} // entire extern "C" for the file