mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:21:51 +00:00
[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:
parent
8a978a179f
commit
1f377076d7
258 changed files with 4047 additions and 2387 deletions
|
@ -28,19 +28,19 @@ extern "C" {
|
|||
#include "mx.h"
|
||||
}
|
||||
|
||||
#include "FxMacros.hpp"
|
||||
#include "fxmacros.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "wdf.h"
|
||||
#include "wdmsec.h"
|
||||
// #include "wdmsec.h"
|
||||
#include "wdmguid.h"
|
||||
|
||||
#include "wdfdevicepri.h"
|
||||
#include "wdfiotargetpri.h"
|
||||
// #include "wdfdevicepri.h"
|
||||
// #include "wdfiotargetpri.h"
|
||||
#include "wdfcx.h"
|
||||
#include "wdfldr.h"
|
||||
|
||||
#include <FxDynamicsWrapper.h>
|
||||
#include <fxdynamicswrapper.h>
|
||||
|
||||
#include "wdf10.h"
|
||||
#include "wdf11.h"
|
||||
|
@ -57,152 +57,158 @@ extern "C" {
|
|||
// Integer overflow functions
|
||||
#include "ntintsafe.h"
|
||||
|
||||
#include "FxForward.hpp"
|
||||
#include "fxforward.hpp"
|
||||
|
||||
//KMDF defines for shared type names
|
||||
#include "FxTypeDefsKm.hpp"
|
||||
#include "fxtypedefskm.hpp"
|
||||
|
||||
// #include "fxwmicompat.h"
|
||||
// #include "fxtrace.h"
|
||||
#if defined(EVENT_TRACING)
|
||||
#include "fxwmicompat.h"
|
||||
#include "fxtrace.h"
|
||||
#else
|
||||
#include "dbgtrace.h"
|
||||
#endif // EVENT_TRACING
|
||||
#include "fxtypes.h"
|
||||
#include "fxrequestcontexttypes.h"
|
||||
#include "fxpool.h"
|
||||
#include "FxGlobalsKM.h"
|
||||
#include "FxPoolInlines.hpp"
|
||||
#include "fxglobalskm.h"
|
||||
#include "fxpoolinlines.hpp"
|
||||
#include "fxverifier.h"
|
||||
#include "fxverifierkm.h"
|
||||
#include "FxMdl.h"
|
||||
#include "FxProbeAndLock.h"
|
||||
#include "fxmdl.h"
|
||||
#include "fxprobeandlock.h"
|
||||
|
||||
#include "FxPerfTraceKm.hpp"
|
||||
#include "DriverFrameworks-KernelMode-KmEvents.h"
|
||||
#include "fxperftracekm.hpp"
|
||||
// #include "DriverFrameworks-KernelMode-KmEvents.h"
|
||||
|
||||
#include <NtStrSafe.h>
|
||||
#include <ntstrsafe.h>
|
||||
|
||||
#include "FxStump.hpp"
|
||||
#include "fxstump.hpp"
|
||||
|
||||
#include "FxRequestBuffer.hpp"
|
||||
#include "fxrequestbuffer.hpp"
|
||||
|
||||
#include "FxTagTracker.hpp"
|
||||
#include "fxtagtracker.hpp"
|
||||
|
||||
// internal locks
|
||||
#include "FxVerifierLock.hpp"
|
||||
#include "FxLock.hpp"
|
||||
#include "fxverifierlock.hpp"
|
||||
#include "fxlock.hpp"
|
||||
|
||||
// base objects
|
||||
#include "fxobject.hpp"
|
||||
#include "FxPagedObject.hpp"
|
||||
#include "FxNonPagedObject.hpp"
|
||||
#include "fxpagedobject.hpp"
|
||||
#include "fxnonpagedobject.hpp"
|
||||
|
||||
#include "fxhandle.h"
|
||||
|
||||
// external locks
|
||||
#include "FxWaitLock.hpp"
|
||||
#include "FxSpinLock.hpp"
|
||||
#include "fxwaitlock.hpp"
|
||||
#include "fxspinlock.hpp"
|
||||
|
||||
// utitilty classes and functions
|
||||
#include "FxTransactionedList.hpp"
|
||||
#include "FxRelatedDeviceList.hpp"
|
||||
#include "FxDisposeList.hpp"
|
||||
#include "FxCollection.hpp"
|
||||
#include "StringUtil.hpp"
|
||||
#include "fxtransactionedlist.hpp"
|
||||
#include "fxrelateddevicelist.hpp"
|
||||
#include "fxdisposelist.hpp"
|
||||
#include "fxcollection.hpp"
|
||||
#include "stringutil.hpp"
|
||||
|
||||
// abstract classes
|
||||
#include "IFxHasCallbacks.hpp"
|
||||
#include "ifxhascallbacks.hpp"
|
||||
|
||||
// callback delegation and locking
|
||||
#include "FxSystemThread.hpp"
|
||||
#include "FxSystemWorkItem.hpp"
|
||||
#include "FxCallbackLock.hpp"
|
||||
#include "FxCallbackSpinLock.hpp"
|
||||
#include "FxCallbackMutexLock.hpp"
|
||||
#include "FxCallback.hpp"
|
||||
#include "FxSystemThread.hpp"
|
||||
#include "fxsystemthread.hpp"
|
||||
#include "fxsystemworkitem.hpp"
|
||||
#include "fxcallbacklock.hpp"
|
||||
#include "fxcallbackspinlock.hpp"
|
||||
#include "fxcallbackmutexlock.hpp"
|
||||
#include "fxcallback.hpp"
|
||||
#include "fxsystemthread.hpp"
|
||||
|
||||
#include "IFxMemory.hpp"
|
||||
#include "FxLookasideList.hpp"
|
||||
#include "FxNPagedLookasideList.hpp"
|
||||
#include "FxPagedLookasideList.hpp"
|
||||
#include "FxMemoryObject.hpp"
|
||||
#include "FxMemoryBuffer.hpp"
|
||||
#include "FxMemoryBufferFromPool.hpp"
|
||||
#include "FxMemoryBufferPreallocated.hpp"
|
||||
#include "FxMemoryBufferFromLookaside.hpp"
|
||||
#include "FxRequestMemory.hpp"
|
||||
#include "FxRegKey.hpp"
|
||||
#include "FxAutoRegistry.hpp"
|
||||
#include "FxAutoString.hpp"
|
||||
#include "FxString.hpp"
|
||||
#include "ifxmemory.hpp"
|
||||
#include "fxlookasidelist.hpp"
|
||||
#include "fxnpagedlookasidelist.hpp"
|
||||
#include "fxpagedlookasidelist.hpp"
|
||||
#include "fxmemoryobject.hpp"
|
||||
#include "fxmemorybuffer.hpp"
|
||||
#include "fxmemorybufferfrompool.hpp"
|
||||
#include "fxmemorybufferpreallocated.hpp"
|
||||
#include "fxmemorybufferfromlookaside.hpp"
|
||||
#include "fxrequestmemory.hpp"
|
||||
#include "fxregkey.hpp"
|
||||
#include "fxautoregistry.hpp"
|
||||
#include "fxautostring.hpp"
|
||||
#include "fxstring.hpp"
|
||||
|
||||
#include "FxValidateFunctions.hpp"
|
||||
#include "FxRequestValidateFunctions.hpp"
|
||||
#include "fxvalidatefunctions.hpp"
|
||||
#include "fxrequestvalidatefunctions.hpp"
|
||||
|
||||
#include "FxResource.hpp"
|
||||
#include "FxRelatedDevice.hpp"
|
||||
#include "FxDeviceInterface.hpp"
|
||||
#include "FxQueryInterface.hpp"
|
||||
#include "FxDeviceText.hpp"
|
||||
#include "fxresource.hpp"
|
||||
#include "fxrelateddevice.hpp"
|
||||
#include "fxdeviceinterface.hpp"
|
||||
#include "fxqueryinterface.hpp"
|
||||
#include "fxdevicetext.hpp"
|
||||
|
||||
#include "FxIrp.hpp"
|
||||
#include "FxDriver.hpp"
|
||||
#include "fxirp.hpp"
|
||||
#include "fxdriver.hpp"
|
||||
|
||||
// generic package interface
|
||||
#include "FxPackage.hpp"
|
||||
#include "FxPkgGeneral.hpp"
|
||||
#include "FxDefaultIrpHandler.hpp"
|
||||
#include "FxPkgPnp.hpp"
|
||||
#include "FxWatchDog.hpp"
|
||||
#include "fxpackage.hpp"
|
||||
#include "fxpkggeneral.hpp"
|
||||
#include "fxdefaultirphandler.hpp"
|
||||
#include "fxpkgpnp.hpp"
|
||||
#include "fxwatchdog.hpp"
|
||||
|
||||
// Device support
|
||||
#include "FxChildList.hpp"
|
||||
#include "FxCxDeviceInfo.hpp"
|
||||
#include "FxDevice.hpp"
|
||||
#include "fxchildlist.hpp"
|
||||
#include "fxcxdeviceinfo.hpp"
|
||||
#include "fxdevice.hpp"
|
||||
|
||||
#include "FxPkgIo.hpp"
|
||||
#include "fxpkgio.hpp"
|
||||
|
||||
#include "FxDeviceToMxInterface.hpp"
|
||||
#include "fxdevicetomxinterface.hpp"
|
||||
|
||||
#include "FxIrpQueue.hpp"
|
||||
#include "FxRequestContext.hpp"
|
||||
#include "FxRequestCallbacks.hpp"
|
||||
#include "FxRequestBase.hpp"
|
||||
#include "FxRequest.hpp"
|
||||
#include "FxSyncRequest.hpp"
|
||||
#include "fxirpqueue.hpp"
|
||||
#include "fxrequestcontext.hpp"
|
||||
#include "fxrequestcallbacks.hpp"
|
||||
#include "fxrequestbase.hpp"
|
||||
#include "fxrequest.hpp"
|
||||
#include "fxsyncrequest.hpp"
|
||||
|
||||
// specialized irp handlers (ie packages)
|
||||
#include "FxPkgFdo.hpp"
|
||||
#include "FxPkgPdo.hpp"
|
||||
#include "FxWmiIrpHandler.hpp"
|
||||
#include "FxWmiProvider.hpp"
|
||||
#include "FxWmiInstance.hpp"
|
||||
#include "fxpkgfdo.hpp"
|
||||
#include "fxpkgpdo.hpp"
|
||||
#include "fxwmiirphandler.hpp"
|
||||
#include "fxwmiprovider.hpp"
|
||||
#include "fxwmiinstance.hpp"
|
||||
|
||||
// queus for read, write, (internal) IOCTL
|
||||
#include "FxIoQueue.hpp"
|
||||
#include "FxFileObject.hpp"
|
||||
#include "FxIrpPreprocessInfo.hpp"
|
||||
#include "FxIrpDynamicDispatchInfo.hpp"
|
||||
#include "fxioqueue.hpp"
|
||||
#include "fxfileobject.hpp"
|
||||
#include "fxirppreprocessinfo.hpp"
|
||||
#include "fxirpdynamicdispatchinfo.hpp"
|
||||
|
||||
#include "FxDpc.hpp"
|
||||
#include "FxWorkItem.hpp"
|
||||
#include "FxTimer.hpp"
|
||||
#include "FxInterruptKm.hpp"
|
||||
#include "fxdpc.hpp"
|
||||
#include "fxworkitem.hpp"
|
||||
#include "fxtimer.hpp"
|
||||
#include "fxinterruptkm.hpp"
|
||||
|
||||
// IO targets (device lower edge interface)
|
||||
#include "FxIoTarget.hpp"
|
||||
#include "FxIoTargetRemote.hpp"
|
||||
#include "FxIoTargetSelf.hpp"
|
||||
#include "fxiotarget.hpp"
|
||||
#include "fxiotargetremote.hpp"
|
||||
#include "fxiotargetself.hpp"
|
||||
|
||||
#include "FxUsbDevice.hpp"
|
||||
#include "FxUsbInterface.hpp"
|
||||
#include "FxUsbPipe.hpp"
|
||||
#include "fxusbdevice.hpp"
|
||||
#include "fxusbinterface.hpp"
|
||||
#include "fxusbpipe.hpp"
|
||||
|
||||
// DMA support
|
||||
#include "FxDmaEnabler.hpp"
|
||||
#include "FxDmaTransaction.hpp"
|
||||
#include "FxCommonBuffer.hpp"
|
||||
#include "fxdmaenabler.hpp"
|
||||
#include "fxdmatransaction.hpp"
|
||||
#include "fxcommonbuffer.hpp"
|
||||
|
||||
// Triage info.
|
||||
#include "wdftriage.h"
|
||||
// #include "wdftriage.h"
|
||||
|
||||
#include "FxTelemetry.hpp"
|
||||
#include "fxtelemetry.hpp"
|
||||
#endif // _FX_H
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
#define _FXDMATRANSACTION_HPP_
|
||||
|
||||
extern "C" {
|
||||
#include "FxDmaTransaction.hpp.tmh"
|
||||
// #include "FxDmaTransaction.hpp.tmh"
|
||||
}
|
||||
|
||||
#include "FxDmaTransactionCallbacks.hpp"
|
||||
#include "fxdmatransactioncallbacks.hpp"
|
||||
|
||||
//
|
||||
// This type is used to allocate scatter-gather list of 1 element on the stack.
|
||||
//
|
||||
typedef __declspec(align(MEMORY_ALLOCATION_ALIGNMENT))UCHAR UCHAR_MEMORY_ALIGNED;
|
||||
typedef DECLSPEC_ALIGN(MEMORY_ALLOCATION_ALIGNMENT) UCHAR UCHAR_MEMORY_ALIGNED;
|
||||
|
||||
// begin_wpp enum
|
||||
|
||||
|
@ -912,6 +912,7 @@ protected:
|
|||
protected:
|
||||
|
||||
inline
|
||||
void
|
||||
SetMapRegisterBase(
|
||||
__in PVOID Value
|
||||
)
|
||||
|
@ -924,6 +925,7 @@ protected:
|
|||
}
|
||||
|
||||
inline
|
||||
void
|
||||
ClearMapRegisterBase(
|
||||
VOID
|
||||
)
|
||||
|
@ -934,6 +936,7 @@ protected:
|
|||
}
|
||||
|
||||
inline
|
||||
BOOLEAN
|
||||
IsMapRegisterBaseSet(
|
||||
VOID
|
||||
)
|
||||
|
@ -1005,6 +1008,7 @@ protected:
|
|||
|
||||
static
|
||||
IO_ALLOCATION_ACTION
|
||||
STDCALL
|
||||
_AdapterControl(
|
||||
__in PDEVICE_OBJECT DeviceObject,
|
||||
__in PIRP Irp,
|
||||
|
@ -1528,7 +1532,7 @@ protected:
|
|||
VOID
|
||||
)
|
||||
{
|
||||
__super::Reuse();
|
||||
FxDmaPacketTransaction::Reuse(); // __super call
|
||||
m_ConfigureChannelFunction.Method = NULL;
|
||||
m_ConfigureChannelContext = NULL;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -7,12 +7,10 @@
|
|||
//
|
||||
|
||||
extern "C" {
|
||||
#pragma warning(disable:4200) // zero-sized array in struct/union
|
||||
#include <usbdrivr.h>
|
||||
#pragma warning(default:4200)
|
||||
|
||||
#include <wdfusb.h>
|
||||
#include <wdfminiport.h>
|
||||
#include "FxDynamics.h"
|
||||
#include "VfFxDynamics.h"
|
||||
#include "fxdynamics.h"
|
||||
#include "vffxdynamics.h"
|
||||
}
|
||||
|
|
|
@ -35,4 +35,4 @@ FxProbeAndLockWithAccess(
|
|||
|
||||
}
|
||||
|
||||
#endif __FXPROBEANDLOCK_H__
|
||||
#endif // __FXPROBEANDLOCK_H__
|
||||
|
|
|
@ -20,12 +20,12 @@ Revision History:
|
|||
|
||||
|
||||
#include "fxcorepch.hpp"
|
||||
#include "FxIFR.h"
|
||||
#include "fxIFRKm.h" // kernel mode only IFR definitions
|
||||
#include "FxLdr.h"
|
||||
#include "FxBugcheck.h"
|
||||
#include "fxifr.h"
|
||||
#include "fxifrkm.h" // kernel mode only IFR definitions
|
||||
#include "fxldr.h"
|
||||
#include "fxbugcheck.h"
|
||||
|
||||
#include <aux_klib.h>
|
||||
// #include <aux_klib.h>
|
||||
|
||||
//
|
||||
// Disable warnings of features used by the standard headers
|
||||
|
@ -35,9 +35,9 @@ Revision History:
|
|||
// Disable warning C4201: nonstandard extension used : nameless struct/union
|
||||
// Disable warning C4214: nonstandard extension used : bit field types other than int
|
||||
//
|
||||
#pragma warning(disable:4115 4200 4201 4214)
|
||||
// #pragma warning(disable:4115 4200 4201 4214)
|
||||
#include <ntimage.h>
|
||||
#pragma warning(default:4115 4200 4201 4214)
|
||||
// #pragma warning(default:4115 4200 4201 4214)
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
@ -125,102 +125,104 @@ FxpGetImageBase(
|
|||
__out PULONG ImageSize
|
||||
)
|
||||
{
|
||||
NTSTATUS status = STATUS_UNSUCCESSFUL;
|
||||
ULONG modulesSize = 0;
|
||||
AUX_MODULE_EXTENDED_INFO* modules = NULL;
|
||||
AUX_MODULE_EXTENDED_INFO* module;
|
||||
PVOID addressInImage = NULL;
|
||||
ULONG numberOfModules;
|
||||
ULONG i;
|
||||
// NTSTATUS status = STATUS_UNSUCCESSFUL;
|
||||
// ULONG modulesSize = 0;
|
||||
// AUX_MODULE_EXTENDED_INFO* modules = NULL;
|
||||
// AUX_MODULE_EXTENDED_INFO* module;
|
||||
// PVOID addressInImage = NULL;
|
||||
// ULONG numberOfModules;
|
||||
// ULONG i;
|
||||
|
||||
//
|
||||
// Basic validation.
|
||||
//
|
||||
if (NULL == DriverObject || NULL == ImageBase || NULL == ImageSize) {
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto exit;
|
||||
}
|
||||
// //
|
||||
// // Basic validation.
|
||||
// //
|
||||
// if (NULL == DriverObject || NULL == ImageBase || NULL == ImageSize) {
|
||||
// status = STATUS_INVALID_PARAMETER;
|
||||
// goto exit;
|
||||
// }
|
||||
|
||||
//
|
||||
// Get the address of a well known entry in the Image.
|
||||
//
|
||||
addressInImage = (PVOID) DriverObject->DriverStart;
|
||||
ASSERT(addressInImage != NULL);
|
||||
// //
|
||||
// // Get the address of a well known entry in the Image.
|
||||
// //
|
||||
// addressInImage = (PVOID) DriverObject->DriverStart;
|
||||
// ASSERT(addressInImage != NULL);
|
||||
|
||||
//
|
||||
// Initialize the AUX Kernel Library.
|
||||
//
|
||||
status = AuxKlibInitialize();
|
||||
if (!NT_SUCCESS(status)) {
|
||||
goto exit;
|
||||
}
|
||||
// //
|
||||
// // Initialize the AUX Kernel Library.
|
||||
// //
|
||||
// status = AuxKlibInitialize();
|
||||
// if (!NT_SUCCESS(status)) {
|
||||
// goto exit;
|
||||
// }
|
||||
|
||||
//
|
||||
// Get size of area needed for loaded modules.
|
||||
//
|
||||
status = AuxKlibQueryModuleInformation(&modulesSize,
|
||||
sizeof(AUX_MODULE_EXTENDED_INFO),
|
||||
NULL);
|
||||
// //
|
||||
// // Get size of area needed for loaded modules.
|
||||
// //
|
||||
// status = AuxKlibQueryModuleInformation(&modulesSize,
|
||||
// sizeof(AUX_MODULE_EXTENDED_INFO),
|
||||
// NULL);
|
||||
|
||||
if (!NT_SUCCESS(status) || (0 == modulesSize)) {
|
||||
goto exit;
|
||||
}
|
||||
// if (!NT_SUCCESS(status) || (0 == modulesSize)) {
|
||||
// goto exit;
|
||||
// }
|
||||
|
||||
numberOfModules = modulesSize / sizeof(AUX_MODULE_EXTENDED_INFO);
|
||||
// numberOfModules = modulesSize / sizeof(AUX_MODULE_EXTENDED_INFO);
|
||||
|
||||
//
|
||||
// Allocate returned-sized memory for the modules area.
|
||||
//
|
||||
modules = (AUX_MODULE_EXTENDED_INFO*) ExAllocatePoolWithTag(PagedPool,
|
||||
modulesSize,
|
||||
'30LW');
|
||||
if (NULL == modules) {
|
||||
status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
goto exit;
|
||||
}
|
||||
// //
|
||||
// // Allocate returned-sized memory for the modules area.
|
||||
// //
|
||||
// modules = (AUX_MODULE_EXTENDED_INFO*) ExAllocatePoolWithTag(PagedPool,
|
||||
// modulesSize,
|
||||
// '30LW');
|
||||
// if (NULL == modules) {
|
||||
// status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
// goto exit;
|
||||
// }
|
||||
|
||||
//
|
||||
// Request the modules array be filled with module information.
|
||||
//
|
||||
status = AuxKlibQueryModuleInformation(&modulesSize,
|
||||
sizeof(AUX_MODULE_EXTENDED_INFO),
|
||||
modules);
|
||||
// //
|
||||
// // Request the modules array be filled with module information.
|
||||
// //
|
||||
// status = AuxKlibQueryModuleInformation(&modulesSize,
|
||||
// sizeof(AUX_MODULE_EXTENDED_INFO),
|
||||
// modules);
|
||||
|
||||
if (!NT_SUCCESS(status)) {
|
||||
goto exit;
|
||||
}
|
||||
// if (!NT_SUCCESS(status)) {
|
||||
// goto exit;
|
||||
// }
|
||||
|
||||
//
|
||||
// Traverse list, searching for the well known address in Image for which the
|
||||
// module's Image Base Address is in its range.
|
||||
//
|
||||
module = modules;
|
||||
// //
|
||||
// // Traverse list, searching for the well known address in Image for which the
|
||||
// // module's Image Base Address is in its range.
|
||||
// //
|
||||
// module = modules;
|
||||
|
||||
for (i=0; i < numberOfModules; i++) {
|
||||
// for (i=0; i < numberOfModules; i++) {
|
||||
|
||||
if (addressInImage >= module->BasicInfo.ImageBase &&
|
||||
addressInImage < WDF_PTR_ADD_OFFSET(module->BasicInfo.ImageBase,
|
||||
module->ImageSize)) {
|
||||
// if (addressInImage >= module->BasicInfo.ImageBase &&
|
||||
// addressInImage < WDF_PTR_ADD_OFFSET(module->BasicInfo.ImageBase,
|
||||
// module->ImageSize)) {
|
||||
|
||||
*ImageBase = module->BasicInfo.ImageBase;
|
||||
*ImageSize = module->ImageSize;
|
||||
// *ImageBase = module->BasicInfo.ImageBase;
|
||||
// *ImageSize = module->ImageSize;
|
||||
|
||||
status = STATUS_SUCCESS;
|
||||
goto exit;
|
||||
}
|
||||
module++;
|
||||
}
|
||||
// status = STATUS_SUCCESS;
|
||||
// goto exit;
|
||||
// }
|
||||
// module++;
|
||||
// }
|
||||
|
||||
status = STATUS_NOT_FOUND;
|
||||
// status = STATUS_NOT_FOUND;
|
||||
|
||||
exit:
|
||||
// exit:
|
||||
|
||||
if (modules != NULL) {
|
||||
ExFreePool(modules);
|
||||
modules = NULL;
|
||||
}
|
||||
// if (modules != NULL) {
|
||||
// ExFreePool(modules);
|
||||
// modules = NULL;
|
||||
// }
|
||||
|
||||
return status;
|
||||
// return status;
|
||||
ROSWDFNOTIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
_Must_inspect_result_
|
||||
|
@ -246,77 +248,65 @@ Return Value:
|
|||
|
||||
--*/
|
||||
{
|
||||
PVOID codeAddr = NULL;
|
||||
BOOLEAN found = FALSE;
|
||||
KBUGCHECK_DATA bugCheckData = {0};
|
||||
// PVOID codeAddr = NULL;
|
||||
// BOOLEAN found = FALSE;
|
||||
// KBUGCHECK_DATA bugCheckData = {0};
|
||||
|
||||
if (FxDriverGlobals->FxForceLogsInMiniDump) {
|
||||
return TRUE;
|
||||
}
|
||||
// if (FxDriverGlobals->FxForceLogsInMiniDump) {
|
||||
// return TRUE;
|
||||
// }
|
||||
|
||||
//
|
||||
// Retrieve the bugcheck parameters.
|
||||
//
|
||||
bugCheckData.BugCheckDataSize = sizeof(KBUGCHECK_DATA);
|
||||
AuxKlibGetBugCheckData(&bugCheckData);
|
||||
// //
|
||||
// // Retrieve the bugcheck parameters.
|
||||
// //
|
||||
// bugCheckData.BugCheckDataSize = sizeof(KBUGCHECK_DATA);
|
||||
// AuxKlibGetBugCheckData(&bugCheckData);
|
||||
|
||||
//
|
||||
// Check whether the code address that caused the bugcheck is from this wdf
|
||||
// driver.
|
||||
//
|
||||
switch (bugCheckData.BugCheckCode) {
|
||||
// //
|
||||
// // Check whether the code address that caused the bugcheck is from this wdf
|
||||
// // driver.
|
||||
// //
|
||||
// switch (bugCheckData.BugCheckCode) {
|
||||
|
||||
case KERNEL_APC_PENDING_DURING_EXIT: // 0x20
|
||||
codeAddr = (PVOID)bugCheckData.Parameter1;
|
||||
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
break;
|
||||
// case KERNEL_APC_PENDING_DURING_EXIT: // 0x20
|
||||
// codeAddr = (PVOID)bugCheckData.Parameter1;
|
||||
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
// break;
|
||||
|
||||
case KMODE_EXCEPTION_NOT_HANDLED: // 0x1E
|
||||
case SYSTEM_THREAD_EXCEPTION_NOT_HANDLED: // 0x7E
|
||||
case KERNEL_MODE_EXCEPTION_NOT_HANDLED: // 0x8E
|
||||
codeAddr = (PVOID)bugCheckData.Parameter2;
|
||||
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
break;
|
||||
// case KMODE_EXCEPTION_NOT_HANDLED: // 0x1E
|
||||
// case SYSTEM_THREAD_EXCEPTION_NOT_HANDLED: // 0x7E
|
||||
// case KERNEL_MODE_EXCEPTION_NOT_HANDLED: // 0x8E
|
||||
// codeAddr = (PVOID)bugCheckData.Parameter2;
|
||||
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
// break;
|
||||
|
||||
case PAGE_FAULT_IN_NONPAGED_AREA: // 0x50
|
||||
codeAddr = (PVOID)bugCheckData.Parameter3;
|
||||
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
break;
|
||||
// case PAGE_FAULT_IN_NONPAGED_AREA: // 0x50
|
||||
// codeAddr = (PVOID)bugCheckData.Parameter3;
|
||||
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
// break;
|
||||
|
||||
case IRQL_NOT_LESS_OR_EQUAL: // 0xA
|
||||
case DRIVER_IRQL_NOT_LESS_OR_EQUAL: // 0xD1
|
||||
codeAddr = (PVOID)bugCheckData.Parameter4;
|
||||
found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
break;
|
||||
}
|
||||
// case IRQL_NOT_LESS_OR_EQUAL: // 0xA
|
||||
// case DRIVER_IRQL_NOT_LESS_OR_EQUAL: // 0xD1
|
||||
// codeAddr = (PVOID)bugCheckData.Parameter4;
|
||||
// found = FxpIsAddressKnownToWdf(codeAddr, FxDriverGlobals);
|
||||
// break;
|
||||
// }
|
||||
|
||||
//
|
||||
// If the code address was found in the wdf driver, then set the flag in the
|
||||
// driver globals to indicate that the IFR data has to be written to the
|
||||
// mini-dump.
|
||||
//
|
||||
if (found) {
|
||||
FxDriverGlobals->FxForceLogsInMiniDump = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return found;
|
||||
// //
|
||||
// // If the code address was found in the wdf driver, then set the flag in the
|
||||
// // driver globals to indicate that the IFR data has to be written to the
|
||||
// // mini-dump.
|
||||
// //
|
||||
// if (found) {
|
||||
// FxDriverGlobals->FxForceLogsInMiniDump = TRUE;
|
||||
// }
|
||||
// return found;
|
||||
ROSWDFNOTIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
FxpBugCheckCallback(
|
||||
__in KBUGCHECK_CALLBACK_REASON Reason,
|
||||
__in PKBUGCHECK_REASON_CALLBACK_RECORD Record,
|
||||
|
@ -567,6 +557,7 @@ Done:;
|
|||
}
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
FxpLibraryBugCheckCallback(
|
||||
__in KBUGCHECK_CALLBACK_REASON Reason,
|
||||
__in PKBUGCHECK_REASON_CALLBACK_RECORD /* Record */,
|
||||
|
@ -1043,7 +1034,7 @@ FX_DRIVER_TRACKER_CACHE_AWARE::Register(
|
|||
//
|
||||
// Intialize the procgrp down level library.
|
||||
//
|
||||
WdmlibProcgrpInitialize();
|
||||
// WdmlibProcgrpInitialize(); __REACTOS__ : haha we don't support ProcGrp
|
||||
|
||||
//
|
||||
// Capture maximum number of processors.
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include "fxcorepch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxChildList.tmh"
|
||||
// #include "FxChildList.tmh"
|
||||
}
|
||||
|
||||
FxDeviceDescriptionEntry::FxDeviceDescriptionEntry(
|
||||
|
@ -1145,9 +1145,6 @@ FxChildList::GetNextStaticDevice(
|
|||
for (ple = m_ModificationListHead.Flink;
|
||||
ple != &m_ModificationListHead;
|
||||
ple = ple->Flink) {
|
||||
BOOLEAN check;
|
||||
|
||||
check = FALSE;
|
||||
|
||||
pEntry = FxDeviceDescriptionEntry::_FromModificationLink(ple);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include "fxcorepch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxChildListAPI.tmh"
|
||||
// #include "FxChildListAPI.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -36,6 +36,7 @@ extern "C" {
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(PASSIVE_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListCreate)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -125,6 +126,7 @@ WDFEXPORT(WdfChildListCreate)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFDEVICE
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListGetDevice)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -150,6 +152,7 @@ WDFEXPORT(WdfChildListGetDevice)(
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListRetrieveAddressDescription)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -226,6 +229,7 @@ WDFEXPORT(WdfChildListRetrieveAddressDescription)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListBeginScan)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -250,6 +254,7 @@ WDFEXPORT(WdfChildListBeginScan)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListEndScan)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -274,6 +279,7 @@ WDFEXPORT(WdfChildListEndScan)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListBeginIteration)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -323,6 +329,7 @@ WDFEXPORT(WdfChildListBeginIteration)(
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListRetrieveNextDevice)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -425,6 +432,7 @@ WDFEXPORT(WdfChildListRetrieveNextDevice)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListEndIteration)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -473,6 +481,7 @@ WDFEXPORT(WdfChildListEndIteration)(
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListAddOrUpdateChildDescriptionAsPresent)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -561,6 +570,7 @@ WDFEXPORT(WdfChildListAddOrUpdateChildDescriptionAsPresent)(
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListUpdateChildDescriptionAsMissing)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -609,6 +619,7 @@ WDFEXPORT(WdfChildListUpdateChildDescriptionAsMissing)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListUpdateAllChildDescriptionsAsPresent)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -637,6 +648,7 @@ WDFEXPORT(WdfChildListUpdateAllChildDescriptionsAsPresent)(
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFDEVICE
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListRetrievePdo)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -734,6 +746,7 @@ WDFEXPORT(WdfChildListRetrievePdo)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
WDFEXPORT(WdfChildListRequestChildEject)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include "fxcorepch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxDeviceFdoApi.tmh"
|
||||
// #include "FxDeviceFdoApi.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -36,6 +36,7 @@ extern "C" {
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfFdoAddStaticChild)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -121,6 +122,7 @@ Return Value:
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfFdoLockStaticChildListForIteration)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -179,6 +181,7 @@ Return Value:
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFDEVICE
|
||||
STDCALL
|
||||
WDFEXPORT(WdfFdoRetrieveNextStaticChild)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -256,6 +259,7 @@ Return Value:
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfFdoUnlockStaticChildListFromIteration)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -311,6 +315,7 @@ Return Value:
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(PASSIVE_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfFdoQueryForInterface)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -405,6 +410,7 @@ Return Value:
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFCHILDLIST
|
||||
STDCALL
|
||||
WDFEXPORT(WdfFdoGetDefaultChildList)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include "fxcorepch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxDevicePdoApi.tmh"
|
||||
// #include "FxDevicePdoApi.tmh"
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
|
@ -87,6 +87,7 @@ extern "C" {
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoMarkMissing)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -101,7 +102,7 @@ WDFEXPORT(WdfPdoMarkMissing)(
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals,
|
||||
&pDevice);
|
||||
|
@ -120,6 +121,7 @@ WDFEXPORT(WdfPdoMarkMissing)(
|
|||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFAPI
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoRequestEject)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -134,7 +136,7 @@ WDFEXPORT(WdfPdoRequestEject)(
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals,
|
||||
&pDevice);
|
||||
|
@ -163,6 +165,7 @@ WDFEXPORT(WdfPdoRequestEject)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFDEVICE
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoGetParent)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -177,7 +180,7 @@ WDFEXPORT(WdfPdoGetParent)(
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals,
|
||||
&pDevice);
|
||||
|
@ -197,6 +200,7 @@ _Must_inspect_result_
|
|||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFAPI
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoRetrieveIdentificationDescription)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -212,7 +216,7 @@ WDFEXPORT(WdfPdoRetrieveIdentificationDescription)(
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals);
|
||||
|
||||
|
@ -251,6 +255,7 @@ _Must_inspect_result_
|
|||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFAPI
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoRetrieveAddressDescription)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -266,7 +271,7 @@ WDFEXPORT(WdfPdoRetrieveAddressDescription)(
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals);
|
||||
|
||||
|
@ -307,6 +312,7 @@ _Must_inspect_result_
|
|||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
WDFAPI
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoUpdateAddressDescription)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -322,7 +328,7 @@ WDFEXPORT(WdfPdoUpdateAddressDescription)(
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals);
|
||||
|
||||
|
@ -354,6 +360,7 @@ WDFEXPORT(WdfPdoUpdateAddressDescription)(
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoAddEjectionRelationsPhysicalDevice)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -386,7 +393,7 @@ Return Value:
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals);
|
||||
|
||||
|
@ -403,6 +410,7 @@ Return Value:
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoRemoveEjectionRelationsPhysicalDevice)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -434,7 +442,7 @@ Return Value:
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals);
|
||||
|
||||
|
@ -449,6 +457,7 @@ Return Value:
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
VOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfPdoClearEjectionRelationsDevices)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -476,7 +485,7 @@ Return Value:
|
|||
|
||||
status = GetPdoPackageFromDeviceHandle(GetFxDriverGlobals(DriverGlobals),
|
||||
Device,
|
||||
__FUNCTION__,
|
||||
(PCHAR)__FUNCTION__,
|
||||
&pPkgPdo,
|
||||
&pFxDriverGlobals);
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@ Revision History:
|
|||
|
||||
#include "fxcorepch.hpp"
|
||||
|
||||
#include "FxDpc.hpp"
|
||||
#include "fxdpc.hpp"
|
||||
|
||||
// Tracing support
|
||||
extern "C" {
|
||||
#include "FxDpc.tmh"
|
||||
// #include "FxDpc.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -25,10 +25,10 @@ Revision History:
|
|||
|
||||
#include "fxcorepch.hpp"
|
||||
|
||||
#include "FxDpc.hpp"
|
||||
#include "fxdpc.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxDpcApi.tmh"
|
||||
// #include "FxDpcApi.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -39,6 +39,7 @@ extern "C" {
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfDpcCreate)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -129,6 +130,7 @@ Notes:
|
|||
|
||||
__drv_maxIRQL(HIGH_LEVEL)
|
||||
KDPC*
|
||||
STDCALL
|
||||
WDFEXPORT(WdfDpcWdmGetDpc)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -166,6 +168,7 @@ Returns:
|
|||
|
||||
__drv_maxIRQL(HIGH_LEVEL)
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
WDFEXPORT(WdfDpcEnqueue)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -202,6 +205,7 @@ Returns:
|
|||
__drv_when(Wait == __true, __drv_maxIRQL(PASSIVE_LEVEL))
|
||||
__drv_when(Wait == __false, __drv_maxIRQL(HIGH_LEVEL))
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
WDFEXPORT(WdfDpcCancel)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -254,6 +258,7 @@ Returns:
|
|||
|
||||
__drv_maxIRQL(HIGH_LEVEL)
|
||||
WDFOBJECT
|
||||
STDCALL
|
||||
WDFEXPORT(WdfDpcGetParentObject)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
|
|
@ -27,7 +27,7 @@ Revision History:
|
|||
#include "fxcorepch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxSystemThread.tmh"
|
||||
// #include "FxSystemThread.tmh"
|
||||
}
|
||||
|
||||
|
||||
|
@ -151,7 +151,7 @@ FxSystemThread::CreateThread(
|
|||
//
|
||||
// The thread itself will release this reference in its exit routine
|
||||
//
|
||||
ADDREF(FxSystemThread::StaticThreadThunk);
|
||||
ADDREF((PVOID)FxSystemThread::StaticThreadThunk);
|
||||
|
||||
status = PsCreateSystemThread(
|
||||
&threadHandle,
|
||||
|
@ -171,7 +171,7 @@ FxSystemThread::CreateThread(
|
|||
//
|
||||
// Release the reference taken above due to failure
|
||||
//
|
||||
RELEASE(FxSystemThread::StaticThreadThunk);
|
||||
RELEASE((PVOID)FxSystemThread::StaticThreadThunk);
|
||||
}
|
||||
else {
|
||||
status = ObReferenceObjectByHandle(
|
||||
|
@ -347,7 +347,7 @@ FxSystemThread::ExitThreadAsync(
|
|||
m_Exit = TRUE;
|
||||
|
||||
// Add a reference which will be released by the reaper
|
||||
ADDREF(FxSystemThread::StaticReaperThunk);
|
||||
ADDREF((PVOID)FxSystemThread::StaticReaperThunk);
|
||||
|
||||
Unlock(irql);
|
||||
|
||||
|
@ -524,7 +524,7 @@ FxSystemThread::Thread()
|
|||
Unlock(irql);
|
||||
|
||||
// Release the object reference held by the thread
|
||||
RELEASE(FxSystemThread::StaticThreadThunk);
|
||||
RELEASE((PVOID)FxSystemThread::StaticThreadThunk);
|
||||
|
||||
status = PsTerminateSystemThread(STATUS_SUCCESS);
|
||||
UNREFERENCED_PARAMETER(status);
|
||||
|
@ -635,7 +635,7 @@ FxSystemThread::Reaper()
|
|||
|
||||
ObDereferenceObject(m_ThreadPtr);
|
||||
|
||||
RELEASE(FxSystemThread::StaticReaperThunk);
|
||||
RELEASE((PVOID)FxSystemThread::StaticReaperThunk);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -30,12 +30,12 @@ Revision History:
|
|||
|
||||
// We use DoTraceMessage
|
||||
extern "C" {
|
||||
#include "tracing.tmh"
|
||||
// #include "tracing.tmh"
|
||||
}
|
||||
|
||||
#include <initguid.h>
|
||||
#include "fxIFR.h" // shared struct between IFR and debug ext.
|
||||
#include "fxIFRKm.h" // kernel mode only IFR definitions
|
||||
#include "fxifr.h" // shared struct between IFR and debug ext.
|
||||
#include "fxifrkm.h" // kernel mode only IFR definitions
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -21,10 +21,10 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxDmaPCH.hpp"
|
||||
#include "fxdmapch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxCommonBuffer.tmh"
|
||||
// #include "FxCommonBuffer.tmh"
|
||||
}
|
||||
|
||||
FxCommonBuffer::FxCommonBuffer(
|
||||
|
|
|
@ -21,10 +21,10 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxDmaPCH.hpp"
|
||||
#include "fxdmapch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxCommonBufferAPI.tmh"
|
||||
// #include "FxCommonBufferAPI.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -35,6 +35,7 @@ extern "C" {
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(PASSIVE_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfCommonBufferCreate)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -134,6 +135,7 @@ WDFEXPORT(WdfCommonBufferCreate)(
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(PASSIVE_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfCommonBufferCreateWithConfig)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -245,6 +247,7 @@ WDFEXPORT(WdfCommonBufferCreateWithConfig)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
PVOID
|
||||
STDCALL
|
||||
WDFEXPORT(WdfCommonBufferGetAlignedVirtualAddress)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -264,6 +267,7 @@ WDFEXPORT(WdfCommonBufferGetAlignedVirtualAddress)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
PHYSICAL_ADDRESS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfCommonBufferGetAlignedLogicalAddress)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
@ -283,6 +287,7 @@ WDFEXPORT(WdfCommonBufferGetAlignedLogicalAddress)(
|
|||
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
size_t
|
||||
STDCALL
|
||||
WDFEXPORT(WdfCommonBufferGetLength)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
|
|
@ -21,10 +21,10 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxDmaPCH.hpp"
|
||||
#include "fxdmapch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxDmaEnabler.tmh"
|
||||
// #include "FxDmaEnabler.tmh"
|
||||
}
|
||||
|
||||
FxDmaEnabler::FxDmaEnabler(
|
||||
|
|
|
@ -21,10 +21,10 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxDmaPCH.hpp"
|
||||
#include "fxdmapch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxDmaEnablerAPI.tmh"
|
||||
// #include "FxDmaEnablerAPI.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
extern "C" {
|
||||
#include <ntddk.h>
|
||||
}
|
||||
#include <Fx.hpp>
|
||||
#include <fx.hpp>
|
||||
|
|
|
@ -21,10 +21,10 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxDmaPCH.hpp"
|
||||
#include "fxdmapch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxDmaTransaction.tmh"
|
||||
// #include "FxDmaTransaction.tmh"
|
||||
}
|
||||
|
||||
FxDmaTransactionBase::FxDmaTransactionBase(
|
||||
|
@ -842,7 +842,7 @@ FxDmaScatterGatherTransaction::Dispose(
|
|||
{
|
||||
BOOLEAN ret;
|
||||
|
||||
ret = __super::Dispose();
|
||||
ret = FxDmaTransactionBase::Dispose(); // __super call
|
||||
|
||||
//
|
||||
// Free Lookaside Buffer which held SGList
|
||||
|
|
|
@ -21,10 +21,10 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxDmaPCH.hpp"
|
||||
#include "fxdmapch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxDmaTransactionAPI.tmh"
|
||||
// #include "FxDmaTransactionAPI.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -44,7 +44,7 @@ extern "C" {
|
|||
// available in public symbols. Various WDFKD debug commands use these
|
||||
// internal structures to provide information about WDF.
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "FxIFR.h"
|
||||
#include "fxifr.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
@ -78,9 +78,9 @@ union {
|
|||
|
||||
extern "C" {
|
||||
|
||||
#include "FxDynamics.h"
|
||||
#include "fxdynamics.h"
|
||||
|
||||
#include "FxLibraryCommon.h"
|
||||
#include "fxlibrarycommon.h"
|
||||
|
||||
#define KMDF_DEFAULT_NAME "Wdf" ## \
|
||||
LITERAL(__WDF_MAJOR_VERSION_STRING) ## \
|
||||
|
|
|
@ -27,11 +27,11 @@ Revision History:
|
|||
|
||||
#include "fxobjectpch.hpp"
|
||||
|
||||
#include "FxMemoryBufferPreallocated.hpp"
|
||||
#include "FxUserObject.hpp"
|
||||
#include "FxUsbDevice.hpp"
|
||||
#include "FxUsbPipe.hpp"
|
||||
#include "FxUsbInterface.hpp"
|
||||
#include "fxmemorybufferpreallocated.hpp"
|
||||
#include "fxuserobject.hpp"
|
||||
#include "fxusbdevice.hpp"
|
||||
#include "fxusbpipe.hpp"
|
||||
#include "fxusbinterface.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ Revision History:
|
|||
// Extern "C" the tmh file and all external APIs
|
||||
//
|
||||
extern "C" {
|
||||
#include "FxWmiAPI.tmh"
|
||||
#include "fxwmiapi.tmh"
|
||||
|
||||
_Must_inspect_result_
|
||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#include "fxwmipch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxWmiInstance.tmh"
|
||||
// #include "FxWmiInstance.tmh"
|
||||
}
|
||||
|
||||
FxWmiInstance::FxWmiInstance(
|
||||
|
@ -56,7 +56,7 @@ FxWmiInstance::Dispose(
|
|||
// of instances. If we don't do this, the provider will have a list which
|
||||
// contains entries which have been freed.
|
||||
//
|
||||
return __super::Dispose();
|
||||
return FxNonPagedObject::Dispose(); // __super call
|
||||
}
|
||||
|
||||
_Must_inspect_result_
|
||||
|
|
|
@ -25,7 +25,7 @@ Revision History:
|
|||
#include "fxwmipch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxWmiIrpHandler.tmh"
|
||||
// #include "FxWmiIrpHandler.tmh"
|
||||
}
|
||||
|
||||
#ifndef WppDebug
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#include "fxwmipch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxWmiProvider.tmh"
|
||||
// #include "FxWmiProvider.tmh"
|
||||
}
|
||||
|
||||
FxWmiProvider::FxWmiProvider(
|
||||
|
@ -80,7 +80,7 @@ FxWmiProvider::Dispose(
|
|||
//
|
||||
m_Parent->RemoveProvider(this);
|
||||
|
||||
return __super::Dispose();
|
||||
return FxNonPagedObject::Dispose(); // __super call
|
||||
}
|
||||
|
||||
_Must_inspect_result_
|
||||
|
|
|
@ -19,9 +19,9 @@ extern "C" {
|
|||
|
||||
#include "fx.hpp"
|
||||
#include "fxldr.h"
|
||||
#include "FxLibraryCommon.h"
|
||||
#include "FxTelemetry.hpp"
|
||||
#include "WdfVersionLog.h"
|
||||
#include "fxlibrarycommon.h"
|
||||
#include "fxtelemetry.hpp"
|
||||
#include "wdfversionlog.h"
|
||||
#include "minwindef.h"
|
||||
|
||||
extern "C" {
|
||||
|
|
|
@ -22,10 +22,10 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxSupportPch.hpp"
|
||||
#include "fxsupportpch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxQueryInterface.tmh"
|
||||
// #include "FxQueryInterface.tmh"
|
||||
}
|
||||
|
||||
FxQueryInterface::FxQueryInterface(
|
||||
|
|
|
@ -22,10 +22,10 @@ Environment:
|
|||
Revision History:
|
||||
|
||||
--*/
|
||||
#include "FxSupportPch.hpp"
|
||||
#include "fxsupportpch.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "FxQueryInterfaceAPI.tmh"
|
||||
// #include "FxQueryInterfaceAPI.tmh"
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -35,6 +35,7 @@ extern "C" {
|
|||
_Must_inspect_result_
|
||||
__drv_maxIRQL(PASSIVE_LEVEL)
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
WDFEXPORT(WdfDeviceAddQueryInterface)(
|
||||
__in
|
||||
PWDF_DRIVER_GLOBALS DriverGlobals,
|
||||
|
|
|
@ -23,7 +23,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxSupportPch.hpp"
|
||||
#include "fxsupportpch.hpp"
|
||||
|
||||
FxRelatedDevice::FxRelatedDevice(
|
||||
__in PDEVICE_OBJECT DeviceObject,
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
|
||||
--*/
|
||||
|
||||
#include "FxSupportPch.hpp"
|
||||
#include "fxsupportpch.hpp"
|
||||
|
||||
_Must_inspect_result_
|
||||
NTSTATUS
|
||||
|
@ -111,7 +111,7 @@ FxRelatedDeviceList::ProcessAdd(
|
|||
}
|
||||
|
||||
pEntry = NULL;
|
||||
while ((pEntry = __super::GetNextEntryLocked(pEntry)) != NULL) {
|
||||
while ((pEntry = FxSpinLockTransactionedList::GetNextEntryLocked(pEntry)) != NULL) { // __super call
|
||||
pInList = CONTAINING_RECORD(pEntry, FxRelatedDevice, m_TransactionedEntry);
|
||||
|
||||
if (pInList->m_DeviceObject == pNew->m_DeviceObject) {
|
||||
|
|
|
@ -30,6 +30,7 @@ Revision History:
|
|||
//
|
||||
|
||||
#include <ntddk.h>
|
||||
#include <pseh/pseh2.h> // __REACTOS__
|
||||
|
||||
NTSTATUS
|
||||
FxProbeAndLockForRead(
|
||||
|
@ -37,11 +38,15 @@ FxProbeAndLockForRead(
|
|||
__in KPROCESSOR_MODE AccessMode
|
||||
)
|
||||
{
|
||||
try {
|
||||
_SEH2_TRY
|
||||
{
|
||||
MmProbeAndLockPages(Mdl, AccessMode, IoReadAccess);
|
||||
} except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
return GetExceptionCode();
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
_SEH2_YIELD(return _SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -52,11 +57,16 @@ FxProbeAndLockForWrite(
|
|||
__in KPROCESSOR_MODE AccessMode
|
||||
)
|
||||
{
|
||||
try {
|
||||
_SEH2_TRY
|
||||
{
|
||||
MmProbeAndLockPages(Mdl, AccessMode, IoWriteAccess);
|
||||
} except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
return GetExceptionCode();
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
_SEH2_YIELD(return _SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -67,13 +77,15 @@ FxProbeAndLockWithAccess(
|
|||
__in LOCK_OPERATION Operation
|
||||
)
|
||||
{
|
||||
try {
|
||||
_SEH2_TRY
|
||||
{
|
||||
MmProbeAndLockPages(Mdl, AccessMode, Operation);
|
||||
} except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
return GetExceptionCode();
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
_SEH2_YIELD(return _SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue