[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
This commit is contained in:
Victor Perevertkin 2020-10-16 06:30:51 +03:00
parent 8a978a179f
commit 1f377076d7
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
258 changed files with 4047 additions and 2387 deletions

View file

@ -11,3 +11,4 @@ add_subdirectory(rdbsslib)
add_subdirectory(rtlver)
add_subdirectory(rxce)
add_subdirectory(sound)
add_subdirectory(wdf)

View file

@ -0,0 +1,217 @@
remove_definitions(-D_WIN32_WINNT=0x502)
list(APPEND SOURCE_SHARED
shared/core/fxcxdeviceinit.cpp
# shared/core/fxcxdeviceinitapi.cpp
shared/core/fxdevice.cpp
shared/core/fxdeviceapi.cpp
shared/core/fxdevicebase.cpp
shared/core/fxdevicecontrolapi.cpp
shared/core/fxdeviceinit.cpp
shared/core/fxdeviceinitapi.cpp
shared/core/fxdisposelist.cpp
shared/core/fxdriver.cpp
shared/core/fxdriverapi.cpp
shared/core/fxfileobject.cpp
shared/core/fxfileobjectapi.cpp
shared/core/fxirpqueue.cpp
# shared/core/fxlock.cpp
shared/core/fxlookasidelist.cpp
shared/core/fxlookasidelistapi.cpp
shared/core/fxmemorybuffer.cpp
shared/core/fxmemorybufferapi.cpp
shared/core/fxmemorybufferfromlookaside.cpp
shared/core/fxmemorybufferfrompool.cpp
shared/core/fxmemorybufferpreallocated.cpp
shared/core/fxmemorybufferpreallocatedapi.cpp
shared/core/fxmemoryobject.cpp
shared/core/fxpagedlookasidelist.cpp
shared/core/fxrequest.cpp
shared/core/fxrequestapi.cpp
shared/core/fxrequestbase.cpp
shared/core/fxrequestcontext.cpp
shared/core/fxrequestmemory.cpp
shared/core/fxrequestoutputbuffer.cpp
shared/core/fxrequestsystembuffer.cpp
shared/core/fxsyncrequest.cpp
shared/core/fxsystemworkitem.cpp
shared/core/fxtimer.cpp
shared/core/fxtimerapi.cpp
shared/core/fxworkitem.cpp
shared/core/fxworkitemapi.cpp
# shared/core/verifierapi.cpp
shared/irphandlers/default/fxdefaultirphandler.cpp
shared/irphandlers/general/fxpkggeneral.cpp
shared/irphandlers/io/fxioqueue.cpp
shared/irphandlers/io/fxioqueueapi.cpp
shared/irphandlers/io/fxpkgio.cpp
shared/irphandlers/package/fxpackage.cpp
# shared/irphandlers/pnp/devicepwrreqstatemachine.cpp
shared/irphandlers/pnp/eventqueue.cpp
shared/irphandlers/pnp/fdopower.cpp
# shared/irphandlers/pnp/fxinterruptapi.cpp
shared/irphandlers/pnp/fxpkgfdo.cpp
shared/irphandlers/pnp/fxpkgpdo.cpp
shared/irphandlers/pnp/fxpkgpnp.cpp
shared/irphandlers/pnp/interruptobject.cpp
shared/irphandlers/pnp/notpowerpolicyownerstatemachine.cpp
shared/irphandlers/pnp/pdopower.cpp
shared/irphandlers/pnp/pnpstatemachine.cpp
shared/irphandlers/pnp/poweridlestatemachine.cpp
shared/irphandlers/pnp/powerpolicystatemachine.cpp
shared/irphandlers/pnp/powerstatemachine.cpp
shared/irphandlers/pnp/poxinterface.cpp # stubs
shared/irphandlers/pnp/selfmanagediostatemachine.cpp
shared/irphandlers/pnp/wakeinterruptstatemachine.cpp
shared/object/dbgtrace.cpp
shared/object/fxobject.cpp
shared/object/fxobjectapi.cpp
shared/object/fxobjectstatemachine.cpp
shared/object/fxtagtracker.cpp
shared/object/fxuserobject.cpp
shared/object/fxuserobjectapi.cpp
shared/object/fxvalidatefunctions.cpp
shared/object/fxverifierbugcheck.cpp
shared/object/fxverifierlock.cpp
shared/object/globals.cpp
shared/object/handleapi.cpp
shared/object/wdfpool.cpp
shared/support/fxcollection.cpp
shared/support/fxcollectionapi.cpp
# shared/support/fxdeviceinterface.cpp
shared/support/fxdeviceinterfaceapi.cpp
shared/support/fxdevicetext.cpp
shared/support/fxregistryapi.cpp
shared/support/fxregkey.cpp
shared/support/fxrequestbuffer.cpp
# shared/support/fxresourceapi.cpp
shared/support/fxresourcecollection.cpp
shared/support/fxspinlock.cpp
shared/support/fxspinlockapi.cpp
shared/support/fxstring.cpp
shared/support/fxstringapi.cpp
# shared/support/fxtelemetry.cpp
shared/support/fxtransactionedlist.cpp
shared/support/fxwaitlock.cpp
shared/support/fxwaitlockapi.cpp
shared/support/stringutil.cpp
shared/targets/general/fxiotarget.cpp
shared/targets/general/fxiotargetapi.cpp
shared/targets/general/fxiotargetremote.cpp
shared/targets/general/fxiotargetself.cpp
# shared/targets/usb/fxusbdevice.cpp
# shared/targets/usb/fxusbdeviceapi.cpp
# shared/targets/usb/fxusbinterface.cpp
# shared/targets/usb/fxusbinterfaceapi.cpp
# shared/targets/usb/fxusbpipe.cpp
# shared/targets/usb/fxusbpipeapi.cpp
# shared/targets/usb/usbutil.cpp
)
list(APPEND SOURCE_KM
kmdf/src/core/fxbugcheckcallback.cpp
kmdf/src/core/fxchildlist.cpp
kmdf/src/core/fxchildlistapi.cpp
kmdf/src/core/fxdevicefdoapi.cpp
kmdf/src/core/fxdevicepdoapi.cpp
kmdf/src/core/fxdpc.cpp
kmdf/src/core/fxdpcapi.cpp
kmdf/src/core/fxsystemthread.cpp
# kmdf/src/core/tracing.cpp
# kmdf/src/dma/base/fxcommonbuffer.cpp # requires DMA stuff
# kmdf/src/dma/base/fxcommonbufferapi.cpp # requires DMA stuff
# kmdf/src/dma/base/fxdmaenabler.cpp
# kmdf/src/dma/base/fxdmaenablerapi.cpp
# kmdf/src/dma/base/fxdmatransaction.cpp
# kmdf/src/dma/base/fxdmatransactionapi.cpp
# kmdf/src/dynamic/version/version.cpp
kmdf/src/fxtosharedinterface/fxobject/fxobjectinfokm.cpp
# kmdf/src/irphandlers/wmi/fxwmiapi.cpp
# kmdf/src/irphandlers/wmi/fxwmiinstance.cpp
# kmdf/src/irphandlers/wmi/fxwmiirphandler.cpp
# kmdf/src/irphandlers/wmi/fxwmiprovider.cpp
# kmdf/src/librarycommon/fxlibrarycommon.cpp
kmdf/src/support/fxqueryinterface.cpp
kmdf/src/support/fxqueryinterfaceapi.cpp
kmdf/src/support/fxrelateddevice.cpp
kmdf/src/support/fxrelateddevicelist.cpp
kmdf/src/support/probeandlock.c
shared/core/km/fxdeviceapikm.cpp
shared/core/km/fxdevicebasekm.cpp
shared/core/km/fxdeviceinitkm.cpp
shared/core/km/fxdevicekm.cpp
shared/core/km/fxdriverapikm.cpp
shared/core/km/fxdriverkm.cpp
shared/core/km/fxfileobjectapikm.cpp
shared/core/km/fxfileobjectkm.cpp
shared/core/km/fxnpagedlookasidelistkm.cpp
shared/core/km/fxrequestkm.cpp
shared/core/km/fxrequestsystembufferkm.cpp
shared/irphandlers/io/km/fxioqueuekm.cpp
shared/irphandlers/pnp/km/eventqueuekm.cpp
shared/irphandlers/pnp/km/fxpkgfdokm.cpp
shared/irphandlers/pnp/km/fxpkgpdokm.cpp
shared/irphandlers/pnp/km/fxpkgpnpkm.cpp
shared/irphandlers/pnp/km/interruptobjectkm.cpp
shared/irphandlers/pnp/km/pnpstatemachinekm.cpp
shared/irphandlers/pnp/km/powerpolicystatemachinekm.cpp
shared/irphandlers/pnp/km/powerstatemachinekm.cpp # stubs
# shared/irphandlers/pnp/km/poxinterfacekm.cpp
shared/irphandlers/pnp/km/supportkm.cpp
shared/object/km/fxobjectkm.cpp
shared/object/km/globalskm.cpp
shared/object/km/wdfpoolkm.cpp
shared/primitives/km/mxgeneralkm.cpp
shared/support/km/fxdeviceinterfacekm.cpp
shared/support/km/fxregkeykm.cpp
shared/support/km/fxrequestbufferkm.cpp
shared/support/km/fxresourcecollectionkm.cpp
# shared/support/km/fxtelemetrykm.cpp
shared/targets/general/fxiotarget.cpp
shared/targets/general/fxiotargetapi.cpp
shared/targets/general/fxiotargetremote.cpp
shared/targets/general/fxiotargetself.cpp
shared/targets/general/km/fxiotargetapikm.cpp
shared/targets/general/km/fxiotargetkm.cpp
shared/targets/general/km/fxiotargetremotekm.cpp
reactos_special.cpp
)
# add_library(wdf01000 MODULE ${SOURCE})
# set_module_type(wdf01000 kernelmodedriver ENTRYPOINT 0)
# add_importlibs(wdf01000 ntoskrnl hal wdfldr)
# add_cd_file(TARGET wdf01000 DESTINATION reactos/system32/drivers FOR all)
# add_registry_inf(wdf01000_reg.inf)
add_library(wdf01000 ${SOURCE_SHARED} ${SOURCE_KM})
target_compile_definitions(wdf01000
PUBLIC WDF_DEVICE_NO_WDMSEC_H _WIN32_WINNT=0x603 NTDDI_VERSION=0x06030000 # NTDDI_WINBLUE
PRIVATE FX_CORE_MODE=1 FX_CORE_KERNEL_MODE=1
PRIVATE __WDF_MAJOR_VERSION=1 __WDF_MINOR_VERSION=17 __WDF_BUILD_NUMBER=7600)
target_include_directories(wdf01000
PUBLIC ${REACTOS_SOURCE_DIR}/sdk/include/wdf/kmdf/1.17
PRIVATE
shared/inc/primitives/common
shared/inc/primitives/km
shared/inc/private/common
shared/inc/private/km
kmdf/inc/private
shared/object # fxobjectpch.hpp
shared/support # fxsupportpch.hpp
shared/core # coreprivshared.hpp
shared/irphandlers # irphandlerspriv.hpp
shared/irphandlers/pnp # pnppriv.hpp
shared/irphandlers/pnp/km # pnpprivkm.hpp
)
target_link_libraries(wdf01000 ntoskrnl_vista ${PSEH_LIB})
if(GCC)
target_compile_options(wdf01000
PRIVATE -Wno-write-strings -Wno-unknown-pragmas -Wno-switch
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-reorder -Wno-invalid-offsetof -Wno-delete-non-virtual-dtor>)
endif()

View file

@ -28,19 +28,19 @@ extern "C" {
#include "mx.h"
}
#include "FxMacros.hpp"
#include "fxmacros.hpp"
extern "C" {
#include "wdf.h"
#include "wdmsec.h"
// #include "wdmsec.h"
#include "wdmguid.h"
#include "wdfdevicepri.h"
#include "wdfiotargetpri.h"
// #include "wdfdevicepri.h"
// #include "wdfiotargetpri.h"
#include "wdfcx.h"
#include "wdfldr.h"
#include <FxDynamicsWrapper.h>
#include <fxdynamicswrapper.h>
#include "wdf10.h"
#include "wdf11.h"
@ -57,152 +57,158 @@ extern "C" {
// Integer overflow functions
#include "ntintsafe.h"
#include "FxForward.hpp"
#include "fxforward.hpp"
//KMDF defines for shared type names
#include "FxTypeDefsKm.hpp"
#include "fxtypedefskm.hpp"
// #include "fxwmicompat.h"
// #include "fxtrace.h"
#if defined(EVENT_TRACING)
#include "fxwmicompat.h"
#include "fxtrace.h"
#else
#include "dbgtrace.h"
#endif // EVENT_TRACING
#include "fxtypes.h"
#include "fxrequestcontexttypes.h"
#include "fxpool.h"
#include "FxGlobalsKM.h"
#include "FxPoolInlines.hpp"
#include "fxglobalskm.h"
#include "fxpoolinlines.hpp"
#include "fxverifier.h"
#include "fxverifierkm.h"
#include "FxMdl.h"
#include "FxProbeAndLock.h"
#include "fxmdl.h"
#include "fxprobeandlock.h"
#include "FxPerfTraceKm.hpp"
#include "DriverFrameworks-KernelMode-KmEvents.h"
#include "fxperftracekm.hpp"
// #include "DriverFrameworks-KernelMode-KmEvents.h"
#include <NtStrSafe.h>
#include <ntstrsafe.h>
#include "FxStump.hpp"
#include "fxstump.hpp"
#include "FxRequestBuffer.hpp"
#include "fxrequestbuffer.hpp"
#include "FxTagTracker.hpp"
#include "fxtagtracker.hpp"
// internal locks
#include "FxVerifierLock.hpp"
#include "FxLock.hpp"
#include "fxverifierlock.hpp"
#include "fxlock.hpp"
// base objects
#include "fxobject.hpp"
#include "FxPagedObject.hpp"
#include "FxNonPagedObject.hpp"
#include "fxpagedobject.hpp"
#include "fxnonpagedobject.hpp"
#include "fxhandle.h"
// external locks
#include "FxWaitLock.hpp"
#include "FxSpinLock.hpp"
#include "fxwaitlock.hpp"
#include "fxspinlock.hpp"
// utitilty classes and functions
#include "FxTransactionedList.hpp"
#include "FxRelatedDeviceList.hpp"
#include "FxDisposeList.hpp"
#include "FxCollection.hpp"
#include "StringUtil.hpp"
#include "fxtransactionedlist.hpp"
#include "fxrelateddevicelist.hpp"
#include "fxdisposelist.hpp"
#include "fxcollection.hpp"
#include "stringutil.hpp"
// abstract classes
#include "IFxHasCallbacks.hpp"
#include "ifxhascallbacks.hpp"
// callback delegation and locking
#include "FxSystemThread.hpp"
#include "FxSystemWorkItem.hpp"
#include "FxCallbackLock.hpp"
#include "FxCallbackSpinLock.hpp"
#include "FxCallbackMutexLock.hpp"
#include "FxCallback.hpp"
#include "FxSystemThread.hpp"
#include "fxsystemthread.hpp"
#include "fxsystemworkitem.hpp"
#include "fxcallbacklock.hpp"
#include "fxcallbackspinlock.hpp"
#include "fxcallbackmutexlock.hpp"
#include "fxcallback.hpp"
#include "fxsystemthread.hpp"
#include "IFxMemory.hpp"
#include "FxLookasideList.hpp"
#include "FxNPagedLookasideList.hpp"
#include "FxPagedLookasideList.hpp"
#include "FxMemoryObject.hpp"
#include "FxMemoryBuffer.hpp"
#include "FxMemoryBufferFromPool.hpp"
#include "FxMemoryBufferPreallocated.hpp"
#include "FxMemoryBufferFromLookaside.hpp"
#include "FxRequestMemory.hpp"
#include "FxRegKey.hpp"
#include "FxAutoRegistry.hpp"
#include "FxAutoString.hpp"
#include "FxString.hpp"
#include "ifxmemory.hpp"
#include "fxlookasidelist.hpp"
#include "fxnpagedlookasidelist.hpp"
#include "fxpagedlookasidelist.hpp"
#include "fxmemoryobject.hpp"
#include "fxmemorybuffer.hpp"
#include "fxmemorybufferfrompool.hpp"
#include "fxmemorybufferpreallocated.hpp"
#include "fxmemorybufferfromlookaside.hpp"
#include "fxrequestmemory.hpp"
#include "fxregkey.hpp"
#include "fxautoregistry.hpp"
#include "fxautostring.hpp"
#include "fxstring.hpp"
#include "FxValidateFunctions.hpp"
#include "FxRequestValidateFunctions.hpp"
#include "fxvalidatefunctions.hpp"
#include "fxrequestvalidatefunctions.hpp"
#include "FxResource.hpp"
#include "FxRelatedDevice.hpp"
#include "FxDeviceInterface.hpp"
#include "FxQueryInterface.hpp"
#include "FxDeviceText.hpp"
#include "fxresource.hpp"
#include "fxrelateddevice.hpp"
#include "fxdeviceinterface.hpp"
#include "fxqueryinterface.hpp"
#include "fxdevicetext.hpp"
#include "FxIrp.hpp"
#include "FxDriver.hpp"
#include "fxirp.hpp"
#include "fxdriver.hpp"
// generic package interface
#include "FxPackage.hpp"
#include "FxPkgGeneral.hpp"
#include "FxDefaultIrpHandler.hpp"
#include "FxPkgPnp.hpp"
#include "FxWatchDog.hpp"
#include "fxpackage.hpp"
#include "fxpkggeneral.hpp"
#include "fxdefaultirphandler.hpp"
#include "fxpkgpnp.hpp"
#include "fxwatchdog.hpp"
// Device support
#include "FxChildList.hpp"
#include "FxCxDeviceInfo.hpp"
#include "FxDevice.hpp"
#include "fxchildlist.hpp"
#include "fxcxdeviceinfo.hpp"
#include "fxdevice.hpp"
#include "FxPkgIo.hpp"
#include "fxpkgio.hpp"
#include "FxDeviceToMxInterface.hpp"
#include "fxdevicetomxinterface.hpp"
#include "FxIrpQueue.hpp"
#include "FxRequestContext.hpp"
#include "FxRequestCallbacks.hpp"
#include "FxRequestBase.hpp"
#include "FxRequest.hpp"
#include "FxSyncRequest.hpp"
#include "fxirpqueue.hpp"
#include "fxrequestcontext.hpp"
#include "fxrequestcallbacks.hpp"
#include "fxrequestbase.hpp"
#include "fxrequest.hpp"
#include "fxsyncrequest.hpp"
// specialized irp handlers (ie packages)
#include "FxPkgFdo.hpp"
#include "FxPkgPdo.hpp"
#include "FxWmiIrpHandler.hpp"
#include "FxWmiProvider.hpp"
#include "FxWmiInstance.hpp"
#include "fxpkgfdo.hpp"
#include "fxpkgpdo.hpp"
#include "fxwmiirphandler.hpp"
#include "fxwmiprovider.hpp"
#include "fxwmiinstance.hpp"
// queus for read, write, (internal) IOCTL
#include "FxIoQueue.hpp"
#include "FxFileObject.hpp"
#include "FxIrpPreprocessInfo.hpp"
#include "FxIrpDynamicDispatchInfo.hpp"
#include "fxioqueue.hpp"
#include "fxfileobject.hpp"
#include "fxirppreprocessinfo.hpp"
#include "fxirpdynamicdispatchinfo.hpp"
#include "FxDpc.hpp"
#include "FxWorkItem.hpp"
#include "FxTimer.hpp"
#include "FxInterruptKm.hpp"
#include "fxdpc.hpp"
#include "fxworkitem.hpp"
#include "fxtimer.hpp"
#include "fxinterruptkm.hpp"
// IO targets (device lower edge interface)
#include "FxIoTarget.hpp"
#include "FxIoTargetRemote.hpp"
#include "FxIoTargetSelf.hpp"
#include "fxiotarget.hpp"
#include "fxiotargetremote.hpp"
#include "fxiotargetself.hpp"
#include "FxUsbDevice.hpp"
#include "FxUsbInterface.hpp"
#include "FxUsbPipe.hpp"
#include "fxusbdevice.hpp"
#include "fxusbinterface.hpp"
#include "fxusbpipe.hpp"
// DMA support
#include "FxDmaEnabler.hpp"
#include "FxDmaTransaction.hpp"
#include "FxCommonBuffer.hpp"
#include "fxdmaenabler.hpp"
#include "fxdmatransaction.hpp"
#include "fxcommonbuffer.hpp"
// Triage info.
#include "wdftriage.h"
// #include "wdftriage.h"
#include "FxTelemetry.hpp"
#include "fxtelemetry.hpp"
#endif // _FX_H

View file

@ -5,15 +5,15 @@
#define _FXDMATRANSACTION_HPP_
extern "C" {
#include "FxDmaTransaction.hpp.tmh"
// #include "FxDmaTransaction.hpp.tmh"
}
#include "FxDmaTransactionCallbacks.hpp"
#include "fxdmatransactioncallbacks.hpp"
//
// This type is used to allocate scatter-gather list of 1 element on the stack.
//
typedef __declspec(align(MEMORY_ALLOCATION_ALIGNMENT))UCHAR UCHAR_MEMORY_ALIGNED;
typedef DECLSPEC_ALIGN(MEMORY_ALLOCATION_ALIGNMENT) UCHAR UCHAR_MEMORY_ALIGNED;
// begin_wpp enum
@ -912,6 +912,7 @@ protected:
protected:
inline
void
SetMapRegisterBase(
__in PVOID Value
)
@ -924,6 +925,7 @@ protected:
}
inline
void
ClearMapRegisterBase(
VOID
)
@ -934,6 +936,7 @@ protected:
}
inline
BOOLEAN
IsMapRegisterBaseSet(
VOID
)
@ -1005,6 +1008,7 @@ protected:
static
IO_ALLOCATION_ACTION
STDCALL
_AdapterControl(
__in PDEVICE_OBJECT DeviceObject,
__in PIRP Irp,
@ -1528,7 +1532,7 @@ protected:
VOID
)
{
__super::Reuse();
FxDmaPacketTransaction::Reuse(); // __super call
m_ConfigureChannelFunction.Method = NULL;
m_ConfigureChannelContext = NULL;

File diff suppressed because it is too large Load diff

View file

@ -7,12 +7,10 @@
//
extern "C" {
#pragma warning(disable:4200) // zero-sized array in struct/union
#include <usbdrivr.h>
#pragma warning(default:4200)
#include <wdfusb.h>
#include <wdfminiport.h>
#include "FxDynamics.h"
#include "VfFxDynamics.h"
#include "fxdynamics.h"
#include "vffxdynamics.h"
}

View file

@ -35,4 +35,4 @@ FxProbeAndLockWithAccess(
}
#endif __FXPROBEANDLOCK_H__
#endif // __FXPROBEANDLOCK_H__

View file

@ -20,12 +20,12 @@ Revision History:
#include "fxcorepch.hpp"
#include "FxIFR.h"
#include "fxIFRKm.h" // kernel mode only IFR definitions
#include "FxLdr.h"
#include "FxBugcheck.h"
#include "fxifr.h"
#include "fxifrkm.h" // kernel mode only IFR definitions
#include "fxldr.h"
#include "fxbugcheck.h"
#include <aux_klib.h>
// #include <aux_klib.h>
//
// Disable warnings of features used by the standard headers
@ -35,9 +35,9 @@ Revision History:
// Disable warning C4201: nonstandard extension used : nameless struct/union
// Disable warning C4214: nonstandard extension used : bit field types other than int
//
#pragma warning(disable:4115 4200 4201 4214)
// #pragma warning(disable:4115 4200 4201 4214)
#include <ntimage.h>
#pragma warning(default:4115 4200 4201 4214)
// #pragma warning(default:4115 4200 4201 4214)
extern "C" {
@ -125,102 +125,104 @@ FxpGetImageBase(
__out PULONG ImageSize
)
{
NTSTATUS status = STATUS_UNSUCCESSFUL;
ULONG modulesSize = 0;
AUX_MODULE_EXTENDED_INFO* modules = NULL;
AUX_MODULE_EXTENDED_INFO* module;
PVOID addressInImage = NULL;
ULONG numberOfModules;
ULONG i;
// NTSTATUS status = STATUS_UNSUCCESSFUL;
// ULONG modulesSize = 0;
// AUX_MODULE_EXTENDED_INFO* modules = NULL;
// AUX_MODULE_EXTENDED_INFO* module;
// PVOID addressInImage = NULL;
// ULONG numberOfModules;
// ULONG i;
//
// Basic validation.
//
if (NULL == DriverObject || NULL == ImageBase || NULL == ImageSize) {
status = STATUS_INVALID_PARAMETER;
goto exit;
}
// //
// // Basic validation.
// //
// if (NULL == DriverObject || NULL == ImageBase || NULL == ImageSize) {
// status = STATUS_INVALID_PARAMETER;
// goto exit;
// }
//
// Get the address of a well known entry in the Image.
//
addressInImage = (PVOID) DriverObject->DriverStart;
ASSERT(addressInImage != NULL);
// //
// // Get the address of a well known entry in the Image.
// //
// addressInImage = (PVOID) DriverObject->DriverStart;
// ASSERT(addressInImage != NULL);
//
// Initialize the AUX Kernel Library.
//
status = AuxKlibInitialize();
if (!NT_SUCCESS(status)) {
goto exit;
}
// //
// // Initialize the AUX Kernel Library.
// //
// status = AuxKlibInitialize();
// if (!NT_SUCCESS(status)) {
// goto exit;
// }
//
// Get size of area needed for loaded modules.
//
status = AuxKlibQueryModuleInformation(&modulesSize,
sizeof(AUX_MODULE_EXTENDED_INFO),
NULL);
// //
// // Get size of area needed for loaded modules.
// //
// status = AuxKlibQueryModuleInformation(&modulesSize,
// sizeof(AUX_MODULE_EXTENDED_INFO),
// NULL);
if (!NT_SUCCESS(status) || (0 == modulesSize)) {
goto exit;
}
// if (!NT_SUCCESS(status) || (0 == modulesSize)) {
// goto exit;
// }
numberOfModules = modulesSize / sizeof(AUX_MODULE_EXTENDED_INFO);
// numberOfModules = modulesSize / sizeof(AUX_MODULE_EXTENDED_INFO);
//
// Allocate returned-sized memory for the modules area.
//
modules = (AUX_MODULE_EXTENDED_INFO*) ExAllocatePoolWithTag(PagedPool,
modulesSize,
'30LW');
if (NULL == modules) {
status = STATUS_INSUFFICIENT_RESOURCES;
goto exit;
}
// //
// // Allocate returned-sized memory for the modules area.
// //
// modules = (AUX_MODULE_EXTENDED_INFO*) ExAllocatePoolWithTag(PagedPool,
// modulesSize,
// '30LW');
// if (NULL == modules) {
// status = STATUS_INSUFFICIENT_RESOURCES;
// goto exit;
// }
//
// Request the modules array be filled with module information.
//
status = AuxKlibQueryModuleInformation(&modulesSize,
sizeof(AUX_MODULE_EXTENDED_INFO),
modules);
// //
// // Request the modules array be filled with module information.
// //
// status = AuxKlibQueryModuleInformation(&modulesSize,
// sizeof(AUX_MODULE_EXTENDED_INFO),
// modules);
if (!NT_SUCCESS(status)) {
goto exit;
}
// if (!NT_SUCCESS(status)) {
// goto exit;
// }
//
// Traverse list, searching for the well known address in Image for which the
// module's Image Base Address is in its range.
//
module = modules;
// //
// // Traverse list, searching for the well known address in Image for which the
// // module's Image Base Address is in its range.
// //
// module = modules;
for (i=0; i < numberOfModules; i++) {
// for (i=0; i < numberOfModules; i++) {
if (addressInImage >= module->BasicInfo.ImageBase &&
addressInImage < WDF_PTR_ADD_OFFSET(module->BasicInfo.ImageBase,
module->ImageSize)) {
// if (addressInImage >= module->BasicInfo.ImageBase &&
// addressInImage < WDF_PTR_ADD_OFFSET(module->BasicInfo.ImageBase,
// module->ImageSize)) {
*ImageBase = module->BasicInfo.ImageBase;
*ImageSize = module->ImageSize;
// *ImageBase = module->BasicInfo.ImageBase;
// *ImageSize = module->ImageSize;
status = STATUS_SUCCESS;
goto exit;
}
module++;
}
// status = STATUS_SUCCESS;
// goto exit;
// }
// module++;
// }
status = STATUS_NOT_FOUND;
// status = STATUS_NOT_FOUND;
exit:
// exit:
if (modules != NULL) {
ExFreePool(modules);
modules = NULL;
}
// if (modules != NULL) {
// ExFreePool(modules);
// modules = NULL;
// }
return status;
// return status;
ROSWDFNOTIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
_Must_inspect_result_
@ -246,77 +248,65 @@ Return Value:
--*/
{
PVOID codeAddr = NULL;
BOOLEAN found = FALSE;
KBUGCHECK_DATA bugCheckData = {0};
// PVOID codeAddr = NULL;
// BOOLEAN found = FALSE;
// KBUGCHECK_DATA bugCheckData = {0};
if (FxDriverGlobals->FxForceLogsInMiniDump) {
return TRUE;
}
// if (FxDriverGlobals->FxForceLogsInMiniDump) {
// return TRUE;
// }
//
// Retrieve the bugcheck parameters.
//
bugCheckData.BugCheckDataSize = sizeof(KBUGCHECK_DATA);
AuxKlibGetBugCheckData(&bugCheckData);
// //
// // Retrieve the bugcheck parameters.
// //
// bugCheckData.BugCheckDataSize = sizeof(KBUGCHECK_DATA);
// AuxKlibGetBugCheckData(&bugCheckData);
//
// Check whether the code address that caused the bugcheck is from this wdf
// driver.
//
switch (bugCheckData.BugCheckCode) {
// //
// // Check whether the code address that caused the bugcheck is from this wdf
// // driver.
// //
// switch (bugCheckData.BugCheckCode) {
case KERNEL_APC_PENDING_DURING_EXIT: // 0x20
codeAddr = (PVOID)bugCheckData.Parameter1;
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
break;
// case KERNEL_APC_PENDING_DURING_EXIT: // 0x20
// codeAddr = (PVOID)bugCheckData.Parameter1;
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
// break;
case KMODE_EXCEPTION_NOT_HANDLED: // 0x1E
case SYSTEM_THREAD_EXCEPTION_NOT_HANDLED: // 0x7E
case KERNEL_MODE_EXCEPTION_NOT_HANDLED: // 0x8E
codeAddr = (PVOID)bugCheckData.Parameter2;
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
break;
// case KMODE_EXCEPTION_NOT_HANDLED: // 0x1E
// case SYSTEM_THREAD_EXCEPTION_NOT_HANDLED: // 0x7E
// case KERNEL_MODE_EXCEPTION_NOT_HANDLED: // 0x8E
// codeAddr = (PVOID)bugCheckData.Parameter2;
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
// break;
case PAGE_FAULT_IN_NONPAGED_AREA: // 0x50
codeAddr = (PVOID)bugCheckData.Parameter3;
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
break;
// case PAGE_FAULT_IN_NONPAGED_AREA: // 0x50
// codeAddr = (PVOID)bugCheckData.Parameter3;
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
// break;
case IRQL_NOT_LESS_OR_EQUAL: // 0xA
case DRIVER_IRQL_NOT_LESS_OR_EQUAL: // 0xD1
codeAddr = (PVOID)bugCheckData.Parameter4;
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
break;
}
// case IRQL_NOT_LESS_OR_EQUAL: // 0xA
// case DRIVER_IRQL_NOT_LESS_OR_EQUAL: // 0xD1
// codeAddr = (PVOID)bugCheckData.Parameter4;
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
// break;
// }
//
// If the code address was found in the wdf driver, then set the flag in the
// driver globals to indicate that the IFR data has to be written to the
// mini-dump.
//
if (found) {
FxDriverGlobals->FxForceLogsInMiniDump = TRUE;
}
return found;
// //
// // If the code address was found in the wdf driver, then set the flag in the
// // driver globals to indicate that the IFR data has to be written to the
// // mini-dump.
// //
// if (found) {
// FxDriverGlobals->FxForceLogsInMiniDump = TRUE;
// }
// return found;
ROSWDFNOTIMPLEMENTED;
return FALSE;
}
VOID
STDCALL
FxpBugCheckCallback(
__in KBUGCHECK_CALLBACK_REASON Reason,
__in PKBUGCHECK_REASON_CALLBACK_RECORD Record,
@ -567,6 +557,7 @@ Done:;
}
VOID
STDCALL
FxpLibraryBugCheckCallback(
__in KBUGCHECK_CALLBACK_REASON Reason,
__in PKBUGCHECK_REASON_CALLBACK_RECORD /* Record */,
@ -1043,7 +1034,7 @@ FX_DRIVER_TRACKER_CACHE_AWARE::Register(
//
// Intialize the procgrp down level library.
//
WdmlibProcgrpInitialize();
// WdmlibProcgrpInitialize(); __REACTOS__ : haha we don't support ProcGrp
//
// Capture maximum number of processors.

View file

@ -25,7 +25,7 @@ Revision History:
#include "fxcorepch.hpp"
extern "C" {
#include "FxChildList.tmh"
// #include "FxChildList.tmh"
}
FxDeviceDescriptionEntry::FxDeviceDescriptionEntry(
@ -1145,9 +1145,6 @@ FxChildList::GetNextStaticDevice(
for (ple = m_ModificationListHead.Flink;
ple != &m_ModificationListHead;
ple = ple->Flink) {
BOOLEAN check;
check = FALSE;
pEntry = FxDeviceDescriptionEntry::_FromModificationLink(ple);

View file

@ -25,7 +25,7 @@ Revision History:
#include "fxcorepch.hpp"
extern "C" {
#include "FxChildListAPI.tmh"
// #include "FxChildListAPI.tmh"
}
//
@ -36,6 +36,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfChildListCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -125,6 +126,7 @@ WDFEXPORT(WdfChildListCreate)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDEVICE
STDCALL
WDFEXPORT(WdfChildListGetDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -150,6 +152,7 @@ WDFEXPORT(WdfChildListGetDevice)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfChildListRetrieveAddressDescription)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -226,6 +229,7 @@ WDFEXPORT(WdfChildListRetrieveAddressDescription)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfChildListBeginScan)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -250,6 +254,7 @@ WDFEXPORT(WdfChildListBeginScan)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfChildListEndScan)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -274,6 +279,7 @@ WDFEXPORT(WdfChildListEndScan)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfChildListBeginIteration)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -323,6 +329,7 @@ WDFEXPORT(WdfChildListBeginIteration)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfChildListRetrieveNextDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -425,6 +432,7 @@ WDFEXPORT(WdfChildListRetrieveNextDevice)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfChildListEndIteration)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -473,6 +481,7 @@ WDFEXPORT(WdfChildListEndIteration)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfChildListAddOrUpdateChildDescriptionAsPresent)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -561,6 +570,7 @@ WDFEXPORT(WdfChildListAddOrUpdateChildDescriptionAsPresent)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfChildListUpdateChildDescriptionAsMissing)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -609,6 +619,7 @@ WDFEXPORT(WdfChildListUpdateChildDescriptionAsMissing)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfChildListUpdateAllChildDescriptionsAsPresent)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -637,6 +648,7 @@ WDFEXPORT(WdfChildListUpdateAllChildDescriptionsAsPresent)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDEVICE
STDCALL
WDFEXPORT(WdfChildListRetrievePdo)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -734,6 +746,7 @@ WDFEXPORT(WdfChildListRetrievePdo)(
__drv_maxIRQL(DISPATCH_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfChildListRequestChildEject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -25,7 +25,7 @@ Revision History:
#include "fxcorepch.hpp"
extern "C" {
#include "FxDeviceFdoApi.tmh"
// #include "FxDeviceFdoApi.tmh"
}
//
@ -36,6 +36,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfFdoAddStaticChild)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -121,6 +122,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfFdoLockStaticChildListForIteration)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -179,6 +181,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDEVICE
STDCALL
WDFEXPORT(WdfFdoRetrieveNextStaticChild)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -256,6 +259,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfFdoUnlockStaticChildListFromIteration)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -311,6 +315,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfFdoQueryForInterface)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -405,6 +410,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFCHILDLIST
STDCALL
WDFEXPORT(WdfFdoGetDefaultChildList)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -25,7 +25,7 @@ Revision History:
#include "fxcorepch.hpp"
extern "C" {
#include "FxDevicePdoApi.tmh"
// #include "FxDevicePdoApi.tmh"
}
NTSTATUS
@ -87,6 +87,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoMarkMissing)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -101,7 +102,7 @@ WDFEXPORT(WdfPdoMarkMissing)(
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals,
&pDevice);
@ -120,6 +121,7 @@ WDFEXPORT(WdfPdoMarkMissing)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
VOID
STDCALL
WDFEXPORT(WdfPdoRequestEject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -134,7 +136,7 @@ WDFEXPORT(WdfPdoRequestEject)(
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals,
&pDevice);
@ -163,6 +165,7 @@ WDFEXPORT(WdfPdoRequestEject)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDEVICE
STDCALL
WDFEXPORT(WdfPdoGetParent)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -177,7 +180,7 @@ WDFEXPORT(WdfPdoGetParent)(
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals,
&pDevice);
@ -197,6 +200,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoRetrieveIdentificationDescription)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -212,7 +216,7 @@ WDFEXPORT(WdfPdoRetrieveIdentificationDescription)(
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals);
@ -251,6 +255,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoRetrieveAddressDescription)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -266,7 +271,7 @@ WDFEXPORT(WdfPdoRetrieveAddressDescription)(
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals);
@ -307,6 +312,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoUpdateAddressDescription)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -322,7 +328,7 @@ WDFEXPORT(WdfPdoUpdateAddressDescription)(
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals);
@ -354,6 +360,7 @@ WDFEXPORT(WdfPdoUpdateAddressDescription)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoAddEjectionRelationsPhysicalDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -386,7 +393,7 @@ Return Value:
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals);
@ -403,6 +410,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfPdoRemoveEjectionRelationsPhysicalDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -434,7 +442,7 @@ Return Value:
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals);
@ -449,6 +457,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfPdoClearEjectionRelationsDevices)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -476,7 +485,7 @@ Return Value:
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
Device,
__FUNCTION__,
(PCHAR)__FUNCTION__,
&pPkgPdo,
&pFxDriverGlobals);

