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

View file

@ -5,15 +5,15 @@
#define _FXDMATRANSACTION_HPP_ #define _FXDMATRANSACTION_HPP_
extern "C" { 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. // 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 // begin_wpp enum
@ -912,6 +912,7 @@ protected:
protected: protected:
inline inline
void
SetMapRegisterBase( SetMapRegisterBase(
__in PVOID Value __in PVOID Value
) )
@ -924,6 +925,7 @@ protected:
} }
inline inline
void
ClearMapRegisterBase( ClearMapRegisterBase(
VOID VOID
) )
@ -934,6 +936,7 @@ protected:
} }
inline inline
BOOLEAN
IsMapRegisterBaseSet( IsMapRegisterBaseSet(
VOID VOID
) )
@ -1005,6 +1008,7 @@ protected:
static static
IO_ALLOCATION_ACTION IO_ALLOCATION_ACTION
STDCALL
_AdapterControl( _AdapterControl(
__in PDEVICE_OBJECT DeviceObject, __in PDEVICE_OBJECT DeviceObject,
__in PIRP Irp, __in PIRP Irp,
@ -1528,7 +1532,7 @@ protected:
VOID VOID
) )
{ {
__super::Reuse(); FxDmaPacketTransaction::Reuse(); // __super call
m_ConfigureChannelFunction.Method = NULL; m_ConfigureChannelFunction.Method = NULL;
m_ConfigureChannelContext = NULL; m_ConfigureChannelContext = NULL;

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,4 +4,4 @@
extern "C" { extern "C" {
#include <ntddk.h> #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" { extern "C" {
#include "FxDmaTransaction.tmh" // #include "FxDmaTransaction.tmh"
} }
FxDmaTransactionBase::FxDmaTransactionBase( FxDmaTransactionBase::FxDmaTransactionBase(
@ -842,7 +842,7 @@ FxDmaScatterGatherTransaction::Dispose(
{ {
BOOLEAN ret; BOOLEAN ret;
ret = __super::Dispose(); ret = FxDmaTransactionBase::Dispose(); // __super call
// //
// Free Lookaside Buffer which held SGList // Free Lookaside Buffer which held SGList

View file

@ -21,10 +21,10 @@ Revision History:
--*/ --*/
#include "FxDmaPCH.hpp" #include "fxdmapch.hpp"
extern "C" { 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 // available in public symbols. Various WDFKD debug commands use these
// internal structures to provide information about WDF. // internal structures to provide information about WDF.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include "FxIFR.h" #include "fxifr.h"
extern "C" { extern "C" {
@ -78,9 +78,9 @@ union {
extern "C" { extern "C" {
#include "FxDynamics.h" #include "fxdynamics.h"
#include "FxLibraryCommon.h" #include "fxlibrarycommon.h"
#define KMDF_DEFAULT_NAME "Wdf" ## \ #define KMDF_DEFAULT_NAME "Wdf" ## \
LITERAL(__WDF_MAJOR_VERSION_STRING) ## \ LITERAL(__WDF_MAJOR_VERSION_STRING) ## \

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -26,7 +26,7 @@ Revision History:
// Tracing support // Tracing support
extern "C" { extern "C" {
#include "FxSyncRequest.tmh" // #include "FxSyncRequest.tmh"
} }
FxSyncRequest::FxSyncRequest( FxSyncRequest::FxSyncRequest(
@ -126,7 +126,7 @@ Return Value:
// Release the initial reference taken on create. Use the base release call // 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. // 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 // For a driver supplied request(m_TrueRequest) the request context is

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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