View file

@ -26,11 +26,11 @@ Revision History:
#include "fxcorepch.hpp"
#include "FxDpc.hpp"
#include "fxdpc.hpp"
// Tracing support
extern "C" {
#include "FxDpc.tmh"
// #include "FxDpc.tmh"
}
//

View file

@ -25,10 +25,10 @@ Revision History:
#include "fxcorepch.hpp"
#include "FxDpc.hpp"
#include "fxdpc.hpp"
extern "C" {
#include "FxDpcApi.tmh"
// #include "FxDpcApi.tmh"
}
//
@ -39,6 +39,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDpcCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -129,6 +130,7 @@ Notes:
__drv_maxIRQL(HIGH_LEVEL)
KDPC*
STDCALL
WDFEXPORT(WdfDpcWdmGetDpc)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -166,6 +168,7 @@ Returns:
__drv_maxIRQL(HIGH_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfDpcEnqueue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -202,6 +205,7 @@ Returns:
__drv_when(Wait == __true, __drv_maxIRQL(PASSIVE_LEVEL))
__drv_when(Wait == __false, __drv_maxIRQL(HIGH_LEVEL))
BOOLEAN
STDCALL
WDFEXPORT(WdfDpcCancel)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -254,6 +258,7 @@ Returns:
__drv_maxIRQL(HIGH_LEVEL)
WDFOBJECT
STDCALL
WDFEXPORT(WdfDpcGetParentObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -27,7 +27,7 @@ Revision History:
#include "fxcorepch.hpp"
extern "C" {
#include "FxSystemThread.tmh"
// #include "FxSystemThread.tmh"
}
@ -151,7 +151,7 @@ FxSystemThread::CreateThread(
//
// The thread itself will release this reference in its exit routine
//
ADDREF(FxSystemThread::StaticThreadThunk);
ADDREF((PVOID)FxSystemThread::StaticThreadThunk);
status = PsCreateSystemThread(
&threadHandle,
@ -171,7 +171,7 @@ FxSystemThread::CreateThread(
//
// Release the reference taken above due to failure
//
RELEASE(FxSystemThread::StaticThreadThunk);
RELEASE((PVOID)FxSystemThread::StaticThreadThunk);
}
else {
status = ObReferenceObjectByHandle(
@ -347,7 +347,7 @@ FxSystemThread::ExitThreadAsync(
m_Exit = TRUE;
// Add a reference which will be released by the reaper
ADDREF(FxSystemThread::StaticReaperThunk);
ADDREF((PVOID)FxSystemThread::StaticReaperThunk);
Unlock(irql);
@ -524,7 +524,7 @@ FxSystemThread::Thread()
Unlock(irql);
// Release the object reference held by the thread
RELEASE(FxSystemThread::StaticThreadThunk);
RELEASE((PVOID)FxSystemThread::StaticThreadThunk);
status = PsTerminateSystemThread(STATUS_SUCCESS);
UNREFERENCED_PARAMETER(status);
@ -635,7 +635,7 @@ FxSystemThread::Reaper()
ObDereferenceObject(m_ThreadPtr);
RELEASE(FxSystemThread::StaticReaperThunk);
RELEASE((PVOID)FxSystemThread::StaticReaperThunk);
return;
}

View file

@ -30,12 +30,12 @@ Revision History:
// We use DoTraceMessage
extern "C" {
#include "tracing.tmh"
// #include "tracing.tmh"
}
#include <initguid.h>
#include "fxIFR.h" // shared struct between IFR and debug ext.
#include "fxIFRKm.h" // kernel mode only IFR definitions
#include "fxifr.h" // shared struct between IFR and debug ext.
#include "fxifrkm.h" // kernel mode only IFR definitions
//=============================================================================

View file

@ -21,10 +21,10 @@ Revision History:
--*/
#include "FxDmaPCH.hpp"
#include "fxdmapch.hpp"
extern "C" {
#include "FxCommonBuffer.tmh"
// #include "FxCommonBuffer.tmh"
}
FxCommonBuffer::FxCommonBuffer(

View file

@ -21,10 +21,10 @@ Revision History:
--*/
#include "FxDmaPCH.hpp"
#include "fxdmapch.hpp"
extern "C" {
#include "FxCommonBufferAPI.tmh"
// #include "FxCommonBufferAPI.tmh"
}
//
@ -35,6 +35,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfCommonBufferCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -134,6 +135,7 @@ WDFEXPORT(WdfCommonBufferCreate)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfCommonBufferCreateWithConfig)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -245,6 +247,7 @@ WDFEXPORT(WdfCommonBufferCreateWithConfig)(
__drv_maxIRQL(DISPATCH_LEVEL)
PVOID
STDCALL
WDFEXPORT(WdfCommonBufferGetAlignedVirtualAddress)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -264,6 +267,7 @@ WDFEXPORT(WdfCommonBufferGetAlignedVirtualAddress)(
__drv_maxIRQL(DISPATCH_LEVEL)
PHYSICAL_ADDRESS
STDCALL
WDFEXPORT(WdfCommonBufferGetAlignedLogicalAddress)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -283,6 +287,7 @@ WDFEXPORT(WdfCommonBufferGetAlignedLogicalAddress)(
__drv_maxIRQL(DISPATCH_LEVEL)
size_t
STDCALL
WDFEXPORT(WdfCommonBufferGetLength)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -21,10 +21,10 @@ Revision History:
--*/
#include "FxDmaPCH.hpp"
#include "fxdmapch.hpp"
extern "C" {
#include "FxDmaEnabler.tmh"
// #include "FxDmaEnabler.tmh"
}
FxDmaEnabler::FxDmaEnabler(

View file

@ -21,10 +21,10 @@ Revision History:
--*/
#include "FxDmaPCH.hpp"
#include "fxdmapch.hpp"
extern "C" {
#include "FxDmaEnablerAPI.tmh"
// #include "FxDmaEnablerAPI.tmh"
}
//

View file

@ -4,4 +4,4 @@
extern "C" {
#include <ntddk.h>
}
#include <Fx.hpp>
#include <fx.hpp>

View file

@ -21,10 +21,10 @@ Revision History:
--*/
#include "FxDmaPCH.hpp"
#include "fxdmapch.hpp"
extern "C" {
#include "FxDmaTransaction.tmh"
// #include "FxDmaTransaction.tmh"
}
FxDmaTransactionBase::FxDmaTransactionBase(
@ -842,7 +842,7 @@ FxDmaScatterGatherTransaction::Dispose(
{
BOOLEAN ret;
ret = __super::Dispose();
ret = FxDmaTransactionBase::Dispose(); // __super call
//
// Free Lookaside Buffer which held SGList

View file

@ -21,10 +21,10 @@ Revision History:
--*/
#include "FxDmaPCH.hpp"
#include "fxdmapch.hpp"
extern "C" {
#include "FxDmaTransactionAPI.tmh"
// #include "FxDmaTransactionAPI.tmh"
}
//

View file

@ -44,7 +44,7 @@ extern "C" {
// available in public symbols. Various WDFKD debug commands use these
// internal structures to provide information about WDF.
//-----------------------------------------------------------------------------
#include "FxIFR.h"
#include "fxifr.h"
extern "C" {
@ -78,9 +78,9 @@ union {
extern "C" {
#include "FxDynamics.h"
#include "fxdynamics.h"
#include "FxLibraryCommon.h"
#include "fxlibrarycommon.h"
#define KMDF_DEFAULT_NAME "Wdf" ## \
LITERAL(__WDF_MAJOR_VERSION_STRING) ## \

View file

@ -27,11 +27,11 @@ Revision History:
#include "fxobjectpch.hpp"
#include "FxMemoryBufferPreallocated.hpp"
#include "FxUserObject.hpp"
#include "FxUsbDevice.hpp"
#include "FxUsbPipe.hpp"
#include "FxUsbInterface.hpp"
#include "fxmemorybufferpreallocated.hpp"
#include "fxuserobject.hpp"
#include "fxusbdevice.hpp"
#include "fxusbpipe.hpp"
#include "fxusbinterface.hpp"
extern "C"
{

View file

@ -31,7 +31,7 @@ Revision History:
// Extern "C" the tmh file and all external APIs
//
extern "C" {
#include "FxWmiAPI.tmh"
#include "fxwmiapi.tmh"
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)

View file

@ -22,7 +22,7 @@ Revision History:
#include "fxwmipch.hpp"
extern "C" {
#include "FxWmiInstance.tmh"
// #include "FxWmiInstance.tmh"
}
FxWmiInstance::FxWmiInstance(
@ -56,7 +56,7 @@ FxWmiInstance::Dispose(
// of instances. If we don't do this, the provider will have a list which
// contains entries which have been freed.
//
return __super::Dispose();
return FxNonPagedObject::Dispose(); // __super call
}
_Must_inspect_result_

View file

@ -25,7 +25,7 @@ Revision History:
#include "fxwmipch.hpp"
extern "C" {
#include "FxWmiIrpHandler.tmh"
// #include "FxWmiIrpHandler.tmh"
}
#ifndef WppDebug

View file

@ -22,7 +22,7 @@ Revision History:
#include "fxwmipch.hpp"
extern "C" {
#include "FxWmiProvider.tmh"
// #include "FxWmiProvider.tmh"
}
FxWmiProvider::FxWmiProvider(
@ -80,7 +80,7 @@ FxWmiProvider::Dispose(
//
m_Parent->RemoveProvider(this);
return __super::Dispose();
return FxNonPagedObject::Dispose(); // __super call
}
_Must_inspect_result_

View file

@ -19,9 +19,9 @@ extern "C" {
#include "fx.hpp"
#include "fxldr.h"
#include "FxLibraryCommon.h"
#include "FxTelemetry.hpp"
#include "WdfVersionLog.h"
#include "fxlibrarycommon.h"
#include "fxtelemetry.hpp"
#include "wdfversionlog.h"
#include "minwindef.h"
extern "C" {

View file

@ -22,10 +22,10 @@ Revision History:
--*/
#include "FxSupportPch.hpp"
#include "fxsupportpch.hpp"
extern "C" {
#include "FxQueryInterface.tmh"
// #include "FxQueryInterface.tmh"
}
FxQueryInterface::FxQueryInterface(

View file

@ -22,10 +22,10 @@ Environment:
Revision History:
--*/
#include "FxSupportPch.hpp"
#include "fxsupportpch.hpp"
extern "C" {
#include "FxQueryInterfaceAPI.tmh"
// #include "FxQueryInterfaceAPI.tmh"
}
//
@ -35,6 +35,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAddQueryInterface)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -23,7 +23,7 @@ Revision History:
--*/
#include "FxSupportPch.hpp"
#include "fxsupportpch.hpp"
FxRelatedDevice::FxRelatedDevice(
__in PDEVICE_OBJECT DeviceObject,

View file

@ -22,7 +22,7 @@ Revision History:
--*/
#include "FxSupportPch.hpp"
#include "fxsupportpch.hpp"
_Must_inspect_result_
NTSTATUS
@ -111,7 +111,7 @@ FxRelatedDeviceList::ProcessAdd(
}
pEntry = NULL;
while ((pEntry = __super::GetNextEntryLocked(pEntry)) != NULL) {
while ((pEntry = FxSpinLockTransactionedList::GetNextEntryLocked(pEntry)) != NULL) { // __super call
pInList = CONTAINING_RECORD(pEntry, FxRelatedDevice, m_TransactionedEntry);
if (pInList->m_DeviceObject == pNew->m_DeviceObject) {

View file

@ -30,6 +30,7 @@ Revision History:
//
#include <ntddk.h>
#include <pseh/pseh2.h> // __REACTOS__
NTSTATUS
FxProbeAndLockForRead(
@ -37,11 +38,15 @@ FxProbeAndLockForRead(
__in KPROCESSOR_MODE AccessMode
)
{
try {
_SEH2_TRY
{
MmProbeAndLockPages(Mdl, AccessMode, IoReadAccess);
} except(EXCEPTION_EXECUTE_HANDLER) {
return GetExceptionCode();
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
_SEH2_YIELD(return _SEH2_GetExceptionCode());
}
_SEH2_END;
return STATUS_SUCCESS;
}
@ -52,11 +57,16 @@ FxProbeAndLockForWrite(
__in KPROCESSOR_MODE AccessMode
)
{
try {
_SEH2_TRY
{
MmProbeAndLockPages(Mdl, AccessMode, IoWriteAccess);
} except(EXCEPTION_EXECUTE_HANDLER) {
return GetExceptionCode();
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
_SEH2_YIELD(return _SEH2_GetExceptionCode());
}
_SEH2_END;
return STATUS_SUCCESS;
}
@ -67,13 +77,15 @@ FxProbeAndLockWithAccess(
__in LOCK_OPERATION Operation
)
{
try {
_SEH2_TRY
{
MmProbeAndLockPages(Mdl, AccessMode, Operation);
} except(EXCEPTION_EXECUTE_HANDLER) {
return GetExceptionCode();
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
_SEH2_YIELD(return _SEH2_GetExceptionCode());
}
_SEH2_END;
return STATUS_SUCCESS;
}

View file

@ -0,0 +1,72 @@
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <ntverp.h>
extern "C" {
#include <ntddk.h>
#include <ntstrsafe.h>
}
#define FX_DYNAMICS_GENERATE_TABLE 1
#include "fx.hpp"
// #include <fxldr.h>
// #include "fxbugcheck.h"
//----------------------------------------- ------------------------------------
extern "C" {
#include "fxdynamics.h"
// #include "FxLibraryCommon.h"
typedef VOID (*WDFFUNC) (VOID);
const WDFFUNC *WdfFunctions_01017 = (WDFFUNC *)(&WdfVersion.Functions);
// DECLSPEC_ALIGN(MAX_NATURAL_ALIGNMENT) UINT8 WdfDriverGlobalsVal[248] = { 0 }; // sizeof(FX_DRIVER_GLOBALS)
// PWDF_DRIVER_GLOBALS WdfDriverGlobals = &((PFX_DRIVER_GLOBALS)&WdfDriverGlobalsVal)->Public;
WDF_BIND_INFO WdfBindInfo = {0};
PWDF_DRIVER_GLOBALS WdfDriverGlobals;
#define KMDF_DEFAULT_NAME "Wdf01000"
PCHAR WdfLdrType = KMDF_DEFAULT_NAME;
WDFAPI
NTSTATUS
STDCALL
WdfApiNotImplemented()
{
DbgPrint("ReactOS KMDF: %s non-implemented API called\n");
__debugbreak();
return STATUS_UNSUCCESSFUL;
}
// called in WdfDriverCreate in fxdriverapi.cpp
VOID
RosInitWdf()
{
WdfDriverGlobals = FxAllocateDriverGlobals();
PFX_DRIVER_GLOBALS fxDriverGlobals = GetFxDriverGlobals(WdfDriverGlobals);
WdfBindInfo.Size = sizeof(WDF_BIND_INFO);
WdfBindInfo.Version.Major = 1;
WdfBindInfo.Version.Minor = 9;
WdfBindInfo.Version.Build = 7600;
WdfBindInfo.FuncCount = WdfVersion.FuncCount;
WdfBindInfo.FuncTable = (WDFFUNC *)(&WdfVersion.Functions);
fxDriverGlobals->WdfBindInfo = &WdfBindInfo;
}
void
__cxa_pure_virtual()
{
__debugbreak();
}
} // extern "C"

View file

@ -46,15 +46,15 @@ extern "C" {
#include "mx.h"
}
#include "FxMin.hpp"
#include "fxmin.hpp"
#include "wdfmemory.h"
#include "wdfrequest.h"
#include "wdfdevice.h"
#include "wdfdevicepri.h"
#include "wdfiotargetpri.h"
// #include "wdfdevicepri.h"
// #include "wdfiotargetpri.h"
#include "wdfwmi.h"
#include "wdfChildList.h"
#include "wdfchildlist.h"
#include "wdfpdo.h"
#include "wdffdo.h"
#include "wdfiotarget.h"
@ -62,12 +62,12 @@ extern "C" {
#include "wdfcx.h"
#include "wdfio.h"
#include "wdfqueryinterface.h"
#include "wdftriage.h"
// #include "wdftriage.h"
#if (FX_CORE_MODE == FX_CORE_USER_MODE)
#include "FxIrpUm.hpp"
#include "fxirpum.hpp"
#else
#include "FxIrpKm.hpp"
#include "fxirpkm.hpp"
#endif
// <FxSystemWorkItem.hpp>
@ -77,92 +77,92 @@ VOID
IN PVOID Parameter
);
#include "FxIrpQueue.hpp"
#include "fxirpqueue.hpp"
// </FxSystemWorkItem.hpp>
#include "FxProbeAndLock.h"
#include "FxPackage.hpp"
#include "FxCollection.hpp"
#include "FxDeviceInitShared.hpp"
#include "fxprobeandlock.h"
#include "fxpackage.hpp"
#include "fxcollection.hpp"
#include "fxdeviceinitshared.hpp"
#include "IfxMemory.hpp"
#include "FxCallback.hpp"
#include "FxRequestContext.hpp"
#include "FxRequestContextTypes.h"
#include "FxRequestBase.hpp"
#include "FxMemoryObject.hpp"
#include "FxMemoryBuffer.hpp"
#include "ifxmemory.hpp"
#include "fxcallback.hpp"
#include "fxrequestcontext.hpp"
#include "fxrequestcontexttypes.h"
#include "fxrequestbase.hpp"
#include "fxmemoryobject.hpp"
#include "fxmemorybuffer.hpp"
#include "FxMemoryBufferFromPool.hpp"
#include "fxmemorybufferfrompool.hpp"
#include "FxMemoryBufferPreallocated.hpp"
#include "fxmemorybufferpreallocated.hpp"
#include "FxTransactionedList.hpp"
#include "fxtransactionedlist.hpp"
//
// MERGE temp: We may not need these include files here,
// temporarily including them to verify they compile in shared code
//
#include "FxRequestValidateFunctions.hpp"
#include "FxRequestCallbacks.hpp"
#include "fxrequestvalidatefunctions.hpp"
#include "fxrequestcallbacks.hpp"
// support
#include "StringUtil.hpp"
#include "FxAutoString.hpp"
#include "FxString.hpp"
#include "FxDeviceText.hpp"
#include "FxCallback.hpp"
#include "FxDisposeList.hpp"
#include "FxSystemThread.hpp"
#include "stringutil.hpp"
#include "fxautostring.hpp"
#include "fxstring.hpp"
#include "fxdevicetext.hpp"
#include "fxcallback.hpp"
#include "fxdisposelist.hpp"
#include "fxsystemthread.hpp"
#include "FxIrpPreprocessInfo.hpp"
#include "FxPnpCallbacks.hpp"
#include "fxirppreprocessinfo.hpp"
#include "fxpnpcallbacks.hpp"
// device init
#include "FxCxDeviceInit.hpp"
#include "FxCxDeviceInfo.hpp"
#include "FxDeviceInit.hpp"
#include "fxcxdeviceinit.hpp"
#include "fxcxdeviceinfo.hpp"
#include "fxdeviceinit.hpp"
#include "FxDeviceToMxInterface.hpp"
#include "fxdevicetomxinterface.hpp"
// request
#include "FxRequestMemory.hpp"
#include "FxRequest.hpp"
#include "FxRequestBuffer.hpp"
#include "FxSyncRequest.hpp"
#include "fxrequestmemory.hpp"
#include "fxrequest.hpp"
#include "fxrequestbuffer.hpp"
#include "fxsyncrequest.hpp"
// io target
#include "FxIoTarget.hpp"
#include "FxIoTargetSelf.hpp"
#include "fxiotarget.hpp"
#include "fxiotargetself.hpp"
#include "FxSystemWorkItem.hpp"
#include "FxCallbackMutexLock.hpp"
#include "FxDriver.hpp"
#include "fxsystemworkitem.hpp"
#include "fxcallbackmutexlock.hpp"
#include "fxdriver.hpp"
#include "FxDeviceInterface.hpp"
#include "FxQueryInterface.hpp"
#include "fxdeviceinterface.hpp"
#include "fxqueryinterface.hpp"
#include "FxCallbackSpinLock.hpp"
#include "FxDefaultIrpHandler.hpp"
#include "FxWmiIrpHandler.hpp"
#include "fxcallbackspinlock.hpp"
#include "fxdefaultirphandler.hpp"
#include "fxwmiirphandler.hpp"
// packages
#include "FxPkgIo.hpp"
#include "FxPkgPnp.hpp"
#include "FxPkgFdo.hpp"
#include "FxPkgPdo.hpp"
#include "FxPkgGeneral.hpp"
#include "FxFileObject.hpp"
#include "FxIoQueue.hpp"
#include "FxDevice.hpp"
#include "FxTelemetry.hpp"
#include "fxpkgio.hpp"
#include "fxpkgpnp.hpp"
#include "fxpkgfdo.hpp"
#include "fxpkgpdo.hpp"
#include "fxpkggeneral.hpp"
#include "fxfileobject.hpp"
#include "fxioqueue.hpp"
#include "fxdevice.hpp"
#include "fxtelemetry.hpp"
#include "FxChildList.hpp"
#include "fxchildlist.hpp"
#include "FxLookasideList.hpp"
#include "fxlookasidelist.hpp"
/*#if FX_IS_KERNEL_MODE
#include "wdfrequest.h"

View file

@ -26,7 +26,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxCxDeviceInit.tmh"
// #include "FxCxDeviceInit.tmh"
}
WDFCXDEVICE_INIT::WDFCXDEVICE_INIT()

View file

@ -28,7 +28,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxCxDeviceInitApi.tmh"
// #include "FxCxDeviceInitApi.tmh"
}
//

View file

@ -25,7 +25,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDevice.tmh"
// #include "FxDevice.tmh"
}
//
@ -681,14 +681,12 @@ Return Value:
PFX_DRIVER_GLOBALS pGlobals;
PLIST_ENTRY next;
NTSTATUS status;
BOOLEAN wmiTracing;
size_t reqCtxSize;
PWDFCXDEVICE_INIT cxInit;
CCHAR cxIndex;
FxCxDeviceInfo* cxDeviceInfo;
pGlobals = GetDriverGlobals();
wmiTracing = FALSE;
m_Exclusive = DeviceInit->Exclusive;
cxIndex = 0;
@ -832,11 +830,11 @@ Return Value:
m_PkgWmi = new(pGlobals) FxWmiIrpHandler(pGlobals, this);
if (m_PkgWmi == NULL) {
return STATUS_INSUFFICIENT_RESOURCES;
}
InstallPackage(m_PkgWmi);
// m_PkgWmi = new(pGlobals) FxWmiIrpHandler(pGlobals, this); __REACTOS__
// if (m_PkgWmi == NULL) {
// return STATUS_INSUFFICIENT_RESOURCES;
// }
// InstallPackage(m_PkgWmi);
#endif
//
@ -1019,7 +1017,8 @@ FxDevice::CreateDevice(
// administrator complete control over the device. No other users
// may access the device.
//
pSddl = (PUNICODE_STRING) &SDDL_DEVOBJ_SYS_ALL_ADM_ALL;
// pSddl = (PUNICODE_STRING) &SDDL_DEVOBJ_SYS_ALL_ADM_ALL;
pSddl = NULL; // __REACTOS__ : wdmsec.lib is not supported
}
status = Mx::MxCreateDeviceSecure(
@ -1217,7 +1216,7 @@ Return Value:
// we delete the device object, otherwise we can bugcheck when
// running under driver verifier.
//
m_PkgWmi->Deregister();
// m_PkgWmi->Deregister(); __REACTOS__
}
//
@ -1236,7 +1235,7 @@ Return Value:
}
}
__super::DeleteObject();
FxDeviceBase::DeleteObject(); // __super call
}
BOOLEAN
@ -1262,7 +1261,7 @@ FxDevice::Dispose(
// valid to reference the pointer because there is an explicit
// reference on the object that was taken when we created this object.
//
m_PkgWmi->Deregister();
// m_PkgWmi->Deregister(); __REACTOS__
}
//
@ -1289,7 +1288,7 @@ FxDevice::Dispose(
return FALSE;
}
return __super::Dispose();
return FxDeviceBase::Dispose(); // __super call
}
_Must_inspect_result_
@ -1456,7 +1455,6 @@ PreprocessIrp(
)
{
NTSTATUS status;
MdDeviceObject devObj;
UCHAR major, minor;
FxIrp irp(Irp);
@ -1468,7 +1466,6 @@ PreprocessIrp(
// EvtDevicePreprocess returns. To not touch freed pool, capture all
// values we will need before preprocessing.
//
devObj = Device->GetDeviceObject();
if (Info->ClassExtension == FALSE) {
status = Info->Dispatch[major].EvtDevicePreprocess( Device->GetHandle(),
@ -1518,7 +1515,7 @@ DispatchWorker(
next = (PLIST_ENTRY)DispatchContext;
ASSERT(NULL != DispatchContext &&
((UCHAR)DispatchContext & FX_IN_DISPATCH_CALLBACK) == 0);
((UCHAR)(ULONG_PTR)DispatchContext & FX_IN_DISPATCH_CALLBACK) == 0);
//
// Check for any driver/class-extensions' preprocess requirements.
@ -1762,7 +1759,7 @@ FxDevice::QueryInterface(
break;
default:
return __super::QueryInterface(Params);
return FxDeviceBase::QueryInterface(Params); // __super call
}
return STATUS_SUCCESS;

View file

@ -26,7 +26,7 @@ Revision History:
#include "fxiotarget.hpp"
extern "C" {
#include "FxDeviceApi.tmh"
// #include "FxDeviceApi.tmh"
}
struct FxOffsetAndName {
@ -43,6 +43,7 @@ extern "C" {
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDRIVER
STDCALL
WDFEXPORT(WdfDeviceGetDriver)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -83,6 +84,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFIOTARGET
STDCALL
WDFEXPORT(WdfDeviceGetIoTarget)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -111,6 +113,7 @@ WDFEXPORT(WdfDeviceGetIoTarget)(
_IRQL_requires_max_(DISPATCH_LEVEL)
WDFIOTARGET
STDCALL
WDFEXPORT(WdfDeviceGetSelfIoTarget)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -160,6 +163,7 @@ Returns:
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceRetrieveDeviceName)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -208,6 +212,7 @@ WDFEXPORT(WdfDeviceRetrieveDeviceName)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetCharacteristics)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -234,6 +239,7 @@ WDFEXPORT(WdfDeviceSetCharacteristics)(
__drv_maxIRQL(DISPATCH_LEVEL)
ULONG
STDCALL
WDFEXPORT(WdfDeviceGetCharacteristics)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -258,6 +264,7 @@ WDFEXPORT(WdfDeviceGetCharacteristics)(
__drv_maxIRQL(DISPATCH_LEVEL)
ULONG
STDCALL
WDFEXPORT(WdfDeviceGetAlignmentRequirement)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -282,6 +289,7 @@ WDFEXPORT(WdfDeviceGetAlignmentRequirement)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetAlignmentRequirement)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -308,6 +316,7 @@ WDFEXPORT(WdfDeviceSetAlignmentRequirement)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDF_DEVICE_PNP_STATE
STDCALL
WDFEXPORT(WdfDeviceGetDevicePnpState)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -329,6 +338,7 @@ WDFEXPORT(WdfDeviceGetDevicePnpState)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDF_DEVICE_POWER_STATE
STDCALL
WDFEXPORT(WdfDeviceGetDevicePowerState)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -350,6 +360,7 @@ WDFEXPORT(WdfDeviceGetDevicePowerState)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDF_DEVICE_POWER_POLICY_STATE
STDCALL
WDFEXPORT(WdfDeviceGetDevicePowerPolicyState)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -372,6 +383,7 @@ WDFEXPORT(WdfDeviceGetDevicePowerPolicyState)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAssignS0IdleSettings)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -484,6 +496,7 @@ WDFEXPORT(WdfDeviceAssignS0IdleSettings)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAssignSxWakeSettings)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -579,6 +592,7 @@ WDFEXPORT(WdfDeviceAssignSxWakeSettings)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceOpenRegistryKey)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -635,6 +649,7 @@ WDFEXPORT(WdfDeviceOpenRegistryKey)(
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceOpenDevicemapKey) (
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -727,6 +742,7 @@ WDFEXPORT(WdfDeviceOpenDevicemapKey) (
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceGetDeviceState)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -765,6 +781,7 @@ WDFEXPORT(WdfDeviceGetDeviceState)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetDeviceState)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -846,6 +863,7 @@ WDFEXPORT(WdfDeviceSetDeviceState)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -957,6 +975,7 @@ WDFEXPORT(WdfDeviceCreate)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceCreateSymbolicLink)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -969,7 +988,6 @@ WDFEXPORT(WdfDeviceCreateSymbolicLink)(
DDI_ENTRY();
PFX_DRIVER_GLOBALS pFxDriverGlobals;
PUNICODE_STRING pName;
FxAutoString pdoName;
FxDevice* pDevice;
NTSTATUS status;
@ -979,7 +997,6 @@ WDFEXPORT(WdfDeviceCreateSymbolicLink)(
FX_TYPE_DEVICE,
(PVOID *) &pDevice,
&pFxDriverGlobals);
pName = NULL;
FxPointerNotNull(pFxDriverGlobals, SymbolicLinkName);
@ -1022,6 +1039,7 @@ WDFEXPORT(WdfDeviceCreateSymbolicLink)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceQueryProperty)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1109,6 +1127,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAllocAndQueryProperty)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1201,6 +1220,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetStaticStopRemove)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1237,6 +1257,7 @@ WDFEXPORT(WdfDeviceSetStaticStopRemove)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetFailed)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1368,6 +1389,7 @@ _Must_inspect_result_
__drv_when(WaitForD0 == 0, __drv_maxIRQL(DISPATCH_LEVEL))
__drv_when(WaitForD0 != 0, __drv_maxIRQL(PASSIVE_LEVEL))
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceStopIdleNoTrack)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1395,6 +1417,7 @@ _Must_inspect_result_
__drv_when(WaitForD0 == 0, __drv_maxIRQL(DISPATCH_LEVEL))
__drv_when(WaitForD0 != 0, __drv_maxIRQL(PASSIVE_LEVEL))
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceStopIdleActual)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1426,6 +1449,7 @@ WDFEXPORT(WdfDeviceStopIdleActual)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceResumeIdleNoTrack)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1444,6 +1468,7 @@ WDFEXPORT(WdfDeviceResumeIdleNoTrack)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceResumeIdleActual)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1468,6 +1493,7 @@ WDFEXPORT(WdfDeviceResumeIdleActual)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetPnpCapabilities)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1565,6 +1591,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetPowerCapabilities)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1734,6 +1761,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceConfigureRequestDispatching)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1865,6 +1893,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFQUEUE
STDCALL
WDFEXPORT(WdfDeviceGetDefaultQueue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1927,6 +1956,7 @@ Returns:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceEnqueueRequest)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2002,6 +2032,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
POWER_ACTION
STDCALL
WDFEXPORT(WdfDeviceGetSystemPowerAction)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2055,6 +2086,7 @@ _Must_inspect_result_
_IRQL_requires_max_(APC_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceQueryPropertyEx)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2186,6 +2218,7 @@ _Must_inspect_result_
_IRQL_requires_max_(APC_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAllocAndQueryPropertyEx)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2303,6 +2336,7 @@ _Must_inspect_result_
_IRQL_requires_max_(APC_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAssignProperty)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2408,6 +2442,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceConfigureWdmIrpDispatchCallback)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -25,7 +25,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDeviceBase.tmh"
// #include "FxDeviceBase.tmh"
}
FxDeviceBase::FxDeviceBase(
@ -83,7 +83,7 @@ FxDeviceBase::QueryInterface(
break;
default:
return __super::QueryInterface(Params);
return FxNonPagedObject::QueryInterface(Params); // __super call
}
return STATUS_SUCCESS;

View file

@ -25,13 +25,14 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDeviceControlAPI.tmh"
// #include "FxDeviceControlAPI.tmh"
}
extern "C" {
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfControlFinishInitializing)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -51,7 +52,7 @@ WDFEXPORT(WdfControlFinishInitializing)(
MxDeviceObject device(pDevice->GetDeviceObject());
if (pDevice->IsLegacy()) {
pDevice->m_PkgWmi->Register();
// pDevice->m_PkgWmi->Register(); __REACTOS__
device.SetFlags(device.GetFlags() & ~DO_DEVICE_INITIALIZING);
}
else {

View file

@ -24,7 +24,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDeviceInit.tmh"
// #include "FxDeviceInit.tmh"
}
WDFDEVICE_INIT::WDFDEVICE_INIT(

View file

@ -25,7 +25,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDeviceInitApi.tmh"
// #include "FxDeviceInitApi.tmh"
}
typedef struct _WDF_PNPPOWER_EVENT_CALLBACKS_V1_9 {
@ -137,6 +137,7 @@ extern "C" {
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitFree)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -155,6 +156,7 @@ WDFEXPORT(WdfDeviceInitFree)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetIoType)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -179,6 +181,7 @@ WDFEXPORT(WdfDeviceInitSetIoType)(
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetIoTypeEx)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -211,6 +214,7 @@ WDFEXPORT(WdfDeviceInitSetIoTypeEx)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetExclusive)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -229,6 +233,7 @@ WDFEXPORT(WdfDeviceInitSetExclusive)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetDeviceType)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -247,6 +252,7 @@ WDFEXPORT(WdfDeviceInitSetDeviceType)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetPowerNotPageable)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -263,6 +269,7 @@ WDFEXPORT(WdfDeviceInitSetPowerNotPageable)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetPowerPageable)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -279,6 +286,7 @@ WDFEXPORT(WdfDeviceInitSetPowerPageable)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetPowerInrush)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -300,6 +308,7 @@ WDFEXPORT(WdfDeviceInitSetPowerInrush)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceInitAssignName)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -351,6 +360,7 @@ WDFEXPORT(WdfDeviceInitAssignName)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetCharacteristics)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -385,6 +395,7 @@ WDFEXPORT(WdfDeviceInitSetCharacteristics)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetFileObjectConfig)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -555,6 +566,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetRequestAttributes)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -595,6 +607,7 @@ WDFEXPORT(WdfDeviceInitSetRequestAttributes)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceInitAssignSDDLString)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -659,6 +672,7 @@ WDFEXPORT(WdfDeviceInitAssignSDDLString)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetDeviceClass)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -685,6 +699,7 @@ WDFEXPORT(WdfDeviceInitSetDeviceClass)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetPnpPowerEventCallbacks)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -748,6 +763,7 @@ WDFEXPORT(WdfDeviceInitSetPnpPowerEventCallbacks)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetPowerPolicyEventCallbacks)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -809,6 +825,7 @@ WDFEXPORT(WdfDeviceInitSetPowerPolicyEventCallbacks)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetPowerPolicyOwnership)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -828,6 +845,7 @@ WDFEXPORT(WdfDeviceInitSetPowerPolicyOwnership)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceInitRegisterPnpStateChangeCallback)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -907,6 +925,7 @@ WDFEXPORT(WdfDeviceInitRegisterPnpStateChangeCallback)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceInitRegisterPowerStateChangeCallback)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -987,6 +1006,7 @@ WDFEXPORT(WdfDeviceInitRegisterPowerStateChangeCallback)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceInitRegisterPowerPolicyStateChangeCallback)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1068,6 +1088,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceInitAssignWdmIrpPreprocessCallback)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1168,6 +1189,7 @@ WDFEXPORT(WdfDeviceInitAssignWdmIrpPreprocessCallback)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetIoInCallerContextCallback)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1222,6 +1244,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetRemoveLockOptions)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1287,6 +1310,7 @@ Done:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitSetReleaseHardwareOrderOnFailure)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1317,6 +1341,7 @@ WDFEXPORT(WdfDeviceInitSetReleaseHardwareOrderOnFailure)(
_IRQL_requires_max_(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceInitAllowSelfIoTarget)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1358,6 +1383,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
PDEVICE_OBJECT
STDCALL
WDFEXPORT(WdfFdoInitWdmGetPhysicalDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1384,6 +1410,7 @@ WDFEXPORT(WdfFdoInitWdmGetPhysicalDevice)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfFdoInitOpenRegistryKey)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1435,6 +1462,7 @@ WDFEXPORT(WdfFdoInitOpenRegistryKey)(
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfFdoInitSetFilter)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1468,6 +1496,7 @@ WDFEXPORT(WdfFdoInitSetFilter)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfFdoInitQueryProperty)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1544,6 +1573,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfFdoInitAllocAndQueryProperty)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1627,6 +1657,7 @@ Return Value:
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfFdoInitSetEventCallbacks)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1688,6 +1719,7 @@ WDFEXPORT(WdfFdoInitSetEventCallbacks)(
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfFdoInitSetDefaultChildListConfig)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1754,6 +1786,7 @@ _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfFdoInitQueryPropertyEx)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1871,6 +1904,7 @@ _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfFdoInitAllocAndQueryPropertyEx)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1995,6 +2029,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
PWDFDEVICE_INIT
STDCALL
WDFEXPORT(WdfPdoInitAllocate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2050,6 +2085,7 @@ WDFEXPORT(WdfPdoInitAllocate)(
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfPdoInitSetEventCallbacks)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2096,6 +2132,7 @@ WDFEXPORT(WdfPdoInitSetEventCallbacks)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoInitAssignDeviceID)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2154,6 +2191,7 @@ WDFEXPORT(WdfPdoInitAssignDeviceID)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoInitAssignInstanceID)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2212,6 +2250,7 @@ WDFEXPORT(WdfPdoInitAssignInstanceID)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoInitAddHardwareID)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2277,6 +2316,7 @@ WDFEXPORT(WdfPdoInitAddHardwareID)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoInitAddCompatibleID)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2342,6 +2382,7 @@ WDFEXPORT(WdfPdoInitAddCompatibleID)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoInitAssignContainerID)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2402,6 +2443,7 @@ WDFEXPORT(WdfPdoInitAssignContainerID)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoInitAddDeviceText)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2505,6 +2547,7 @@ Done:
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfPdoInitSetDefaultLocale)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2540,6 +2583,7 @@ WDFEXPORT(WdfPdoInitSetDefaultLocale)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfPdoInitAssignRawDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2583,6 +2627,7 @@ WDFEXPORT(WdfPdoInitAssignRawDevice)(
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfPdoInitAllowForwardingRequestToParent)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2628,6 +2673,7 @@ WDFEXPORT(WdfPdoInitAllowForwardingRequestToParent)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
PWDFDEVICE_INIT
STDCALL
WDFEXPORT(WdfControlDeviceInitAllocate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2666,6 +2712,7 @@ WDFEXPORT(WdfControlDeviceInitAllocate)(
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfControlDeviceInitSetShutdownNotification)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -31,11 +31,11 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxDisposeList.hpp"
#include "fxdisposelist.hpp"
// Tracing support
extern "C" {
#include "FxDisposeList.tmh"
// #include "FxDisposeList.tmh"
}
FxDisposeList::FxDisposeList(
@ -121,7 +121,7 @@ FxDisposeList::Dispose(
ASSERT(m_List.Next == NULL);
__super::Dispose();
FxNonPagedObject::Dispose(); // __super call
return TRUE;
}

View file

@ -27,7 +27,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxDriver.tmh"
// #include "FxDriver.tmh"
}
FxDriver::FxDriver(
@ -133,7 +133,7 @@ FxDriver::Dispose(
m_DisposeList->WaitForEmpty();
}
return __super::Dispose();
return FxNonPagedObject::Dispose(); // __super call
}
VOID

View file

@ -27,10 +27,10 @@ Revision History:
// Tracing support
extern "C" {
#include <ntverp.h>
#include "FxDriverApi.tmh"
// #include "FxDriverApi.tmh"
}
#include "FxTelemetry.hpp"
#include "fxtelemetry.hpp"
//
// extern the whole file
@ -44,6 +44,7 @@ extern "C" {
__drv_maxIRQL(PASSIVE_LEVEL)
PWSTR
STDCALL
WDFEXPORT(WdfDriverGetRegistryPath)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -71,9 +72,13 @@ WDFEXPORT(WdfDriverGetRegistryPath)(
return pDriver->GetRegistryPathUnicodeString()->Buffer;
}
VOID
RosInitWdf();
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDriverCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -98,6 +103,9 @@ WDFEXPORT(WdfDriverCreate)(
const LONG validFlags = WdfDriverInitNonPnpDriver |
WdfDriverInitNoDispatchOverride;
RosInitWdf();
DriverGlobals = WdfDriverGlobals;
hDriver = NULL;
pFxDriverGlobals = GetFxDriverGlobals(DriverGlobals);
@ -302,6 +310,7 @@ WDFEXPORT(WdfDriverCreate)(
*Driver = hDriver;
}
#ifndef __REACTOS__
if (FX_TELEMETRY_ENABLED(g_TelemetryProvider, pFxDriverGlobals)) {
FxAutoString imageName;
@ -329,6 +338,7 @@ WDFEXPORT(WdfDriverCreate)(
imageName.m_UnicodeString.Buffer,
pVersionStr);
}
#endif // __REACTOS__
}
else {
if (pDriver != NULL) {
@ -344,6 +354,7 @@ WDFEXPORT(WdfDriverCreate)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDriverRegisterTraceInfo)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -368,6 +379,7 @@ WDFEXPORT(WdfDriverRegisterTraceInfo)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDriverRetrieveVersionString)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -442,6 +454,7 @@ WDFEXPORT(WdfDriverRetrieveVersionString)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfDriverIsVersionAvailable)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -27,7 +27,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxFileObject.tmh"
// #include "FxFileObject.tmh"
}
//
@ -501,7 +501,7 @@ Return Value:
break;
default:
return __super::QueryInterface(Params);
return FxNonPagedObject::QueryInterface(Params); // __super call
}
return STATUS_SUCCESS;

View file

@ -24,10 +24,10 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxFileObject.hpp"
#include "fxfileobject.hpp"
extern "C" {
#include "FxFileObjectApi.tmh"
// #include "FxFileObjectApi.tmh"
}
//
@ -37,6 +37,7 @@ extern "C" {
__drv_maxIRQL(PASSIVE_LEVEL)
PUNICODE_STRING
STDCALL
WDFEXPORT(WdfFileObjectGetFileName)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -93,6 +94,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
ULONG
STDCALL
WDFEXPORT(WdfFileObjectGetFlags)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -139,6 +141,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDEVICE
STDCALL
WDFEXPORT(WdfFileObjectGetDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -32,7 +32,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxIrpQueue.tmh"
// #include "FxIrpQueue.tmh"
}
//

View file

@ -22,7 +22,7 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxLookasideList.hpp"
#include "fxlookasidelist.hpp"
FxLookasideList::FxLookasideList(
__in PFX_DRIVER_GLOBALS FxDriverGlobals,

View file

@ -22,11 +22,11 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxNPagedLookasideList.hpp"
#include "FxPagedLookasideList.hpp"
#include "fxnpagedlookasidelist.hpp"
#include "fxpagedlookasidelist.hpp"
extern "C" {
#include "FxLookasideListAPI.tmh"
// #include "FxLookasideListAPI.tmh"
}
extern "C" {
@ -36,6 +36,7 @@ __drv_when(PoolType == 1 || PoolType == 257, __drv_maxIRQL(APC_LEVEL))
__drv_when(PoolType == 0 || PoolType == 256, __drv_maxIRQL(DISPATCH_LEVEL))
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfLookasideListCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -235,6 +236,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfMemoryCreateFromLookaside)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -21,10 +21,10 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxMemoryBuffer.hpp"
#include "fxmemorybuffer.hpp"
extern "C" {
#include "FxMemoryBuffer.tmh"
// #include "FxMemoryBuffer.tmh"
}
_Must_inspect_result_

View file

@ -22,10 +22,10 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxMemoryBuffer.hpp"
#include "fxmemorybuffer.hpp"
extern "C" {
#include "FxMemoryBufferAPI.tmh"
// #include "FxMemoryBufferAPI.tmh"
}
extern "C" {
@ -35,6 +35,7 @@ __drv_when(PoolType == 1 || PoolType == 257, __drv_maxIRQL(APC_LEVEL))
__drv_when(PoolType == 0 || PoolType == 256, __drv_maxIRQL(DISPATCH_LEVEL))
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfMemoryCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -164,6 +165,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
PVOID
WDFAPI
STDCALL
WDFEXPORT(WdfMemoryGetBuffer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -207,6 +209,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfMemoryCopyToBuffer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -285,6 +288,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfMemoryCopyFromBuffer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -22,8 +22,8 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxNPagedLookasideList.hpp"
#include "FxMemoryBufferFromLookaside.hpp"
#include "fxnpagedlookasidelist.hpp"
#include "fxmemorybufferfromlookaside.hpp"
FxMemoryBufferFromLookaside::FxMemoryBufferFromLookaside(
__in PFX_DRIVER_GLOBALS FxDriverGlobals,
@ -215,7 +215,7 @@ Return Value:
// within the destructor b/c then all parent objects would be destructing on
// freed pool.
//
FxMemoryBufferFromLookaside::~FxMemoryBufferFromLookaside();
this->~FxMemoryBufferFromLookaside();
//
// After FxLookaside::Reclaim, this no longer points to valid memory so we
@ -268,7 +268,7 @@ FxMemoryBufferFromPoolLookaside::SelfDestruct(
//
// Free the object itself
//
__super::SelfDestruct();
FxMemoryBufferFromLookaside::SelfDestruct(); // __super call
}
_Must_inspect_result_

View file

@ -21,7 +21,7 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxMemoryBufferPreallocated.hpp"
#include "fxmemorybufferpreallocated.hpp"
FxMemoryBufferPreallocated::FxMemoryBufferPreallocated(
_In_ PFX_DRIVER_GLOBALS FxDriverGlobals,
@ -125,7 +125,7 @@ FxMemoryBufferPreallocated::QueryInterface(
return STATUS_SUCCESS;
}
else {
return __super::QueryInterface(Params);
return FxMemoryObject::QueryInterface(Params); // __super call
}
}

View file

@ -22,10 +22,10 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxMemoryBufferPreallocated.hpp"
#include "fxmemorybufferpreallocated.hpp"
extern "C" {
#include "FxMemoryBufferPreallocatedAPI.tmh"
// #include "FxMemoryBufferPreallocatedAPI.tmh"
}
extern "C" {
@ -34,6 +34,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfMemoryCreatePreallocated)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -136,6 +137,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
WDFAPI
NTSTATUS
STDCALL
WDFEXPORT(WdfMemoryAssignBuffer)(
_In_
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -23,7 +23,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxMemoryObject.tmh"
// #include "FxMemoryObject.tmh"
}
FxMemoryObject::FxMemoryObject(

View file

@ -23,8 +23,8 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxPagedLookasideList.hpp"
#include "FxMemoryBufferFromLookaside.hpp"
#include "fxpagedlookasidelist.hpp"
#include "fxmemorybufferfromlookaside.hpp"
FxPagedLookasideListFromPool::FxPagedLookasideListFromPool(
__in PFX_DRIVER_GLOBALS FxDriverGlobals,

View file

@ -27,16 +27,9 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequest.tmh"
// #include "FxRequest.tmh"
}
#define WDF_REQUEST_REUSE_MUST_COMPLETE 2
FxRequest::FxRequest(
__in PFX_DRIVER_GLOBALS FxDriverGlobals,
__in MdIrp Irp,
@ -1298,13 +1291,12 @@ FxRequest::GetMemoryObject(
NTSTATUS status;
ULONG length;
KIRQL irql;
BOOLEAN mapMdl, mdlMapped;
BOOLEAN mapMdl;
UCHAR majorFunction;
status = STATUS_SUCCESS;
length = 0x0;
mapMdl = FALSE;
mdlMapped = FALSE;
irql = PASSIVE_LEVEL;
majorFunction = m_Irp.GetMajorFunction();
@ -2146,7 +2138,6 @@ FxRequest::Reuse(
)
{
FxIrp currentIrp;
FxRequestContext* pContext;
PFX_DRIVER_GLOBALS pFxDriverGlobals = GetDriverGlobals();
//
@ -2177,7 +2168,6 @@ FxRequest::Reuse(
SetCompletionRoutine(NULL, NULL);
}
pContext = NULL;
currentIrp.SetIrp(m_Irp.GetIrp());
if (currentIrp.GetIrp() != NULL) {
@ -2743,7 +2733,7 @@ FxRequest::QueryInterface(
// || || Fall || ||
// \/ \/ through \/ \/
default:
return __super::QueryInterface(Params);
return FxRequestBase::QueryInterface(Params); // __super call
}
return STATUS_SUCCESS;
@ -3114,7 +3104,7 @@ FxRequest::Release(
allocFromIo = IsAllocatedFromIo();
canComplete = IsCanComplete();
retValue = __super::Release(Tag, Line, File);
retValue = FxRequestBase::Release(Tag, Line, File); // __super call
if (reservedRequest && retValue == 1 && m_Completed) {
//
@ -3195,7 +3185,7 @@ FxRequestFromLookaside::SelfDestruct(
//
// Destroy the object
//
FxRequestFromLookaside::~FxRequestFromLookaside();
// FxRequestFromLookaside::~FxRequestFromLookaside(); __REACTOS__
if (IsRequestForwardedToParent()) {

View file

@ -28,7 +28,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequestApi.tmh"
// #include "FxRequestApi.tmh"
//
// Verifiers
@ -64,6 +64,7 @@ VerifyWdfRequestForwardToParentDeviceIoQueue,
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -156,6 +157,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestCreateFromIrp)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -255,6 +257,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestReuse)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -326,6 +329,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestChangeTarget)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -379,6 +383,7 @@ FX_VF_FUNCTION(VerifyRequestComplete) (
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestComplete)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -439,6 +444,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestCompleteWithPriorityBoost)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -507,6 +513,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestCompleteWithInformation)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -574,6 +581,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestSetInformation)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -630,6 +638,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
ULONG_PTR
WDFAPI
STDCALL
WDFEXPORT(WdfRequestGetInformation)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -673,6 +682,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveInputMemory)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -784,6 +794,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveOutputMemory)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -906,6 +917,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveInputBuffer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1049,6 +1061,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveOutputBuffer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1202,6 +1215,7 @@ _Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveUnsafeUserInputBuffer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1405,6 +1419,7 @@ _Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveUnsafeUserOutputBuffer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1606,6 +1621,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveInputWdmMdl)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1705,6 +1721,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestRetrieveOutputWdmMdl)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -1850,6 +1867,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfRequestSend)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2104,6 +2122,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestGetStatus)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2124,6 +2143,7 @@ WDFEXPORT(WdfRequestGetStatus)(
__drv_maxIRQL(DISPATCH_LEVEL)
BOOLEAN
WDFAPI
STDCALL
WDFEXPORT(WdfRequestCancelSentRequest)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2176,6 +2196,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(APC_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfRequestIsFrom32BitProcess)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2221,6 +2242,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfRequestFormatRequestUsingCurrentType)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2291,6 +2313,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestWdmFormatUsingStackLocation)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2371,6 +2394,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestSetCompletionRoutine)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2409,6 +2433,7 @@ WDFEXPORT(WdfRequestSetCompletionRoutine)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestGetParameters)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2458,6 +2483,7 @@ WDFEXPORT(WdfRequestGetParameters)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
WDFAPI
STDCALL
WDFEXPORT(WdfRequestGetCompletionParams)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2504,6 +2530,7 @@ WDFEXPORT(WdfRequestGetCompletionParams)(
__drv_maxIRQL(DISPATCH_LEVEL)
MdIrp
WDFAPI
STDCALL
WDFEXPORT(WdfRequestWdmGetIrp)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2568,6 +2595,7 @@ _Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestAllocateTimer)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2610,6 +2638,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFFILEOBJECT
WDFAPI
STDCALL
WDFEXPORT(WdfRequestGetFileObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2689,6 +2718,7 @@ _Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestProbeAndLockUserBufferForRead)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2790,6 +2820,7 @@ _Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
WDFAPI
STDCALL
WDFEXPORT(WdfRequestProbeAndLockUserBufferForWrite)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2888,6 +2919,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
KPROCESSOR_MODE
WDFAPI
STDCALL
WDFEXPORT(WdfRequestGetRequestorMode)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -2930,6 +2962,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFQUEUE
WDFAPI
STDCALL
WDFEXPORT(WdfRequestGetIoQueue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3052,6 +3085,7 @@ FX_VF_FUNCTION(VerifyWdfRequestForwardToIoQueue) (
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestForwardToIoQueue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3206,6 +3240,7 @@ Done:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestForwardToParentDeviceIoQueue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3338,6 +3373,7 @@ Done:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestRequeue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3396,6 +3432,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfRequestMarkCancelable)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3465,6 +3502,7 @@ Returns:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestMarkCancelableEx)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3538,6 +3576,7 @@ Returns:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfRequestUnmarkCancelable)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3619,6 +3658,7 @@ FX_VF_FUNCTION(VerifyWdfRequestIsCanceled)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfRequestIsCanceled)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3666,6 +3706,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfRequestStopAcknowledge)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -3723,6 +3764,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfRequestIsReserved)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -26,7 +26,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequestBase.tmh"
// #include "FxRequestBase.tmh"
}
FxRequestBase::FxRequestBase(
@ -811,7 +811,7 @@ Return Value:
return TRUE;
}
__declspec(noreturn)
DECLSPEC_NORETURN
VOID
FxRequestBase::FatalError(
__in NTSTATUS Status

View file

@ -28,7 +28,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequestContext.tmh"
// #include "FxRequestContext.tmh"
}
FxRequestContext::FxRequestContext(

View file

@ -156,7 +156,7 @@ FxRequestMemory::QueryInterface(
return STATUS_SUCCESS;
}
else {
return __super::QueryInterface(Params);
return FxMemoryBufferPreallocated::QueryInterface(Params); // __super call
}
}

View file

@ -29,7 +29,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequestOutputBuffer.tmh"
// #include "FxRequestOutputBuffer.tmh"
}
PVOID

View file

@ -30,7 +30,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequestSystemBuffer.tmh"
// #include "FxRequestSystemBuffer.tmh"
}
size_t

View file

@ -26,7 +26,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxSyncRequest.tmh"
// #include "FxSyncRequest.tmh"
}
FxSyncRequest::FxSyncRequest(
@ -126,7 +126,7 @@ Return Value:
// Release the initial reference taken on create. Use the base release call
// so that we don't unnecessarily set the event unless we have to.
//
count = __super::RELEASE(NULL);
count = FxRequestBase::RELEASE(NULL); // __super call
//
// For a driver supplied request(m_TrueRequest) the request context is

View file

@ -26,11 +26,11 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxSystemWorkItem.hpp"
#include "fxsystemworkitem.hpp"
// Tracing support
extern "C" {
#include "FxSystemWorkItem.tmh"
// #include "FxSystemWorkItem.tmh"
}
//

View file

@ -26,11 +26,11 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxTimer.hpp"
#include "fxtimer.hpp"
// Tracing support
extern "C" {
#include "FxTimer.tmh"
// #include "FxTimer.tmh"
}
//
@ -160,10 +160,12 @@ FxTimer::Initialize(
//
#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
if (pFxDriverGlobals->IsVersionGreaterThanOrEqualTo(1,13)) {
status = m_Timer.InitializeEx(this, FxTimer::_FxTimerExtCallbackThunk, m_Period,
m_TolerableDelay, m_UseHighResolutionTimer);
} else {
// __REACTOS__ Ex timers are not supported
// if (pFxDriverGlobals->IsVersionGreaterThanOrEqualTo(1,13)) {
// status = m_Timer.InitializeEx(this, FxTimer::_FxTimerExtCallbackThunk, m_Period,
// m_TolerableDelay, m_UseHighResolutionTimer);
// } else
{
status = m_Timer.Initialize(this, FxTimer::_FxTimerDpcThunk, m_Period);
}
#else

View file

@ -25,10 +25,10 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxTimer.hpp"
#include "fxtimer.hpp"
extern "C" {
#include "FxTimerApi.tmh"
// #include "FxTimerApi.tmh"
}
//
@ -39,6 +39,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfTimerCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -199,6 +200,7 @@ Notes:
__drv_maxIRQL(DISPATCH_LEVEL)
BOOLEAN
STDCALL
WDFEXPORT(WdfTimerStart)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -245,6 +247,7 @@ Returns:
__drv_when(Wait == __true, __drv_maxIRQL(PASSIVE_LEVEL))
__drv_when(Wait == __false, __drv_maxIRQL(DISPATCH_LEVEL))
BOOLEAN
STDCALL
WDFEXPORT(WdfTimerStop)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -295,6 +298,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFOBJECT
STDCALL
WDFEXPORT(WdfTimerGetParentObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -26,7 +26,7 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxWorkItem.hpp"
#include "fxworkitem.hpp"
#if (FX_CORE_MODE == FX_CORE_USER_MODE)
//
@ -37,7 +37,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxWorkItem.tmh"
// #include "FxWorkItem.tmh"
}
FxWorkItem::FxWorkItem(
@ -319,8 +319,8 @@ FxWorkItem::Enqueue(
// object and Globals while they are outstanding.
// These will be released when the workitem completes.
//
ADDREF(WorkItemThunk);
pFxDriverGlobals->ADDREF(WorkItemThunk);
ADDREF((PVOID)WorkItemThunk);
pFxDriverGlobals->ADDREF((PVOID)WorkItemThunk);
enqueue = TRUE;
}
@ -436,12 +436,12 @@ Return Value:
// Release the reference on the FxWorkItem and Globals taken when Enqueue
// was done. This may release the FxWorkItem if it is running down.
//
pWorkItem->RELEASE(WorkItemThunk);
pWorkItem->RELEASE((PVOID)WorkItemThunk);
//
// This may release the driver if it is running down.
//
pFxDriverGlobals->RELEASE(WorkItemThunk);
pFxDriverGlobals->RELEASE((PVOID)WorkItemThunk);
}
VOID

View file

@ -25,10 +25,10 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxWorkItem.hpp"
#include "fxworkitem.hpp"
extern "C" {
#include "FxWorkItemApi.tmh"
// #include "FxWorkItemApi.tmh"
}
@ -40,6 +40,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfWorkItemCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -144,6 +145,7 @@ Notes:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfWorkItemEnqueue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -180,6 +182,7 @@ Returns:
__drv_maxIRQL(DISPATCH_LEVEL)
WDFOBJECT
STDCALL
WDFEXPORT(WdfWorkItemGetParentObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -219,6 +222,7 @@ Returns:
__drv_maxIRQL(PASSIVE_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfWorkItemFlush)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -26,7 +26,7 @@ Revision History:
#include "fxiotarget.hpp"
extern "C" {
#include "FxDeviceApiKm.tmh"
// #include "FxDeviceApiKm.tmh"
}
//
@ -58,6 +58,7 @@ VerifyWdfDeviceWdmDispatchIrpToIoQueue,
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDEVICE
STDCALL
WDFEXPORT(WdfWdmDeviceGetWdfDeviceHandle)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -72,6 +73,7 @@ WDFEXPORT(WdfWdmDeviceGetWdfDeviceHandle)(
__drv_maxIRQL(DISPATCH_LEVEL)
PDEVICE_OBJECT
STDCALL
WDFEXPORT(WdfDeviceWdmGetDeviceObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -91,6 +93,7 @@ WDFEXPORT(WdfDeviceWdmGetDeviceObject)(
__drv_maxIRQL(DISPATCH_LEVEL)
PDEVICE_OBJECT
STDCALL
WDFEXPORT(WdfDeviceWdmGetAttachedDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -111,6 +114,7 @@ WDFEXPORT(WdfDeviceWdmGetAttachedDevice)(
__drv_maxIRQL(DISPATCH_LEVEL)
PDEVICE_OBJECT
STDCALL
WDFEXPORT(WdfDeviceWdmGetPhysicalDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -130,6 +134,7 @@ WDFEXPORT(WdfDeviceWdmGetPhysicalDevice)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDFFILEOBJECT
STDCALL
WDFEXPORT(WdfDeviceGetFileObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -206,6 +211,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceWdmDispatchPreprocessedIrp)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -316,6 +322,7 @@ FX_VF_FUNCTION(VerifyWdfDeviceWdmDispatchIrp) (
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceWdmDispatchIrp)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -361,7 +368,7 @@ Returns:
FxPointerNotNull(device->GetDriverGlobals(), Irp);
FxPointerNotNull(device->GetDriverGlobals(), DispatchContext);
if ((UCHAR)DispatchContext & FX_IN_DISPATCH_CALLBACK) {
if ((UCHAR)(ULONG_PTR)DispatchContext & FX_IN_DISPATCH_CALLBACK) {
//
// Called from a dispach irp callback.
//
@ -395,6 +402,7 @@ Returns:
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceWdmDispatchIrpToIoQueue)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -497,6 +505,7 @@ WDFEXPORT(WdfDeviceWdmDispatchIrpToIoQueue)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAddDependentUsageDeviceObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -522,6 +531,7 @@ WDFEXPORT(WdfDeviceAddDependentUsageDeviceObject)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceRemoveDependentUsageDeviceObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -548,6 +558,7 @@ WDFEXPORT(WdfDeviceRemoveDependentUsageDeviceObject)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAssignMofResourceName)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -606,6 +617,7 @@ WDFEXPORT(WdfDeviceAssignMofResourceName)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetSpecialFileSupport)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -646,6 +658,7 @@ WDFEXPORT(WdfDeviceSetSpecialFileSupport)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceIndicateWakeStatus)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -706,6 +719,7 @@ WDFEXPORT(WdfDeviceIndicateWakeStatus)(
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceSetBusInformationForChildren)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -730,6 +744,7 @@ WDFEXPORT(WdfDeviceSetBusInformationForChildren)(
_Must_inspect_result_
__drv_maxIRQL(DISPATCH_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceAddRemovalRelationsPhysicalDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -770,6 +785,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceRemoveRemovalRelationsPhysicalDevice)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -810,6 +826,7 @@ Return Value:
__drv_maxIRQL(DISPATCH_LEVEL)
VOID
STDCALL
WDFEXPORT(WdfDeviceClearRemovalRelationsDevices)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -843,6 +860,7 @@ Return Value:
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceWdmAssignPowerFrameworkSettings)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -25,7 +25,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDeviceBaseKm.tmh"
// #include "FxDeviceBaseKm.tmh"
}
_Must_inspect_result_

View file

@ -25,7 +25,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDeviceInitKm.tmh"
// #include "FxDeviceInitKm.tmh"
}
VOID

View file

@ -25,7 +25,7 @@ Revision History:
#include "coreprivshared.hpp"
extern "C" {
#include "FxDeviceKm.tmh"
// #include "FxDeviceKm.tmh"
}
_Must_inspect_result_
@ -192,10 +192,10 @@ FxDevice::FdoInitialize(
return status;
}
status = m_PkgWmi->PostCreateDeviceInitialize();
if (!NT_SUCCESS(status)) {
return status;
}
// status = m_PkgWmi->PostCreateDeviceInitialize(); __REACTOS__
// if (!NT_SUCCESS(status)) {
// return status;
// }
status = m_PkgGeneral->PostCreateDeviceInitialize(DeviceInit);
if (!NT_SUCCESS(status)) {
@ -302,10 +302,10 @@ FxDevice::PdoInitialize(
pPkgPdo->m_AllowForwardRequestToParent = TRUE;
}
status = m_PkgWmi->PostCreateDeviceInitialize();
if (!NT_SUCCESS(status)) {
return status;
}
// status = m_PkgWmi->PostCreateDeviceInitialize(); __REACTOS__
// if (!NT_SUCCESS(status)) {
// return status;
// }
status = m_PkgGeneral->PostCreateDeviceInitialize(DeviceInit);
if (!NT_SUCCESS(status)) {
@ -410,10 +410,10 @@ FxDevice::ControlDeviceInitialize(
return status;
}
status = m_PkgWmi->PostCreateDeviceInitialize();
if (!NT_SUCCESS(status)) {
return status;
}
// status = m_PkgWmi->PostCreateDeviceInitialize(); __REACTOS__
// if (!NT_SUCCESS(status)) {
// return status;
// }
status = m_PkgGeneral->PostCreateDeviceInitialize(DeviceInit);
if (!NT_SUCCESS(status)) {
@ -489,7 +489,8 @@ FxDevice::WmiPkgRegister(
VOID
)
{
return m_PkgWmi->Register();
// return m_PkgWmi->Register(); __REACTOS__
return STATUS_SUCCESS;
}
VOID
@ -497,7 +498,7 @@ FxDevice::WmiPkgDeregister(
VOID
)
{
m_PkgWmi->Deregister();
// m_PkgWmi->Deregister(); __REACTOS__
}
VOID
@ -505,7 +506,7 @@ FxDevice::WmiPkgCleanup(
VOID
)
{
m_PkgWmi->Cleanup();
// m_PkgWmi->Cleanup(); __REACTOS__
}
NTSTATUS

View file

@ -27,7 +27,7 @@ Revision History:
// Tracing support
extern "C" {
#include <ntverp.h>
#include "FxDriverApiKm.tmh"
// #include "FxDriverApiKm.tmh"
}
//
@ -38,6 +38,7 @@ extern "C" {
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDriverOpenParametersRegistryKey)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -117,6 +118,7 @@ WDFEXPORT(WdfDriverOpenParametersRegistryKey)(
__drv_maxIRQL(DISPATCH_LEVEL)
PDRIVER_OBJECT
STDCALL
WDFEXPORT(WdfDriverWdmGetDriverObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -136,6 +138,7 @@ WDFEXPORT(WdfDriverWdmGetDriverObject)(
__drv_maxIRQL(DISPATCH_LEVEL)
WDFDRIVER
STDCALL
WDFEXPORT(WdfWdmDriverGetWdfDriverHandle)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -149,6 +152,7 @@ WDFEXPORT(WdfWdmDriverGetWdfDriverHandle)(
}
VOID
STDCALL
WDFEXPORT(WdfDriverMiniportUnload)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,
@ -169,6 +173,7 @@ WDFEXPORT(WdfDriverMiniportUnload)(
_Must_inspect_result_
__drv_maxIRQL(PASSIVE_LEVEL)
NTSTATUS
STDCALL
WDFEXPORT(WdfDeviceMiniportCreate)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -29,7 +29,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxDriverKm.tmh"
// #include "FxDriverKm.tmh"
}
_Must_inspect_result_

View file

@ -22,10 +22,10 @@ Revision History:
--*/
#include "coreprivshared.hpp"
#include "FxFileObject.hpp"
#include "fxfileobject.hpp"
extern "C" {
#include "FxFileObjectApiKm.tmh"
// #include "FxFileObjectApiKm.tmh"
}
//
@ -35,6 +35,7 @@ extern "C" {
__drv_maxIRQL(DISPATCH_LEVEL)
PFILE_OBJECT
STDCALL
WDFEXPORT(WdfFileObjectWdmGetFileObject)(
__in
PWDF_DRIVER_GLOBALS DriverGlobals,

View file

@ -27,7 +27,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxFileObjectKm.tmh"
// #include "FxFileObjectKm.tmh"
}
VOID

View file

@ -23,8 +23,8 @@ Revision History:
#include "coreprivshared.hpp"
#include "FxNPagedLookasideList.hpp"
#include "FxMemoryBufferFromLookaside.hpp"
#include "fxnpagedlookasidelist.hpp"
#include "fxmemorybufferfromlookaside.hpp"
FxNPagedLookasideList::FxNPagedLookasideList(
__in PFX_DRIVER_GLOBALS FxDriverGlobals,

View file

@ -27,7 +27,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequestKm.tmh"
// #include "FxRequestKm.tmh"
}
VOID
@ -51,8 +51,8 @@ Return Value:
--*/
{
PWDF_REQUEST_PARAMETERS pWdfRequestParameters;
PIO_STACK_LOCATION pIoStackLocation;
PWDF_REQUEST_PARAMETERS pWdfRequestParameters = NULL;
PIO_STACK_LOCATION pIoStackLocation = NULL;
UNREFERENCED_PARAMETER(pWdfRequestParameters);
UNREFERENCED_PARAMETER(pIoStackLocation);

View file

@ -30,7 +30,7 @@ Revision History:
// Tracing support
extern "C" {
#include "FxRequestSystemBufferKm.tmh"
// #include "FxRequestSystemBufferKm.tmh"
}
_Must_inspect_result_

View file

@ -23,13 +23,13 @@ Revision History:
--*/
#if FX_CORE_MODE==FX_CORE_KERNEL_MODE
#include "VfPrivKm.hpp"
#include "vfprivkm.hpp"
#else if ((FX_CORE_MODE)==(FX_CORE_USER_MODE))
#include "VfPrivUm.hpp"
#include "vfprivum.hpp"
#endif
extern "C" {
#include "FxDynamics.h"
#include "fxdynamics.h"
}
#include "vfeventhooks.hpp"

View file

@ -25,7 +25,7 @@ Revision History:
#pragma once
#include "MxMacros.h"
#include "mxmacros.h"
//
// Greater than 64 logical processors support: direct DDK to include the new
@ -34,9 +34,11 @@ Revision History:
//
#define NT_PROCESSOR_GROUPS 1
#define WDF_VIOLATION ((ULONG)0x0000010DL)
#if (FX_CORE_MODE == FX_CORE_USER_MODE)
#include "MxUm.h"
#include "mxum.h"
#elif (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
#include "MxKm.h"
#include "mxkm.h"
#endif

View file

@ -66,7 +66,7 @@ public:
m_DriverObject = DriverObject;
}
PVOID
PDRIVER_ADD_DEVICE
GetDriverExtensionAddDevice(
VOID
);

View file

@ -126,6 +126,7 @@ public:
static
DECLSPEC_NORETURN
VOID
MxBugCheckEx(
__in ULONG BugCheckCode,

View file

@ -14,7 +14,7 @@ Abstract:
#pragma once
#include "MxDeviceObject.h"
#include "mxdeviceobject.h"
__inline
CCHAR
@ -65,7 +65,9 @@ MxDeviceObject::GetFlags(
VOID
)
{
#ifdef _MSC_VER
#pragma warning(disable:28129)
#endif
return m_DeviceObject->Flags;
}
@ -75,7 +77,9 @@ MxDeviceObject::SetFlags(
ULONG Flags
)
{
#ifdef _MSC_VER
#pragma warning(disable:28129)
#endif
m_DeviceObject->Flags = Flags;
}

View file

@ -18,10 +18,10 @@ typedef DRIVER_ADD_DEVICE MdDriverAddDeviceType, *MdDriverAddDevice;
typedef DRIVER_UNLOAD MdDriverUnloadType, *MdDriverUnload;
typedef DRIVER_DISPATCH MdDriverDispatchType, *MdDriverDispatch;
#include "MxDriverObject.h"
#include "mxdriverobject.h"
__inline
PVOID
PDRIVER_ADD_DEVICE
MxDriverObject::GetDriverExtensionAddDevice(
VOID
)

View file

@ -25,7 +25,7 @@ Revision History:
typedef KEVENT MdEvent;
#include "MxEvent.h"
#include "mxevent.h"
__inline
MxEvent::MxEvent()
@ -49,7 +49,9 @@ MxEvent::~MxEvent()
__inline
NTSTATUS
#ifdef _MSC_VER
#pragma prefast(suppress:__WARNING_UNMATCHED_DECL_ANNO, "_Must_inspect_result_ not needed in kernel mode as the function always succeeds");
#endif
MxEvent::Initialize(
__in EVENT_TYPE Type,
__in BOOLEAN InitialState

View file

@ -14,7 +14,7 @@ Abstract:
#pragma once
#include "MxFileObject.h"
#include "mxfileobject.h"
__inline
PUNICODE_STRING

View file

@ -37,7 +37,7 @@ typedef PKINTERRUPT MdInterrupt;
typedef KSERVICE_ROUTINE MdInterruptServiceRoutineType, *MdInterruptServiceRoutine;
typedef KSYNCHRONIZE_ROUTINE MdInterruptSynchronizeRoutineType, *MdInterruptSynchronizeRoutine;
#include "MxGeneral.h"
#include "mxgeneral.h"
#include <ntstrsafe.h>
__inline
@ -138,7 +138,9 @@ Mx::MxBugCheckEx(
__in ULONG_PTR BugCheckParameter4
)
{
#ifdef _MSC_VER
#pragma prefast(suppress:__WARNING_USE_OTHER_FUNCTION, "KeBugCheckEx is the intent.");
#endif
KeBugCheckEx(
BugCheckCode,
BugCheckParameter1,
@ -146,6 +148,8 @@ Mx::MxBugCheckEx(
BugCheckParameter3,
BugCheckParameter4
);
UNREACHABLE;
}
__inline
@ -177,7 +181,9 @@ Mx::MxAssertMsg(
UNREFERENCED_PARAMETER(Message);
UNREFERENCED_PARAMETER(Condition);
ASSERTMSG(Message, Condition);
ASSERT(Condition);
// ASSERTMSG(Message, Condition); TODO: wtf
}
_Acquires_lock_(_Global_critical_region_)
@ -524,6 +530,7 @@ Mx::MxCreateDeviceSecure(
_Out_ MdDeviceObject *DeviceObject
)
{
#ifndef __REACTOS__ // we don't have wdmsec.lib
return IoCreateDeviceSecure(DriverObject,
DeviceExtensionSize,
DeviceName,
@ -533,6 +540,16 @@ Mx::MxCreateDeviceSecure(
DefaultSDDLString,
DeviceClassGuid,
DeviceObject);
#else
return IoCreateDevice(
DriverObject,
DeviceExtensionSize,
DeviceName,
DeviceType,
DeviceCharacteristics,
Exclusive,
DeviceObject);
#endif
}
__inline

View file

@ -26,24 +26,24 @@ Revision History:
#pragma once
#include <ntddk.h>
#include <procgrp.h>
#include <wdmsec.h>
// #include <procgrp.h>
// #include <wdmsec.h>
#include <wmikm.h>
#include <ntwmi.h>
// #include <wmikm.h>
// #include <ntwmi.h>
typedef KDEFERRED_ROUTINE MdDeferredRoutineType, *MdDeferredRoutine;
typedef EXT_CALLBACK MdExtCallbackType, *MdExtCallback;
#define FX_DEVICEMAP_PATH L"\\REGISTRY\\MACHINE\\HARDWARE\\DEVICEMAP\\"
#include "MxGeneralKm.h"
#include "MxLockKm.h"
#include "MxPagedLockKm.h"
#include "MxEventKm.h"
#include "MxMemoryKm.h"
#include "MxTimerKm.h"
#include "MxWorkItemKm.h"
#include "MxDriverObjectKm.h"
#include "MxDeviceObjectKm.h"
#include "MxFileObjectKm.h"
#include "mxgeneralkm.h"
#include "mxlockkm.h"
#include "mxpagedlockkm.h"
#include "mxeventkm.h"
#include "mxmemorykm.h"
#include "mxtimerkm.h"
#include "mxworkitemkm.h"
#include "mxdriverobjectkm.h"
#include "mxdeviceobjectkm.h"
#include "mxfileobjectkm.h"

View file

@ -23,11 +23,11 @@ Revision History:
#pragma once
#include "DbgMacros.h"
#include "dbgmacros.h"
typedef KSPIN_LOCK MdLock;
#include "MxLock.h"
#include "mxlock.h"
__inline
MxLock::MxLock(

View file

@ -23,7 +23,7 @@ Revision History:
#pragma once
#include "MxMemory.h"
#include "mxmemory.h"
__inline
PVOID

View file

@ -23,11 +23,11 @@ Revision History:
#pragma once
#include "DbgMacros.h"
#include "dbgmacros.h"
typedef FAST_MUTEX MdPagedLock;
#include "MxPagedLock.h"
#include "mxpagedlock.h"
__inline
MxPagedLock::MxPagedLock(
@ -46,7 +46,9 @@ MxPagedLock::MxPagedLock(
__inline
NTSTATUS
#ifdef _MSC_VER
#pragma prefast(suppress:__WARNING_UNMATCHED_DEFN, "_Must_inspect_result_ not needed in kernel mode as the function always succeeds");
#endif
MxPagedLockNoDynam::Initialize(
)
{

View file

@ -47,8 +47,8 @@ typedef struct _MdTimer {
//
BOOLEAN m_IsExtTimer;
#pragma warning(push)
#pragma warning( disable: 4201 ) // nonstandard extension used : nameless struct/union
// #pragma warning(push)
// #pragma warning( disable: 4201 ) // nonstandard extension used : nameless struct/union
union {
struct {
@ -69,7 +69,7 @@ typedef struct _MdTimer {
};
};
#pragma warning(pop)
// #pragma warning(pop)
//
// Context to be passed in to the callback function
@ -78,7 +78,7 @@ typedef struct _MdTimer {
} MdTimer;
#include "MxTimer.h"
#include "mxtimer.h"
MxTimer::MxTimer(
VOID
@ -94,25 +94,28 @@ MxTimer::~MxTimer(
VOID
)
{
BOOLEAN wasCancelled;
// __REACTOS__ Ex timers are not supported
// BOOLEAN wasCancelled;
if (m_Timer.m_IsExtTimer &&
m_Timer.m_KernelExTimer) {
wasCancelled = ExDeleteTimer(m_Timer.m_KernelExTimer,
TRUE, // Cancel if pending. We don't expect
// it to be pending though
FALSE,// Wait
NULL);
//
// Timer should not have been pending
//
ASSERT(wasCancelled == FALSE);
m_Timer.m_KernelExTimer = NULL;
}
// if (m_Timer.m_IsExtTimer &&
// m_Timer.m_KernelExTimer) {
// wasCancelled = ExDeleteTimer(m_Timer.m_KernelExTimer,
// TRUE, // Cancel if pending. We don't expect
// // it to be pending though
// FALSE,// Wait
// NULL);
// //
// // Timer should not have been pending
// //
// ASSERT(wasCancelled == FALSE);
// m_Timer.m_KernelExTimer = NULL;
// }
}
NTSTATUS
#ifdef _MSC_VER
#pragma prefast(suppress:__WARNING_UNMATCHED_DECL_ANNO, "_Must_inspect_result_ not needed in kernel mode as the function always succeeds");
#endif
MxTimer::Initialize(
__in_opt PVOID TimerContext,
__in MdDeferredRoutine TimerCallback,
@ -166,37 +169,38 @@ Returns:
--*/
{
NTSTATUS status;
ULONG attributes = 0;
// NTSTATUS status;
// ULONG attributes = 0;
m_Timer.m_TimerContext = TimerContext;
m_Timer.m_ExTimerCallback = TimerCallback;
m_Timer.m_Period = Period;
// m_Timer.m_TimerContext = TimerContext;
// m_Timer.m_ExTimerCallback = TimerCallback;
// m_Timer.m_Period = Period;
if (TolerableDelay != 0) {
// if (TolerableDelay != 0) {
attributes |= EX_TIMER_NO_WAKE;
// attributes |= EX_TIMER_NO_WAKE;
} else if (UseHighResolutionTimer) {
// } else if (UseHighResolutionTimer) {
attributes |= EX_TIMER_HIGH_RESOLUTION;
}
// attributes |= EX_TIMER_HIGH_RESOLUTION;
// }
m_Timer.m_KernelExTimer = ExAllocateTimer(m_Timer.m_ExTimerCallback,
TimerContext,
attributes);
if (m_Timer.m_KernelExTimer) {
// m_Timer.m_KernelExTimer = ExAllocateTimer(m_Timer.m_ExTimerCallback,
// TimerContext,
// attributes);
// if (m_Timer.m_KernelExTimer) {
status = STATUS_SUCCESS;
// status = STATUS_SUCCESS;
} else {
// } else {
status = STATUS_INSUFFICIENT_RESOURCES;
}
// status = STATUS_INSUFFICIENT_RESOURCES;
// }
m_Timer.m_IsExtTimer = TRUE;
// m_Timer.m_IsExtTimer = TRUE;
return status;
// return status;
return STATUS_NOT_IMPLEMENTED; // __REACTOS__ Ex timers are not supported
}
@ -208,29 +212,29 @@ MxTimer::StartWithReturn(
)
{
if (m_Timer.m_IsExtTimer) {
// __REACTOS__ Ex timers are not supported
// EXT_SET_PARAMETERS parameters;
EXT_SET_PARAMETERS parameters;
// ExInitializeSetTimerParameters(&parameters);
ExInitializeSetTimerParameters(&parameters);
//
// We get the delay in ms but the underlying API needs it in 100 ns
// units. Convert tolerable delay from ms to 100 ns. However,
// MAXULONG (TolerableDelayUnlimited) has a special meaning that the
// system should never be woken up, so we assign the corresponding
// special value for Ex timers
//
if (TolerableDelay == TolerableDelayUnlimited) {
parameters.NoWakeTolerance = EX_TIMER_UNLIMITED_TOLERANCE;
} else {
parameters.NoWakeTolerance = ((LONGLONG) TolerableDelay) * 10 * 1000;
}
return ExSetTimer(m_Timer.m_KernelExTimer,
DueTime.QuadPart,
(((LONGLONG) m_Timer.m_Period) * 10 * 1000),
&parameters);
// //
// // We get the delay in ms but the underlying API needs it in 100 ns
// // units. Convert tolerable delay from ms to 100 ns. However,
// // MAXULONG (TolerableDelayUnlimited) has a special meaning that the
// // system should never be woken up, so we assign the corresponding
// // special value for Ex timers
// //
// if (TolerableDelay == TolerableDelayUnlimited) {
// parameters.NoWakeTolerance = EX_TIMER_UNLIMITED_TOLERANCE;
// } else {
// parameters.NoWakeTolerance = ((LONGLONG) TolerableDelay) * 10 * 1000;
// }
// return ExSetTimer(m_Timer.m_KernelExTimer,
// DueTime.QuadPart,
// (((LONGLONG) m_Timer.m_Period) * 10 * 1000),
// &parameters);
return FALSE;
} else {
return KeSetCoalescableTimer(&(m_Timer.KernelTimer),
@ -273,7 +277,8 @@ MxTimer::Stop(
BOOLEAN bRetVal;
if (m_Timer.m_IsExtTimer) {
bRetVal = ExCancelTimer(m_Timer.m_KernelExTimer, NULL);
bRetVal = FALSE;
// bRetVal = ExCancelTimer(m_Timer.m_KernelExTimer, NULL); // __REACTOS__ Ex timers are not supported
} else {
bRetVal = KeCancelTimer(&(m_Timer.KernelTimer));

View file

@ -26,7 +26,7 @@ Revision History:
typedef IO_WORKITEM_ROUTINE MX_WORKITEM_ROUTINE, *PMX_WORKITEM_ROUTINE;
typedef PIO_WORKITEM MdWorkItem;
#include "MxWorkItem.h"
#include "mxworkitem.h"
__inline
MxWorkItem::MxWorkItem(

View file

@ -45,8 +45,6 @@ typedef PVOID PIO_REMOVE_LOCK;
#include "wdmdefs.h"
#define WDF_VIOLATION ((ULONG)0x0000010DL)
#define FX_PLUGPLAY_REGKEY_DEVICEMAP 0x8
//

Some files were not shown because too many files have changed in this diff Show more