mirror of
https://github.com/reactos/reactos.git
synced 2025-01-11 14:13:58 +08:00
[CLASSPNP]
* Explicitly mark the functions as stdcall (NTAPI).. -mrtd changes the default calling convention, but name-decoration isn't affected by this. The -mrtd feature has its origin in some older linux-code-mode, and it's considered for removal in GCC 4.8. * Fix some warnings. svn path=/trunk/; revision=56973
This commit is contained in:
parent
614db35f56
commit
79df779077
@ -38,9 +38,7 @@ if(ARCH MATCHES i386)
|
||||
#add_target_compile_flags(classpnp "/Gz")
|
||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/Gz")
|
||||
else()
|
||||
|
||||
#add_target_compile_flags(classpnp "-mrtd -fno-builtin -w")
|
||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-mrtd -fno-builtin -w")
|
||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-w")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -55,24 +55,28 @@ GUID StoragePredictFailureEventGuid = WMI_STORAGE_PREDICT_FAILURE_EVENT_GUID;
|
||||
(! fdoExtension->PowerDownInProgress) )
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ClasspIsMediaChangeDisabledDueToHardwareLimitation(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PUNICODE_STRING RegistryPath
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMediaChangeDeviceInstanceOverride(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
OUT PBOOLEAN Enabled
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ClasspIsMediaChangeDisabledForClass(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PUNICODE_STRING RegistryPath
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspSetMediaChangeStateEx(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN MEDIA_CHANGE_DETECTION_STATE NewState,
|
||||
@ -81,6 +85,7 @@ ClasspSetMediaChangeStateEx(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMediaChangeRegistryCallBack(
|
||||
IN PWSTR ValueName,
|
||||
IN ULONG ValueType,
|
||||
@ -91,6 +96,7 @@ ClasspMediaChangeRegistryCallBack(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspSendMediaStateIrp(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PMEDIA_CHANGE_DETECTION_INFO Info,
|
||||
@ -98,12 +104,14 @@ ClasspSendMediaStateIrp(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspFailurePredict(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PFAILURE_PREDICTION_INFO Info
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspInitializePolling(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN BOOLEAN AllowDriveToSleep
|
||||
@ -131,6 +139,7 @@ ClasspInitializePolling(
|
||||
|
||||
// ISSUE -- make this public?
|
||||
VOID
|
||||
NTAPI
|
||||
ClassSendEjectionNotification(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -163,8 +172,8 @@ ClassSendEjectionNotification(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspSendNotification(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN const GUID * Guid,
|
||||
@ -220,9 +229,6 @@ ClasspSendNotification(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspInterpretGesnData()
|
||||
@ -280,6 +286,7 @@ Notes:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspInterpretGesnData(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PNOTIFICATION_EVENT_STATUS_HEADER Header,
|
||||
@ -555,7 +562,7 @@ ClasspInterpretGesnData(
|
||||
} // end switch on notification class
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspInternalSetMediaChangeState()
|
||||
@ -584,6 +591,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspInternalSetMediaChangeState(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN MEDIA_CHANGE_DETECTION_STATE NewState,
|
||||
@ -596,7 +604,7 @@ ClasspInternalSetMediaChangeState(
|
||||
MEDIA_CHANGE_DETECTION_STATE oldMediaState;
|
||||
PMEDIA_CHANGE_DETECTION_INFO info = FdoExtension->MediaChangeDetectionInfo;
|
||||
ULONG data;
|
||||
NTSTATUS status;
|
||||
//NTSTATUS status;
|
||||
|
||||
ASSERT((NewState >= MediaUnknown) && (NewState <= MediaNotPresent));
|
||||
|
||||
@ -676,7 +684,7 @@ ClasspInternalSetMediaChangeState(
|
||||
|
||||
return;
|
||||
} // end ClasspInternalSetMediaChangeState()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSetMediaChangeState()
|
||||
@ -708,6 +716,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspSetMediaChangeStateEx(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN MEDIA_CHANGE_DETECTION_STATE NewState,
|
||||
@ -769,7 +778,9 @@ ClasspSetMediaChangeStateEx(
|
||||
|
||||
return;
|
||||
} // end ClassSetMediaChangeStateEx()
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClassSetMediaChangeState(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN MEDIA_CHANGE_DETECTION_STATE NewState,
|
||||
@ -779,7 +790,7 @@ ClassSetMediaChangeState(
|
||||
ClasspSetMediaChangeStateEx(FdoExtension, NewState, Wait, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspMediaChangeDetectionCompletion()
|
||||
@ -803,6 +814,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMediaChangeDetectionCompletion(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -812,7 +824,7 @@ ClasspMediaChangeDetectionCompletion(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData;
|
||||
PMEDIA_CHANGE_DETECTION_INFO info;
|
||||
PIO_STACK_LOCATION nextIrpStack;
|
||||
//PIO_STACK_LOCATION nextIrpStack;
|
||||
NTSTATUS status;
|
||||
BOOLEAN retryImmediately = FALSE;
|
||||
|
||||
@ -1004,7 +1016,7 @@ ClasspMediaChangeDetectionCompletion(
|
||||
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspSendTestUnitIrp() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -1023,6 +1035,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
PIRP
|
||||
NTAPI
|
||||
ClasspPrepareMcnIrp(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PMEDIA_CHANGE_DETECTION_INFO Info,
|
||||
@ -1183,7 +1196,7 @@ ClasspPrepareMcnIrp(
|
||||
return irp;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspSendMediaStateIrp() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -1201,6 +1214,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspSendMediaStateIrp(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PMEDIA_CHANGE_DETECTION_INFO Info,
|
||||
@ -1209,8 +1223,8 @@ ClasspSendMediaStateIrp(
|
||||
{
|
||||
BOOLEAN requestPending = FALSE;
|
||||
LONG irpInUse;
|
||||
LARGE_INTEGER zero;
|
||||
NTSTATUS status;
|
||||
//LARGE_INTEGER zero;
|
||||
//NTSTATUS status;
|
||||
|
||||
DBGTRACE(ClassDebugMCN, ("> ClasspSendMediaStateIrp"));
|
||||
|
||||
@ -1368,7 +1382,7 @@ ClasspSendMediaStateIrp(
|
||||
|
||||
return;
|
||||
} // end ClasspSendMediaStateIrp()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassCheckMediaState()
|
||||
@ -1389,6 +1403,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassCheckMediaState(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -1421,7 +1436,7 @@ ClassCheckMediaState(
|
||||
|
||||
return;
|
||||
} // end ClassCheckMediaState()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassResetMediaChangeTimer()
|
||||
@ -1440,6 +1455,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassResetMediaChangeTimer(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -1452,7 +1468,7 @@ ClassResetMediaChangeTimer(
|
||||
}
|
||||
return;
|
||||
} // end ClassResetMediaChangeTimer()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspInitializePolling() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -1470,15 +1486,16 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspInitializePolling(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN BOOLEAN AllowDriveToSleep
|
||||
)
|
||||
{
|
||||
PDEVICE_OBJECT fdo = FdoExtension->DeviceObject;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = FdoExtension->PrivateFdoData;
|
||||
//PCLASS_PRIVATE_FDO_DATA fdoData = FdoExtension->PrivateFdoData;
|
||||
|
||||
ULONG size;
|
||||
//ULONG size;
|
||||
PMEDIA_CHANGE_DETECTION_INFO info;
|
||||
PIRP irp;
|
||||
|
||||
@ -1519,7 +1536,7 @@ ClasspInitializePolling(
|
||||
if (buffer != NULL) {
|
||||
PIO_STACK_LOCATION irpStack;
|
||||
PSCSI_REQUEST_BLOCK srb;
|
||||
PCDB cdb;
|
||||
//PCDB cdb;
|
||||
|
||||
srb = &(info->MediaChangeSrb);
|
||||
info->MediaChangeIrp = irp;
|
||||
@ -1648,8 +1665,9 @@ ClasspInitializePolling(
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
} // end ClasspInitializePolling()
|
||||
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspInitializeGesn(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PMEDIA_CHANGE_DETECTION_INFO Info
|
||||
@ -2004,6 +2022,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassInitializeTestUnitPolling(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN BOOLEAN AllowDriveToSleep
|
||||
@ -2011,7 +2030,7 @@ ClassInitializeTestUnitPolling(
|
||||
{
|
||||
return ClasspInitializePolling(FdoExtension, AllowDriveToSleep);
|
||||
} // end ClassInitializeTestUnitPolling()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassInitializeMediaChangeDetection()
|
||||
@ -2038,6 +2057,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassInitializeMediaChangeDetection(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PUCHAR EventPrefix
|
||||
@ -2120,7 +2140,7 @@ ClassInitializeMediaChangeDetection(
|
||||
|
||||
return;
|
||||
} // end ClassInitializeMediaChangeDetection()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspMediaChangeDeviceInstanceOverride()
|
||||
@ -2144,6 +2164,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMediaChangeDeviceInstanceOverride(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
OUT PBOOLEAN Enabled
|
||||
@ -2289,7 +2310,7 @@ ClasspMediaChangeDeviceInstanceOverride(
|
||||
return status;
|
||||
|
||||
} // end ClasspMediaChangeDeviceInstanceOverride()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspIsMediaChangeDisabledDueToHardwareLimitation()
|
||||
@ -2315,6 +2336,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ClasspIsMediaChangeDisabledDueToHardwareLimitation(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PUNICODE_STRING RegistryPath
|
||||
@ -2519,7 +2541,7 @@ ClasspIsMediaChangeDisabledDueToHardwareLimitation(
|
||||
return FALSE;
|
||||
|
||||
} // end ClasspIsMediaChangeDisabledDueToHardwareLimitation()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspIsMediaChangeDisabledForClass()
|
||||
@ -2546,12 +2568,13 @@ Return Value:
|
||||
|
||||
--*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ClasspIsMediaChangeDisabledForClass(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PUNICODE_STRING RegistryPath
|
||||
)
|
||||
{
|
||||
PSTORAGE_DEVICE_DESCRIPTOR deviceDescriptor = FdoExtension->DeviceDescriptor;
|
||||
//PSTORAGE_DEVICE_DESCRIPTOR deviceDescriptor = FdoExtension->DeviceDescriptor;
|
||||
|
||||
OBJECT_ATTRIBUTES objectAttributes;
|
||||
HANDLE serviceKey = NULL;
|
||||
@ -2559,8 +2582,8 @@ ClasspIsMediaChangeDisabledForClass(
|
||||
RTL_QUERY_REGISTRY_TABLE parameters[3];
|
||||
|
||||
UNICODE_STRING paramStr;
|
||||
UNICODE_STRING deviceUnicodeString;
|
||||
ANSI_STRING deviceString;
|
||||
//UNICODE_STRING deviceUnicodeString;
|
||||
//ANSI_STRING deviceString;
|
||||
|
||||
//
|
||||
// Default to ENABLING MediaChangeNotification (!)
|
||||
@ -2675,7 +2698,7 @@ ClasspIsMediaChangeDisabledForClass(
|
||||
|
||||
return (BOOLEAN)(!mcnRegistryValue);
|
||||
} // end ClasspIsMediaChangeDisabledForClass()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassEnableMediaChangeDetection() ISSUE-2000/02/20-henrygab - why public?
|
||||
@ -2694,6 +2717,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassEnableMediaChangeDetection(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -2757,7 +2781,7 @@ ClassEnableMediaChangeDetection(
|
||||
|
||||
return;
|
||||
} // end ClassEnableMediaChangeDetection()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassDisableMediaChangeDetection() ISSUE-2000/02/20-henrygab - why public?
|
||||
@ -2778,6 +2802,7 @@ Return Value:
|
||||
ULONG BreakOnMcnDisable = FALSE;
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClassDisableMediaChangeDetection(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -2806,7 +2831,7 @@ ClassDisableMediaChangeDetection(
|
||||
|
||||
return;
|
||||
} // end ClassDisableMediaChangeDetection()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassCleanupMediaChangeDetection() ISSUE-2000/02/20-henrygab - why public?!
|
||||
@ -2823,6 +2848,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassCleanupMediaChangeDetection(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -2845,7 +2871,7 @@ ClassCleanupMediaChangeDetection(
|
||||
ExFreePool(info);
|
||||
return;
|
||||
} // end ClassCleanupMediaChangeDetection()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspMcnControl() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -2863,6 +2889,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMcnControl(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PIRP Irp,
|
||||
@ -2942,7 +2969,7 @@ ClasspMcnControl(
|
||||
}
|
||||
return status;
|
||||
} // end ClasspMcnControl(
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspMediaChangeRegistryCallBack()
|
||||
@ -2970,6 +2997,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMediaChangeRegistryCallBack(
|
||||
IN PWSTR ValueName,
|
||||
IN ULONG ValueType,
|
||||
@ -3039,7 +3067,7 @@ ClasspMediaChangeRegistryCallBack(
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
} // end ClasspMediaChangeRegistryCallBack()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspTimerTick() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -3057,6 +3085,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspTimerTick(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PVOID Context
|
||||
@ -3105,7 +3134,7 @@ ClasspTimerTick(
|
||||
if ((info != NULL) && (info->Method != FailurePredictionNone)) {
|
||||
|
||||
ULONG countDown;
|
||||
ULONG active;
|
||||
//ULONG active;
|
||||
|
||||
if (ClasspCanSendPollingIrp(fdoExtension)) {
|
||||
|
||||
@ -3186,7 +3215,7 @@ ClasspTimerTick(
|
||||
|
||||
ClassReleaseRemoveLock(DeviceObject, (PIRP)ClasspTimerTick);
|
||||
} // end ClasspTimerTick()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspEnableTimer() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -3204,6 +3233,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspEnableTimer(
|
||||
PDEVICE_OBJECT DeviceObject
|
||||
)
|
||||
@ -3236,7 +3266,7 @@ ClasspEnableTimer(
|
||||
return status;
|
||||
|
||||
} // end ClasspEnableTimer()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspDisableTimer() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -3254,15 +3284,16 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspDisableTimer(
|
||||
PDEVICE_OBJECT DeviceObject
|
||||
)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
|
||||
PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
|
||||
PMEDIA_CHANGE_DETECTION_INFO mCDInfo = fdoExtension->MediaChangeDetectionInfo;
|
||||
PFAILURE_PREDICTION_INFO fPInfo = fdoExtension->FailurePredictionInfo;
|
||||
NTSTATUS status;
|
||||
//PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
|
||||
//PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
|
||||
//PMEDIA_CHANGE_DETECTION_INFO mCDInfo = fdoExtension->MediaChangeDetectionInfo;
|
||||
//PFAILURE_PREDICTION_INFO fPInfo = fdoExtension->FailurePredictionInfo;
|
||||
//NTSTATUS status;
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
@ -3289,7 +3320,7 @@ ClasspDisableTimer(
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
} // end ClasspDisableTimer()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspFailurePredict() - ISSUE-2000/02/20-henrygab - not documented
|
||||
@ -3309,6 +3340,7 @@ Note: this function can be called (via the workitem callback) after the paging
|
||||
so it must be PAGE LOCKED.
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspFailurePredict(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PFAILURE_PREDICTION_INFO Info
|
||||
@ -3421,7 +3453,7 @@ ClasspFailurePredict(
|
||||
IoFreeWorkItem(workItem);
|
||||
return;
|
||||
} // end ClasspFailurePredict()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassNotifyFailurePredicted() ISSUE-alanwar-2000/02/20 - not documented
|
||||
@ -3434,6 +3466,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassNotifyFailurePredicted(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
PUCHAR Buffer,
|
||||
@ -3492,7 +3525,7 @@ ClassNotifyFailurePredicted(
|
||||
}
|
||||
}
|
||||
} // end ClassNotifyFailurePredicted()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSetFailurePredictionPoll()
|
||||
@ -3517,6 +3550,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSetFailurePredictionPoll(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
FAILURE_PREDICTION_METHOD FailurePredictionMethod,
|
||||
@ -3525,7 +3559,7 @@ ClassSetFailurePredictionPoll(
|
||||
{
|
||||
PFAILURE_PREDICTION_INFO info;
|
||||
NTSTATUS status;
|
||||
DEVICE_POWER_STATE powerState;
|
||||
//DEVICE_POWER_STATE powerState;
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
@ -3608,4 +3642,3 @@ ClassSetFailurePredictionPoll(
|
||||
|
||||
return status;
|
||||
} // end ClassSetFailurePredictionPoll()
|
||||
|
||||
|
@ -92,9 +92,6 @@ DriverEntry(
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassInitialize()
|
||||
@ -116,6 +113,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
ULONG
|
||||
NTAPI
|
||||
ClassInitialize(
|
||||
IN PVOID Argument1,
|
||||
IN PVOID Argument2,
|
||||
@ -328,7 +326,7 @@ ClassInitialize(
|
||||
status = STATUS_SUCCESS;
|
||||
return status;
|
||||
} // end ClassInitialize()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassInitializeEx()
|
||||
@ -362,6 +360,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
ULONG
|
||||
NTAPI
|
||||
ClassInitializeEx(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN LPGUID Guid,
|
||||
@ -402,7 +401,7 @@ ClassInitializeEx(
|
||||
return(status);
|
||||
|
||||
} // end ClassInitializeEx()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassUnload()
|
||||
@ -420,6 +419,7 @@ Status:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassUnload(
|
||||
IN PDRIVER_OBJECT DriverObject
|
||||
)
|
||||
@ -459,7 +459,7 @@ ClassUnload(
|
||||
|
||||
return;
|
||||
} // end ClassUnload()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassAddDevice()
|
||||
@ -484,6 +484,7 @@ Status: STATUS_NO_SUCH_DEVICE if the class driver did not want this device
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassAddDevice(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PDEVICE_OBJECT PhysicalDeviceObject
|
||||
@ -502,7 +503,7 @@ ClassAddDevice(
|
||||
PhysicalDeviceObject);
|
||||
return status;
|
||||
} // end ClassAddDevice()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassDispatchPnp()
|
||||
@ -524,6 +525,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassDispatchPnp(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -1240,7 +1242,7 @@ ClassDispatchPnp(
|
||||
|
||||
return status;
|
||||
} // end ClassDispatchPnp()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassPnpStartDevice()
|
||||
@ -1261,7 +1263,7 @@ Return Value:
|
||||
none
|
||||
|
||||
--*/
|
||||
NTSTATUS ClassPnpStartDevice(IN PDEVICE_OBJECT DeviceObject)
|
||||
NTSTATUS NTAPI ClassPnpStartDevice(IN PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
PCLASS_DRIVER_EXTENSION driverExtension;
|
||||
PCLASS_INIT_DATA initData;
|
||||
@ -1273,7 +1275,7 @@ NTSTATUS ClassPnpStartDevice(IN PDEVICE_OBJECT DeviceObject)
|
||||
BOOLEAN isFdo = commonExtension->IsFdo;
|
||||
|
||||
BOOLEAN isMountedDevice = TRUE;
|
||||
UNICODE_STRING interfaceName;
|
||||
//UNICODE_STRING interfaceName;
|
||||
|
||||
BOOLEAN timerStarted;
|
||||
|
||||
@ -1570,12 +1572,12 @@ Return Value:
|
||||
NT Status
|
||||
|
||||
--*/
|
||||
NTSTATUS ClassReadWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
|
||||
NTSTATUS NTAPI ClassReadWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
|
||||
{
|
||||
PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
|
||||
PDEVICE_OBJECT lowerDeviceObject = commonExtension->LowerDeviceObject;
|
||||
PIO_STACK_LOCATION currentIrpStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
LARGE_INTEGER startingOffset = currentIrpStack->Parameters.Read.ByteOffset;
|
||||
//LARGE_INTEGER startingOffset = currentIrpStack->Parameters.Read.ByteOffset;
|
||||
ULONG transferByteCount = currentIrpStack->Parameters.Read.Length;
|
||||
ULONG isRemoved;
|
||||
NTSTATUS status;
|
||||
@ -1725,7 +1727,7 @@ Return Value:
|
||||
Status is returned.
|
||||
|
||||
--*/
|
||||
NTSTATUS ClassReadDriveCapacity(IN PDEVICE_OBJECT Fdo)
|
||||
NTSTATUS NTAPI ClassReadDriveCapacity(IN PDEVICE_OBJECT Fdo)
|
||||
{
|
||||
READ_CAPACITY_DATA readCapacityBuffer = {0};
|
||||
NTSTATUS status;
|
||||
@ -1738,7 +1740,7 @@ NTSTATUS ClassReadDriveCapacity(IN PDEVICE_OBJECT Fdo)
|
||||
if (pkt){
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
KEVENT event;
|
||||
NTSTATUS pktStatus;
|
||||
//NTSTATUS pktStatus;
|
||||
IRP pseudoIrp = {0};
|
||||
|
||||
/*
|
||||
@ -2009,6 +2011,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassSendStartUnit(
|
||||
IN PDEVICE_OBJECT Fdo
|
||||
)
|
||||
@ -2135,7 +2138,7 @@ ClassSendStartUnit(
|
||||
return;
|
||||
|
||||
} // end StartUnit()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassAsynchronousCompletion() ISSUE-2000/02/18-henrygab - why public?!
|
||||
@ -2162,6 +2165,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassAsynchronousCompletion(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -2239,15 +2243,13 @@ ClassAsynchronousCompletion(
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
|
||||
} // end ClassAsynchronousCompletion()
|
||||
|
||||
|
||||
|
||||
VOID ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp)
|
||||
VOID NTAPI ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp)
|
||||
{
|
||||
PCOMMON_DEVICE_EXTENSION commonExt = Fdo->DeviceExtension;
|
||||
//PCOMMON_DEVICE_EXTENSION commonExt = Fdo->DeviceExtension;
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
PSTORAGE_ADAPTER_DESCRIPTOR adapterDesc = commonExt->PartitionZeroExtension->AdapterDescriptor;
|
||||
//PSTORAGE_ADAPTER_DESCRIPTOR adapterDesc = commonExt->PartitionZeroExtension->AdapterDescriptor;
|
||||
PIO_STACK_LOCATION currentSp = IoGetCurrentIrpStackLocation(Irp);
|
||||
ULONG entireXferLen = currentSp->Parameters.Read.Length;
|
||||
PUCHAR bufPtr = MmGetMdlVirtualAddress(Irp->MdlAddress);
|
||||
@ -2256,7 +2258,7 @@ VOID ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp)
|
||||
SINGLE_LIST_ENTRY pktList;
|
||||
PSINGLE_LIST_ENTRY slistEntry;
|
||||
ULONG numPackets;
|
||||
KIRQL oldIrql;
|
||||
//KIRQL oldIrql;
|
||||
ULONG i;
|
||||
|
||||
/*
|
||||
@ -2397,7 +2399,6 @@ VOID ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassIoComplete()
|
||||
@ -2428,6 +2429,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassIoComplete(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp,
|
||||
@ -2611,7 +2613,6 @@ ClassIoComplete(
|
||||
|
||||
} // end ClassIoComplete()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSendSrbSynchronous()
|
||||
@ -2644,6 +2645,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSendSrbSynchronous(
|
||||
PDEVICE_OBJECT Fdo,
|
||||
PSCSI_REQUEST_BLOCK Srb,
|
||||
@ -2960,7 +2962,6 @@ retry:
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassInterpretSenseInfo()
|
||||
@ -2990,6 +2991,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ClassInterpretSenseInfo(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PSCSI_REQUEST_BLOCK Srb,
|
||||
@ -3443,7 +3445,7 @@ ClassInterpretSenseInfo(
|
||||
|
||||
case SCSI_SENSE_UNIT_ATTENTION: {
|
||||
|
||||
PVPB vpb;
|
||||
//PVPB vpb;
|
||||
ULONG count;
|
||||
|
||||
//
|
||||
@ -4095,8 +4097,6 @@ ClassInterpretSenseInfo(
|
||||
|
||||
} // end ClassInterpretSenseInfo()
|
||||
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassModeSense()
|
||||
@ -4121,7 +4121,7 @@ Return Value:
|
||||
Length of the transferred data is returned.
|
||||
|
||||
--*/
|
||||
ULONG ClassModeSense( IN PDEVICE_OBJECT Fdo,
|
||||
ULONG NTAPI ClassModeSense( IN PDEVICE_OBJECT Fdo,
|
||||
IN PCHAR ModeSenseBuffer,
|
||||
IN ULONG Length,
|
||||
IN UCHAR PageMode)
|
||||
@ -4137,7 +4137,7 @@ ULONG ClassModeSense( IN PDEVICE_OBJECT Fdo,
|
||||
TRANSFER_PACKET *pkt = DequeueFreeTransferPacket(Fdo, TRUE);
|
||||
if (pkt){
|
||||
KEVENT event;
|
||||
NTSTATUS pktStatus;
|
||||
//NTSTATUS pktStatus;
|
||||
IRP pseudoIrp = {0};
|
||||
|
||||
/*
|
||||
@ -4182,7 +4182,6 @@ ULONG ClassModeSense( IN PDEVICE_OBJECT Fdo,
|
||||
return lengthTransferred;
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassFindModePage()
|
||||
@ -4208,6 +4207,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
PVOID
|
||||
NTAPI
|
||||
ClassFindModePage(
|
||||
IN PCHAR ModeSenseBuffer,
|
||||
IN ULONG Length,
|
||||
@ -4279,7 +4279,7 @@ ClassFindModePage(
|
||||
|
||||
return result;
|
||||
} // end ClassFindModePage()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSendSrbAsynchronous()
|
||||
@ -4319,6 +4319,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSendSrbAsynchronous(
|
||||
PDEVICE_OBJECT Fdo,
|
||||
PSCSI_REQUEST_BLOCK Srb,
|
||||
@ -4506,7 +4507,7 @@ ClassSendSrbAsynchronous(
|
||||
return STATUS_PENDING;
|
||||
|
||||
} // end ClassSendSrbAsynchronous()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassDeviceControlDispatch()
|
||||
@ -4529,6 +4530,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassDeviceControlDispatch(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp
|
||||
@ -4559,7 +4561,6 @@ ClassDeviceControlDispatch(
|
||||
return commonExtension->DevInfo->ClassDeviceControl(DeviceObject,Irp);
|
||||
} // end ClassDeviceControlDispatch()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassDeviceControl()
|
||||
@ -4587,6 +4588,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassDeviceControl(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp
|
||||
@ -4613,7 +4615,7 @@ ClassDeviceControl(
|
||||
if ((controlCode == IOCTL_SCSI_PASS_THROUGH) ||
|
||||
(controlCode == IOCTL_SCSI_PASS_THROUGH_DIRECT)) {
|
||||
|
||||
PSCSI_PASS_THROUGH scsiPass;
|
||||
//PSCSI_PASS_THROUGH scsiPass;
|
||||
|
||||
//
|
||||
// Validiate the user buffer.
|
||||
@ -5585,7 +5587,7 @@ SetStatusAndReturn:
|
||||
|
||||
return status;
|
||||
} // end ClassDeviceControl()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassShutdownFlush()
|
||||
@ -5609,6 +5611,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassShutdownFlush(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -5618,7 +5621,7 @@ ClassShutdownFlush(
|
||||
|
||||
ULONG isRemoved;
|
||||
|
||||
NTSTATUS status;
|
||||
//NTSTATUS status;
|
||||
|
||||
isRemoved = ClassAcquireRemoveLock(DeviceObject, Irp);
|
||||
|
||||
@ -5653,7 +5656,7 @@ ClassShutdownFlush(
|
||||
|
||||
return STATUS_INVALID_DEVICE_REQUEST;
|
||||
} // end ClassShutdownFlush()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassCreateDeviceObject()
|
||||
@ -5682,6 +5685,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassCreateDeviceObject(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PCCHAR ObjectNameBuffer,
|
||||
@ -5693,7 +5697,7 @@ ClassCreateDeviceObject(
|
||||
BOOLEAN isPartitionable;
|
||||
STRING ntNameString;
|
||||
UNICODE_STRING ntUnicodeString;
|
||||
NTSTATUS status, status2;
|
||||
NTSTATUS status;
|
||||
PDEVICE_OBJECT deviceObject = NULL;
|
||||
|
||||
ULONG characteristics;
|
||||
@ -5956,7 +5960,7 @@ ClassCreateDeviceObject(
|
||||
|
||||
return status;
|
||||
} // end ClassCreateDeviceObject()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassClaimDevice()
|
||||
@ -5979,6 +5983,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassClaimDevice(
|
||||
IN PDEVICE_OBJECT LowerDeviceObject,
|
||||
IN BOOLEAN Release
|
||||
@ -6079,7 +6084,7 @@ ClassClaimDevice(
|
||||
|
||||
return status;
|
||||
} // end ClassClaimDevice()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassInternalIoControl()
|
||||
@ -6110,6 +6115,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassInternalIoControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -6161,7 +6167,7 @@ ClassInternalIoControl(
|
||||
|
||||
return IoCallDriver(commonExtension->LowerDeviceObject, Irp);
|
||||
} // end ClassInternalIoControl()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassQueryTimeOutRegistryValue()
|
||||
@ -6182,6 +6188,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
ULONG
|
||||
NTAPI
|
||||
ClassQueryTimeOutRegistryValue(
|
||||
IN PDEVICE_OBJECT DeviceObject
|
||||
)
|
||||
@ -6264,7 +6271,7 @@ ClassQueryTimeOutRegistryValue(
|
||||
return timeOut;
|
||||
|
||||
} // end ClassQueryTimeOutRegistryValue()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassCheckVerifyComplete() ISSUE-2000/02/18-henrygab - why public?!
|
||||
@ -6289,6 +6296,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassCheckVerifyComplete(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp,
|
||||
@ -6328,7 +6336,7 @@ ClassCheckVerifyComplete(
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
|
||||
} // end ClassCheckVerifyComplete()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassGetDescriptor()
|
||||
@ -6354,6 +6362,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassGetDescriptor(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PSTORAGE_PROPERTY_ID PropertyId,
|
||||
@ -6366,7 +6375,7 @@ ClassGetDescriptor(
|
||||
PSTORAGE_DESCRIPTOR_HEADER descriptor = NULL;
|
||||
ULONG length;
|
||||
|
||||
UCHAR pass = 0;
|
||||
//UCHAR pass = 0;
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
@ -6477,7 +6486,7 @@ ClassGetDescriptor(
|
||||
*Descriptor = descriptor;
|
||||
return ioStatus.Status;
|
||||
} // end ClassGetDescriptor()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSignalCompletion()
|
||||
@ -6503,6 +6512,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSignalCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -6513,7 +6523,7 @@ ClassSignalCompletion(
|
||||
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
} // end ClassSignalCompletion()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassPnpQueryFdoRelations()
|
||||
@ -6537,6 +6547,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassPnpQueryFdoRelations(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp
|
||||
@ -6569,7 +6580,7 @@ ClassPnpQueryFdoRelations(
|
||||
|
||||
return Irp->IoStatus.Status;
|
||||
} // end ClassPnpQueryFdoRelations()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassMarkChildrenMissing()
|
||||
@ -6590,6 +6601,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassMarkChildrenMissing(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo
|
||||
)
|
||||
@ -6615,7 +6627,7 @@ ClassMarkChildrenMissing(
|
||||
ClassReleaseChildLock(Fdo);
|
||||
return;
|
||||
} // end ClassMarkChildrenMissing()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassMarkChildMissing()
|
||||
@ -6642,6 +6654,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ClassMarkChildMissing(
|
||||
IN PPHYSICAL_DEVICE_EXTENSION Child,
|
||||
IN BOOLEAN AcquireChildLock
|
||||
@ -6668,7 +6681,7 @@ ClassMarkChildMissing(
|
||||
|
||||
return returnValue;
|
||||
} // end ClassMarkChildMissing()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassRetrieveDeviceRelations()
|
||||
@ -6693,6 +6706,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassRetrieveDeviceRelations(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN DEVICE_RELATION_TYPE RelationType,
|
||||
@ -6782,7 +6796,7 @@ ClassRetrieveDeviceRelations(
|
||||
ClassReleaseChildLock(fdoExtension);
|
||||
return STATUS_SUCCESS;
|
||||
} // end ClassRetrieveDeviceRelations()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassGetPdoId()
|
||||
@ -6807,6 +6821,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassGetPdoId(
|
||||
IN PDEVICE_OBJECT Pdo,
|
||||
IN BUS_QUERY_ID_TYPE IdType,
|
||||
@ -6824,7 +6839,7 @@ ClassGetPdoId(
|
||||
|
||||
return driverExtension->InitData.ClassQueryId( Pdo, IdType, IdString);
|
||||
} // end ClassGetPdoId()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassQueryPnpCapabilities()
|
||||
@ -6845,6 +6860,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassQueryPnpCapabilities(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PDEVICE_CAPABILITIES Capabilities
|
||||
@ -6874,7 +6890,7 @@ ClassQueryPnpCapabilities(
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
} // end ClassQueryPnpCapabilities()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassInvalidateBusRelations()
|
||||
@ -6896,6 +6912,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassInvalidateBusRelations(
|
||||
IN PDEVICE_OBJECT Fdo
|
||||
)
|
||||
@ -6927,7 +6944,7 @@ ClassInvalidateBusRelations(
|
||||
|
||||
return;
|
||||
} // end ClassInvalidateBusRelations()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassRemoveDevice() ISSUE-2000/02/18-henrygab - why public?!
|
||||
@ -6951,6 +6968,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassRemoveDevice(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN UCHAR RemoveType
|
||||
@ -7072,7 +7090,7 @@ ClassRemoveDevice(
|
||||
status = STATUS_SUCCESS;
|
||||
|
||||
if (commonExtension->IsFdo){
|
||||
PDEVICE_OBJECT pdo;
|
||||
//PDEVICE_OBJECT pdo;
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
|
||||
|
||||
ClasspDisableTimer(fdoExtension->DeviceObject);
|
||||
@ -7196,7 +7214,7 @@ ClassRemoveDevice(
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
} // end ClassRemoveDevice()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassGetDriverExtension()
|
||||
@ -7215,13 +7233,14 @@ Return Value:
|
||||
|
||||
--*/
|
||||
PCLASS_DRIVER_EXTENSION
|
||||
NTAPI
|
||||
ClassGetDriverExtension(
|
||||
IN PDRIVER_OBJECT DriverObject
|
||||
)
|
||||
{
|
||||
return IoGetDriverObjectExtension(DriverObject, CLASS_DRIVER_EXTENSION_KEY);
|
||||
} // end ClassGetDriverExtension()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspStartIo()
|
||||
@ -7240,6 +7259,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspStartIo(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -7270,7 +7290,7 @@ ClasspStartIo(
|
||||
|
||||
return;
|
||||
} // ClasspStartIo()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassUpdateInformationInRegistry()
|
||||
@ -7299,6 +7319,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassUpdateInformationInRegistry(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PCHAR DeviceName,
|
||||
@ -7477,7 +7498,7 @@ ClassUpdateInformationInRegistry(
|
||||
}
|
||||
|
||||
} // end ClassUpdateInformationInRegistry()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspSendSynchronousCompletion()
|
||||
@ -7501,6 +7522,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspSendSynchronousCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -7539,13 +7561,14 @@ ClasspSendSynchronousCompletion(
|
||||
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
} // end ClasspSendSynchronousCompletion()
|
||||
|
||||
|
||||
/*++
|
||||
|
||||
ISSUE-2000/02/20-henrygab Not documented ClasspRegisterMountedDeviceInterface
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspRegisterMountedDeviceInterface(
|
||||
IN PDEVICE_OBJECT DeviceObject
|
||||
)
|
||||
@ -7598,7 +7621,7 @@ ClasspRegisterMountedDeviceInterface(
|
||||
}
|
||||
return;
|
||||
} // end ClasspRegisterMountedDeviceInterface()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSendDeviceIoControlSynchronous()
|
||||
@ -7636,6 +7659,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassSendDeviceIoControlSynchronous(
|
||||
IN ULONG IoControlCode,
|
||||
IN PDEVICE_OBJECT TargetDeviceObject,
|
||||
@ -7874,7 +7898,7 @@ ClassSendDeviceIoControlSynchronous(
|
||||
|
||||
return;
|
||||
} // end ClassSendDeviceIoControlSynchronous()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassForwardIrpSynchronous()
|
||||
@ -7893,6 +7917,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassForwardIrpSynchronous(
|
||||
IN PCOMMON_DEVICE_EXTENSION CommonExtension,
|
||||
IN PIRP Irp
|
||||
@ -7901,7 +7926,7 @@ ClassForwardIrpSynchronous(
|
||||
IoCopyCurrentIrpStackLocationToNext(Irp);
|
||||
return ClassSendIrpSynchronous(CommonExtension->LowerDeviceObject, Irp);
|
||||
} // end ClassForwardIrpSynchronous()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSendIrpSynchronous()
|
||||
@ -7922,6 +7947,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSendIrpSynchronous(
|
||||
IN PDEVICE_OBJECT TargetDeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -7999,7 +8025,7 @@ ClassSendIrpSynchronous(
|
||||
|
||||
return status;
|
||||
} // end ClassSendIrpSynchronous()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassGetVpb()
|
||||
@ -8021,25 +8047,27 @@ Return Value:
|
||||
|
||||
--*/
|
||||
PVPB
|
||||
NTAPI
|
||||
ClassGetVpb(
|
||||
IN PDEVICE_OBJECT DeviceObject
|
||||
)
|
||||
{
|
||||
return DeviceObject->Vpb;
|
||||
} // end ClassGetVpb()
|
||||
|
||||
|
||||
/*++
|
||||
|
||||
ISSUE-2000/02/20-henrygab Not documented ClasspAllocateReleaseRequest
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspAllocateReleaseRequest(
|
||||
IN PDEVICE_OBJECT Fdo
|
||||
)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension;
|
||||
PIO_STACK_LOCATION irpStack;
|
||||
//PIO_STACK_LOCATION irpStack;
|
||||
|
||||
KeInitializeSpinLock(&(fdoExtension->ReleaseQueueSpinLock));
|
||||
|
||||
@ -8062,13 +8090,14 @@ ClasspAllocateReleaseRequest(
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
} // end ClasspAllocateReleaseRequest()
|
||||
|
||||
|
||||
/*++
|
||||
|
||||
ISSUE-2000/02/20-henrygab Not documented ClasspFreeReleaseRequest
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspFreeReleaseRequest(
|
||||
IN PDEVICE_OBJECT Fdo
|
||||
)
|
||||
@ -8105,7 +8134,7 @@ ClasspFreeReleaseRequest(
|
||||
|
||||
return;
|
||||
} // end ClasspFreeReleaseRequest()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassReleaseQueue()
|
||||
@ -8130,6 +8159,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassReleaseQueue(
|
||||
IN PDEVICE_OBJECT Fdo
|
||||
)
|
||||
@ -8137,7 +8167,7 @@ ClassReleaseQueue(
|
||||
ClasspReleaseQueue(Fdo, NULL);
|
||||
return;
|
||||
} // end ClassReleaseQueue()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspAllocateReleaseQueueIrp()
|
||||
@ -8162,11 +8192,12 @@ Notes:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspAllocateReleaseQueueIrp(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
{
|
||||
KIRQL oldIrql;
|
||||
//KIRQL oldIrql;
|
||||
UCHAR lowerStackSize;
|
||||
|
||||
//
|
||||
@ -8206,7 +8237,6 @@ ClasspAllocateReleaseQueueIrp(
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspReleaseQueue()
|
||||
@ -8238,6 +8268,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspReleaseQueue(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP ReleaseQueueIrp OPTIONAL
|
||||
@ -8353,7 +8384,7 @@ ClasspReleaseQueue(
|
||||
return;
|
||||
|
||||
} // end ClassReleaseQueue()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassReleaseQueueCompletion()
|
||||
@ -8380,6 +8411,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassReleaseQueueCompletion(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -8429,7 +8461,7 @@ ClassReleaseQueueCompletion(
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
|
||||
} // ClassAsynchronousCompletion()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassAcquireChildLock()
|
||||
@ -8450,6 +8482,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassAcquireChildLock(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -8472,7 +8505,7 @@ ClassAcquireChildLock(
|
||||
FdoExtension->ChildLockAcquisitionCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassReleaseChildLock() ISSUE-2000/02/18-henrygab - not documented
|
||||
@ -8492,6 +8525,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassReleaseChildLock(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -8508,7 +8542,7 @@ ClassReleaseChildLock(
|
||||
|
||||
return;
|
||||
} // end ClassReleaseChildLock(
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassAddChild()
|
||||
@ -8531,6 +8565,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassAddChild(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION Parent,
|
||||
IN PPHYSICAL_DEVICE_EXTENSION Child,
|
||||
@ -8565,7 +8600,7 @@ ClassAddChild(
|
||||
}
|
||||
return;
|
||||
} // end ClassAddChild()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassRemoveChild()
|
||||
@ -8592,6 +8627,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
PPHYSICAL_DEVICE_EXTENSION
|
||||
NTAPI
|
||||
ClassRemoveChild(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION Parent,
|
||||
IN PPHYSICAL_DEVICE_EXTENSION Child,
|
||||
@ -8659,13 +8695,13 @@ ClassRemoveChild(
|
||||
return Child;
|
||||
} // end ClassRemoveChild()
|
||||
|
||||
|
||||
/*++
|
||||
|
||||
ISSUE-2000/02/20-henrygab Not documented ClasspRetryRequestDpc
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspRetryRequestDpc(
|
||||
IN PKDPC Dpc,
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
@ -8735,13 +8771,14 @@ ClasspRetryRequestDpc(
|
||||
return;
|
||||
|
||||
} // end ClasspRetryRequestDpc()
|
||||
|
||||
|
||||
/*++
|
||||
|
||||
ISSUE-2000/02/20-henrygab Not documented ClassRetryRequest
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassRetryRequest(
|
||||
IN PDEVICE_OBJECT SelfDeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -8751,7 +8788,7 @@ ClassRetryRequest(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData;
|
||||
PCLASS_RETRY_INFO retryInfo;
|
||||
PCLASS_RETRY_INFO *previousNext;
|
||||
//PCLASS_RETRY_INFO *previousNext;
|
||||
LARGE_INTEGER delta;
|
||||
KIRQL irql;
|
||||
|
||||
@ -8867,13 +8904,14 @@ ClassRetryRequest(
|
||||
|
||||
|
||||
} // end ClassRetryRequest()
|
||||
|
||||
|
||||
/*++
|
||||
|
||||
ISSUE-2000/02/20-henrygab Not documented ClasspRetryDpcTimer
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspRetryDpcTimer(
|
||||
IN PCLASS_PRIVATE_FDO_DATA FdoData
|
||||
)
|
||||
@ -8922,8 +8960,9 @@ ClasspRetryDpcTimer(
|
||||
|
||||
return;
|
||||
} // end ClasspRetryDpcTimer()
|
||||
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspInitializeHotplugInfo(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -9040,8 +9079,9 @@ ClasspInitializeHotplugInfo(
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspScanForClassHacks(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN ULONG_PTR Data
|
||||
@ -9057,8 +9097,9 @@ ClasspScanForClassHacks(
|
||||
SET_FLAG(FdoExtension->PrivateFdoData->HackFlags, Data);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspScanForSpecialInRegistry(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -9177,7 +9218,3 @@ cleanupScanForSpecial:
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -509,34 +509,40 @@ static inline BOOLEAN SimpleIsSlistEmpty(SINGLE_LIST_ENTRY *SListHdr)
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
DriverEntry(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPath
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClassUnload(
|
||||
IN PDRIVER_OBJECT DriverObject
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassCreateClose(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspCreateClose(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspCleanupProtectedLocks(
|
||||
IN PFILE_OBJECT_EXTENSION FsContext
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspEjectionControl(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp,
|
||||
@ -545,47 +551,41 @@ ClasspEjectionControl(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassReadWrite(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassDeviceControlDispatch(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
ClassDeviceControl(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassDispatchPnp(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassPnpStartDevice(
|
||||
IN PDEVICE_OBJECT DeviceObject
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
ClassInternalIoControl (
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassShutdownFlush(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSystemControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -596,12 +596,14 @@ ClassSystemControl(
|
||||
//
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassAddDevice(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
IN OUT PDEVICE_OBJECT PhysicalDeviceObject
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspSendSynchronousCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -609,6 +611,7 @@ ClasspSendSynchronousCompletion(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RetryRequest(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -618,6 +621,7 @@ RetryRequest(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassIoCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -625,12 +629,14 @@ ClassIoCompletion(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassPnpQueryFdoRelations(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassRetrieveDeviceRelations(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN DEVICE_RELATION_TYPE RelationType,
|
||||
@ -638,6 +644,7 @@ ClassRetrieveDeviceRelations(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassGetPdoId(
|
||||
IN PDEVICE_OBJECT Pdo,
|
||||
IN BUS_QUERY_ID_TYPE IdType,
|
||||
@ -645,18 +652,21 @@ ClassGetPdoId(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassQueryPnpCapabilities(
|
||||
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
||||
IN PDEVICE_CAPABILITIES Capabilities
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspStartIo(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspPagingNotificationCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -664,6 +674,7 @@ ClasspPagingNotificationCompletion(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMediaChangeCompletion(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -671,12 +682,14 @@ ClasspMediaChangeCompletion(
|
||||
);
|
||||
|
||||
PFILE_OBJECT_EXTENSION
|
||||
NTAPI
|
||||
ClasspGetFsContext(
|
||||
IN PCOMMON_DEVICE_EXTENSION CommonExtension,
|
||||
IN PFILE_OBJECT FileObject
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspMcnControl(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PIRP Irp,
|
||||
@ -684,16 +697,19 @@ ClasspMcnControl(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspRegisterMountedDeviceInterface(
|
||||
IN PDEVICE_OBJECT DeviceObject
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspDisableTimer(
|
||||
PDEVICE_OBJECT DeviceObject
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspEnableTimer(
|
||||
PDEVICE_OBJECT DeviceObject
|
||||
);
|
||||
@ -703,16 +719,19 @@ ClasspEnableTimer(
|
||||
//
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
InitializeDictionary(
|
||||
IN PDICTIONARY Dictionary
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
TestDictionarySignature(
|
||||
IN PDICTIONARY Dictionary
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
AllocateDictionaryEntry(
|
||||
IN PDICTIONARY Dictionary,
|
||||
IN ULONGLONG Key,
|
||||
@ -722,12 +741,14 @@ AllocateDictionaryEntry(
|
||||
);
|
||||
|
||||
PVOID
|
||||
NTAPI
|
||||
GetDictionaryEntry(
|
||||
IN PDICTIONARY Dictionary,
|
||||
IN ULONGLONG Key
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
FreeDictionaryEntry(
|
||||
IN PDICTIONARY Dictionary,
|
||||
IN PVOID Entry
|
||||
@ -735,16 +756,19 @@ FreeDictionaryEntry(
|
||||
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspAllocateReleaseRequest(
|
||||
IN PDEVICE_OBJECT Fdo
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspFreeReleaseRequest(
|
||||
IN PDEVICE_OBJECT Fdo
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassReleaseQueueCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -752,12 +776,14 @@ ClassReleaseQueueCompletion(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspReleaseQueue(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP ReleaseQueueIrp
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspDisablePowerNotification(
|
||||
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
@ -767,12 +793,14 @@ ClasspDisablePowerNotification(
|
||||
//
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassDispatchPower(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassMinimalPowerHandler(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -783,6 +811,7 @@ ClassMinimalPowerHandler(
|
||||
//
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClassAddChild(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION Parent,
|
||||
IN PPHYSICAL_DEVICE_EXTENSION Child,
|
||||
@ -790,6 +819,7 @@ ClassAddChild(
|
||||
);
|
||||
|
||||
PPHYSICAL_DEVICE_EXTENSION
|
||||
NTAPI
|
||||
ClassRemoveChild(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION Parent,
|
||||
IN PPHYSICAL_DEVICE_EXTENSION Child,
|
||||
@ -797,11 +827,13 @@ ClassRemoveChild(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspRetryDpcTimer(
|
||||
IN PCLASS_PRIVATE_FDO_DATA FdoData
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspRetryRequestDpc(
|
||||
IN PKDPC Dpc,
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
@ -810,12 +842,14 @@ ClasspRetryRequestDpc(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClassFreeOrReuseSrb(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClassRetryRequest(
|
||||
IN PDEVICE_OBJECT SelfDeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -823,6 +857,7 @@ ClassRetryRequest(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspBuildRequestEx(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION Fdo,
|
||||
IN PIRP Irp,
|
||||
@ -830,17 +865,20 @@ ClasspBuildRequestEx(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspAllocateReleaseQueueIrp(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspInitializeGesn(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PMEDIA_CHANGE_DETECTION_INFO Info
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspSendNotification(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN const GUID * Guid,
|
||||
@ -849,60 +887,60 @@ ClasspSendNotification(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClassSendEjectionNotification(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspScanForSpecialInRegistry(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspScanForClassHacks(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN ULONG_PTR Data
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspInitializeHotplugInfo(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspPerfIncrementErrorCount(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspPerfIncrementSuccessfulIo(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
);
|
||||
|
||||
|
||||
PTRANSFER_PACKET NewTransferPacket(PDEVICE_OBJECT Fdo);
|
||||
VOID DestroyTransferPacket(PTRANSFER_PACKET Pkt);
|
||||
VOID EnqueueFreeTransferPacket(PDEVICE_OBJECT Fdo, PTRANSFER_PACKET Pkt);
|
||||
PTRANSFER_PACKET DequeueFreeTransferPacket(PDEVICE_OBJECT Fdo, BOOLEAN AllocIfNeeded);
|
||||
VOID SetupReadWriteTransferPacket(PTRANSFER_PACKET pkt, PVOID Buf, ULONG Len, LARGE_INTEGER DiskLocation, PIRP OriginalIrp);
|
||||
VOID SubmitTransferPacket(PTRANSFER_PACKET Pkt);
|
||||
NTSTATUS TransferPktComplete(IN PDEVICE_OBJECT NullFdo, IN PIRP Irp, IN PVOID Context);
|
||||
VOID ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp);
|
||||
VOID TransferPacketRetryTimerDpc(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
|
||||
BOOLEAN InterpretTransferPacketError(PTRANSFER_PACKET Pkt);
|
||||
BOOLEAN RetryTransferPacket(PTRANSFER_PACKET Pkt);
|
||||
VOID EnqueueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData, PIRP Irp);
|
||||
PIRP DequeueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData);
|
||||
VOID InitLowMemRetry(PTRANSFER_PACKET Pkt, PVOID BufPtr, ULONG Len, LARGE_INTEGER TargetLocation);
|
||||
BOOLEAN StepLowMemRetry(PTRANSFER_PACKET Pkt);
|
||||
VOID SetupEjectionTransferPacket(TRANSFER_PACKET *Pkt, BOOLEAN PreventMediaRemoval, PKEVENT SyncEventPtr, PIRP OriginalIrp);
|
||||
VOID SetupModeSenseTransferPacket(TRANSFER_PACKET *Pkt, PKEVENT SyncEventPtr, PVOID ModeSenseBuffer, UCHAR ModeSenseBufferLen, UCHAR PageMode, PIRP OriginalIrp);
|
||||
VOID SetupDriveCapacityTransferPacket(TRANSFER_PACKET *Pkt, PVOID ReadCapacityBuffer, ULONG ReadCapacityBufferLen, PKEVENT SyncEventPtr, PIRP OriginalIrp);
|
||||
PMDL BuildDeviceInputMdl(PVOID Buffer, ULONG BufferLen);
|
||||
VOID FreeDeviceInputMdl(PMDL Mdl);
|
||||
NTSTATUS InitializeTransferPackets(PDEVICE_OBJECT Fdo);
|
||||
VOID DestroyAllTransferPackets(PDEVICE_OBJECT Fdo);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PTRANSFER_PACKET NTAPI NewTransferPacket(PDEVICE_OBJECT Fdo);
|
||||
VOID NTAPI DestroyTransferPacket(PTRANSFER_PACKET Pkt);
|
||||
VOID NTAPI EnqueueFreeTransferPacket(PDEVICE_OBJECT Fdo, PTRANSFER_PACKET Pkt);
|
||||
PTRANSFER_PACKET NTAPI DequeueFreeTransferPacket(PDEVICE_OBJECT Fdo, BOOLEAN AllocIfNeeded);
|
||||
VOID NTAPI SetupReadWriteTransferPacket(PTRANSFER_PACKET pkt, PVOID Buf, ULONG Len, LARGE_INTEGER DiskLocation, PIRP OriginalIrp);
|
||||
VOID NTAPI SubmitTransferPacket(PTRANSFER_PACKET Pkt);
|
||||
NTSTATUS NTAPI TransferPktComplete(IN PDEVICE_OBJECT NullFdo, IN PIRP Irp, IN PVOID Context);
|
||||
VOID NTAPI ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp);
|
||||
VOID NTAPI TransferPacketRetryTimerDpc(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2);
|
||||
BOOLEAN NTAPI InterpretTransferPacketError(PTRANSFER_PACKET Pkt);
|
||||
BOOLEAN NTAPI RetryTransferPacket(PTRANSFER_PACKET Pkt);
|
||||
VOID NTAPI EnqueueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData, PIRP Irp);
|
||||
PIRP NTAPI DequeueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData);
|
||||
VOID NTAPI InitLowMemRetry(PTRANSFER_PACKET Pkt, PVOID BufPtr, ULONG Len, LARGE_INTEGER TargetLocation);
|
||||
BOOLEAN NTAPI StepLowMemRetry(PTRANSFER_PACKET Pkt);
|
||||
VOID NTAPI SetupEjectionTransferPacket(TRANSFER_PACKET *Pkt, BOOLEAN PreventMediaRemoval, PKEVENT SyncEventPtr, PIRP OriginalIrp);
|
||||
VOID NTAPI SetupModeSenseTransferPacket(TRANSFER_PACKET *Pkt, PKEVENT SyncEventPtr, PVOID ModeSenseBuffer, UCHAR ModeSenseBufferLen, UCHAR PageMode, PIRP OriginalIrp);
|
||||
VOID NTAPI SetupDriveCapacityTransferPacket(TRANSFER_PACKET *Pkt, PVOID ReadCapacityBuffer, ULONG ReadCapacityBufferLen, PKEVENT SyncEventPtr, PIRP OriginalIrp);
|
||||
PMDL NTAPI BuildDeviceInputMdl(PVOID Buffer, ULONG BufferLen);
|
||||
VOID NTAPI FreeDeviceInputMdl(PMDL Mdl);
|
||||
NTSTATUS NTAPI InitializeTransferPackets(PDEVICE_OBJECT Fdo);
|
||||
VOID NTAPI DestroyAllTransferPackets(PDEVICE_OBJECT Fdo);
|
||||
|
@ -24,6 +24,7 @@ Revision History:
|
||||
#include "classp.h"
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSystemControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -121,6 +122,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSystemControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -551,6 +553,7 @@ Return Value:
|
||||
--*/
|
||||
SCSIPORTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassWmiCompleteRequest(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -561,7 +564,7 @@ ClassWmiCompleteRequest(
|
||||
{
|
||||
PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension;
|
||||
PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
UCHAR MinorFunction;
|
||||
//UCHAR MinorFunction;
|
||||
PUCHAR buffer;
|
||||
ULONG retSize;
|
||||
UCHAR minorFunction;
|
||||
@ -715,6 +718,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassWmiFireEvent(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN LPGUID Guid,
|
||||
|
@ -24,13 +24,12 @@ Revision History:
|
||||
#include "classp.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
/*
|
||||
* EnqueueDeferredClientIrp
|
||||
*
|
||||
* Note: we currently do not support Cancel for storage irps.
|
||||
*/
|
||||
VOID EnqueueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData, PIRP Irp)
|
||||
VOID NTAPI EnqueueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData, PIRP Irp)
|
||||
{
|
||||
KIRQL oldIrql;
|
||||
|
||||
@ -44,7 +43,7 @@ VOID EnqueueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData, PIRP Irp)
|
||||
* DequeueDeferredClientIrp
|
||||
*
|
||||
*/
|
||||
PIRP DequeueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData)
|
||||
PIRP NTAPI DequeueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData)
|
||||
{
|
||||
KIRQL oldIrql;
|
||||
PLIST_ENTRY listEntry;
|
||||
@ -69,6 +68,3 @@ PIRP DequeueDeferredClientIrp(PCLASS_PRIVATE_FDO_DATA FdoData)
|
||||
|
||||
return irp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -35,16 +35,18 @@ PUCHAR LockTypeStrings[] = {
|
||||
|
||||
|
||||
PFILE_OBJECT_EXTENSION
|
||||
NTAPI
|
||||
ClasspGetFsContext(
|
||||
IN PCOMMON_DEVICE_EXTENSION CommonExtension,
|
||||
IN PFILE_OBJECT FileObject
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspCleanupDisableMcn(
|
||||
IN PFILE_OBJECT_EXTENSION FsContext
|
||||
);
|
||||
|
||||
|
||||
#ifdef ALLOC_PRAGMA
|
||||
#pragma alloc_text(PAGE, ClassCreateClose)
|
||||
#pragma alloc_text(PAGE, ClasspCreateClose)
|
||||
@ -55,6 +57,7 @@ ClasspCleanupDisableMcn(
|
||||
#endif
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassCreateClose(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -119,8 +122,8 @@ Return Value:
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspCreateClose(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -292,8 +295,8 @@ Return Value:
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspCleanupProtectedLocks(
|
||||
IN PFILE_OBJECT_EXTENSION FsContext
|
||||
)
|
||||
@ -403,8 +406,8 @@ ClasspCleanupProtectedLocks(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspCleanupDisableMcn(
|
||||
IN PFILE_OBJECT_EXTENSION FsContext
|
||||
)
|
||||
@ -439,7 +442,6 @@ ClasspCleanupDisableMcn(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if 1
|
||||
/*
|
||||
* BUGBUG REMOVE this old function implementation as soon as the
|
||||
@ -447,6 +449,7 @@ ClasspCleanupDisableMcn(
|
||||
* are resolved.
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspEjectionControl(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp,
|
||||
@ -738,7 +741,8 @@ ClasspEjectionControl(
|
||||
* HOWEVER, it seems to cause pagefile initialization to fail during boot
|
||||
* for some reason. Need to resolve this before switching to this function.
|
||||
*/
|
||||
NTSTATUS
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspEjectionControl(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp,
|
||||
@ -965,6 +969,7 @@ ClasspEjectionControl(
|
||||
#endif
|
||||
|
||||
PFILE_OBJECT_EXTENSION
|
||||
NTAPI
|
||||
ClasspGetFsContext(
|
||||
IN PCOMMON_DEVICE_EXTENSION CommonExtension,
|
||||
IN PFILE_OBJECT FileObject
|
||||
@ -974,4 +979,3 @@ ClasspGetFsContext(
|
||||
return GetDictionaryEntry(&(CommonExtension->FileObjectDictionary),
|
||||
(ULONGLONG) FileObject);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ typedef struct _DICTIONARY_HEADER {
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
InitializeDictionary(
|
||||
IN PDICTIONARY Dictionary
|
||||
)
|
||||
@ -45,8 +46,8 @@ InitializeDictionary(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
TestDictionarySignature(
|
||||
IN PDICTIONARY Dictionary
|
||||
)
|
||||
@ -55,6 +56,7 @@ TestDictionarySignature(
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
AllocateDictionaryEntry(
|
||||
IN PDICTIONARY Dictionary,
|
||||
IN ULONGLONG Key,
|
||||
@ -132,8 +134,8 @@ AllocateDictionaryEntry(
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
PVOID
|
||||
NTAPI
|
||||
GetDictionaryEntry(
|
||||
IN PDICTIONARY Dictionary,
|
||||
IN ULONGLONG Key
|
||||
@ -164,8 +166,8 @@ GetDictionaryEntry(
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
FreeDictionaryEntry(
|
||||
IN PDICTIONARY Dictionary,
|
||||
IN PVOID Entry
|
||||
@ -208,5 +210,3 @@ FreeDictionaryEntry(
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,6 +79,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
ULONG
|
||||
NTAPI
|
||||
ClassAcquireRemoveLockEx(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN OPTIONAL PVOID Tag,
|
||||
@ -209,6 +210,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassReleaseRemoveLock(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN OPTIONAL PIRP Tag
|
||||
@ -372,6 +374,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
ClassCompleteRequest(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
|
@ -26,8 +26,8 @@ Revision History:
|
||||
#include "classp.h"
|
||||
#include "debug.h"
|
||||
|
||||
PIRP ClassRemoveCScanList(IN PCSCAN_LIST List);
|
||||
VOID ClasspInitializeCScanList(IN PCSCAN_LIST List);
|
||||
PIRP NTAPI ClassRemoveCScanList(IN PCSCAN_LIST List);
|
||||
VOID NTAPI ClasspInitializeCScanList(IN PCSCAN_LIST List);
|
||||
|
||||
#ifdef ALLOC_PRAGMA
|
||||
#pragma alloc_text(PAGE, ClassDeleteSrbLookasideList)
|
||||
@ -39,10 +39,6 @@ typedef struct _CSCAN_LIST_ENTRY {
|
||||
ULONGLONG BlockNumber;
|
||||
} CSCAN_LIST_ENTRY, *PCSCAN_LIST_ENTRY;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ClassSplitRequest
|
||||
*
|
||||
@ -51,7 +47,7 @@ typedef struct _CSCAN_LIST_ENTRY {
|
||||
* StartIo routine when the transfer size is too large for the hardware.
|
||||
* We map it to our new read/write handler.
|
||||
*/
|
||||
VOID ClassSplitRequest(IN PDEVICE_OBJECT Fdo, IN PIRP Irp, IN ULONG MaximumBytes)
|
||||
VOID NTAPI ClassSplitRequest(IN PDEVICE_OBJECT Fdo, IN PIRP Irp, IN ULONG MaximumBytes)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -70,7 +66,6 @@ VOID ClassSplitRequest(IN PDEVICE_OBJECT Fdo, IN PIRP Irp, IN ULONG MaximumBytes
|
||||
ServiceTransferRequest(Fdo, Irp);
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassIoCompleteAssociated()
|
||||
@ -100,6 +95,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassIoCompleteAssociated(
|
||||
IN PDEVICE_OBJECT Fdo,
|
||||
IN PIRP Irp,
|
||||
@ -313,7 +309,6 @@ ClassIoCompleteAssociated(
|
||||
|
||||
} // end ClassIoCompleteAssociated()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
RetryRequest()
|
||||
@ -342,6 +337,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
RetryRequest(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -443,7 +439,6 @@ RetryRequest(
|
||||
return;
|
||||
} // end RetryRequest()
|
||||
|
||||
|
||||
/*++
|
||||
|
||||
ClassBuildRequest()
|
||||
@ -477,6 +472,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassBuildRequest(
|
||||
PDEVICE_OBJECT Fdo,
|
||||
PIRP Irp
|
||||
@ -504,8 +500,8 @@ ClassBuildRequest(
|
||||
|
||||
} // end ClassBuildRequest()
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspBuildRequestEx(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PIRP Irp,
|
||||
@ -731,8 +727,7 @@ Return Value:
|
||||
|
||||
}
|
||||
|
||||
|
||||
VOID ClasspInsertCScanList(IN PLIST_ENTRY ListHead, IN PCSCAN_LIST_ENTRY Entry)
|
||||
VOID NTAPI ClasspInsertCScanList(IN PLIST_ENTRY ListHead, IN PCSCAN_LIST_ENTRY Entry)
|
||||
{
|
||||
PCSCAN_LIST_ENTRY t;
|
||||
|
||||
@ -776,8 +771,7 @@ VOID ClasspInsertCScanList(IN PLIST_ENTRY ListHead, IN PCSCAN_LIST_ENTRY Entry)
|
||||
|
||||
}
|
||||
|
||||
|
||||
VOID ClassInsertCScanList(IN PCSCAN_LIST List, IN PIRP Irp, IN ULONGLONG BlockNumber, IN BOOLEAN LowPriority)
|
||||
VOID NTAPI ClassInsertCScanList(IN PCSCAN_LIST List, IN PIRP Irp, IN ULONGLONG BlockNumber, IN BOOLEAN LowPriority)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
@ -829,11 +823,8 @@ Return Value:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
VOID ClassFreeOrReuseSrb( IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb)
|
||||
VOID NTAPI ClassFreeOrReuseSrb(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PSCSI_REQUEST_BLOCK Srb)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
@ -887,7 +878,6 @@ Return Value:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassDeleteSrbLookasideList()
|
||||
@ -909,7 +899,7 @@ Return Value:
|
||||
None
|
||||
|
||||
--*/
|
||||
VOID ClassDeleteSrbLookasideList(IN PCOMMON_DEVICE_EXTENSION CommonExtension)
|
||||
VOID NTAPI ClassDeleteSrbLookasideList(IN PCOMMON_DEVICE_EXTENSION CommonExtension)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
@ -925,7 +915,6 @@ VOID ClassDeleteSrbLookasideList(IN PCOMMON_DEVICE_EXTENSION CommonExtension)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassInitializeSrbLookasideList()
|
||||
@ -952,8 +941,8 @@ Note:
|
||||
|
||||
--*/
|
||||
|
||||
VOID ClassInitializeSrbLookasideList( IN PCOMMON_DEVICE_EXTENSION CommonExtension,
|
||||
IN ULONG NumberElements)
|
||||
VOID NTAPI ClassInitializeSrbLookasideList(IN PCOMMON_DEVICE_EXTENSION CommonExtension,
|
||||
IN ULONG NumberElements)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
@ -976,10 +965,7 @@ VOID ClassInitializeSrbLookasideList( IN PCOMMON_DEVICE_EXTENSION CommonExtens
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
VOID ClasspInitializeCScanList(IN PCSCAN_LIST List)
|
||||
VOID NTAPI ClasspInitializeCScanList(IN PCSCAN_LIST List)
|
||||
{
|
||||
PAGED_CODE();
|
||||
RtlZeroMemory(List, sizeof(CSCAN_LIST));
|
||||
@ -987,9 +973,7 @@ VOID ClasspInitializeCScanList(IN PCSCAN_LIST List)
|
||||
InitializeListHead(&(List->NextSweep));
|
||||
}
|
||||
|
||||
|
||||
|
||||
VOID ClasspStartNextSweep(PCSCAN_LIST List)
|
||||
VOID NTAPI ClasspStartNextSweep(PCSCAN_LIST List)
|
||||
{
|
||||
ASSERT(IsListEmpty(&(List->CurrentSweep)) == TRUE);
|
||||
|
||||
@ -1024,9 +1008,7 @@ VOID ClasspStartNextSweep(PCSCAN_LIST List)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
PIRP ClassRemoveCScanList(IN PCSCAN_LIST List)
|
||||
PIRP NTAPI ClassRemoveCScanList(IN PCSCAN_LIST List)
|
||||
{
|
||||
PCSCAN_LIST_ENTRY entry;
|
||||
|
||||
@ -1057,4 +1039,3 @@ PIRP ClassRemoveCScanList(IN PCSCAN_LIST List)
|
||||
|
||||
return CONTAINING_RECORD(entry, IRP, Tail.Overlay.DriverContext);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ Revision History:
|
||||
#define CLASS_TAG_POWER 'WLcS'
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspPowerHandler(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -33,6 +34,7 @@ ClasspPowerHandler(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspPowerDownCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -40,6 +42,7 @@ ClasspPowerDownCompletion(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspPowerUpCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -47,6 +50,7 @@ ClasspPowerUpCompletion(
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RetryPowerRequest(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -54,13 +58,14 @@ RetryPowerRequest(
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspStartNextPowerIrpCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN PVOID Context
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassDispatchPower()
|
||||
@ -79,6 +84,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassDispatchPower(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -108,7 +114,7 @@ ClassDispatchPower(
|
||||
|
||||
return commonExtension->DevInfo->ClassPowerDevice(DeviceObject, Irp);
|
||||
} // end ClassDispatchPower()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspPowerUpCompletion()
|
||||
@ -149,6 +155,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspPowerUpCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -476,7 +483,7 @@ ClasspPowerUpCompletionFailure:
|
||||
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
} // end ClasspPowerUpCompletion()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspPowerDownCompletion()
|
||||
@ -517,6 +524,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspPowerDownCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -974,7 +982,7 @@ ClasspPowerDownCompletion(
|
||||
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
} // end ClasspPowerDownCompletion()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspPowerHandler()
|
||||
@ -998,6 +1006,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspPowerHandler(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -1278,7 +1287,7 @@ ClasspPowerHandlerCleanup:
|
||||
TRUE);
|
||||
return PoCallDriver(lowerDevice, Irp);
|
||||
} // end ClasspPowerHandler()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassMinimalPowerHandler()
|
||||
@ -1290,6 +1299,7 @@ Routine Description:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassMinimalPowerHandler(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -1355,7 +1365,7 @@ ClassMinimalPowerHandler(
|
||||
return status;
|
||||
}
|
||||
} // end ClassMinimalPowerHandler()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassSpinDownPowerHandler()
|
||||
@ -1383,6 +1393,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassSpinDownPowerHandler(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -1434,7 +1445,7 @@ ClassSpinDownPowerHandler(
|
||||
|
||||
return ClasspPowerHandler(DeviceObject, Irp, options);
|
||||
} // end ClassSpinDownPowerHandler()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClassStopUnitPowerHandler()
|
||||
@ -1450,6 +1461,7 @@ Routine Description:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClassStopUnitPowerHandler(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp
|
||||
@ -1475,7 +1487,7 @@ ClassStopUnitPowerHandler(
|
||||
|
||||
return ClassSpinDownPowerHandler(DeviceObject, Irp);
|
||||
} // end ClassStopUnitPowerHandler()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
RetryPowerRequest()
|
||||
@ -1499,6 +1511,7 @@ Return Value:
|
||||
|
||||
--*/
|
||||
VOID
|
||||
NTAPI
|
||||
RetryPowerRequest(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp,
|
||||
@ -1574,7 +1587,7 @@ RetryPowerRequest(
|
||||
return;
|
||||
|
||||
} // end RetryRequest()
|
||||
|
||||
|
||||
/*++////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClasspStartNextPowerIrpCompletion()
|
||||
@ -1586,6 +1599,7 @@ Routine Description:
|
||||
|
||||
--*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ClasspStartNextPowerIrpCompletion(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
@ -1599,4 +1613,3 @@ ClasspStartNextPowerIrpCompletion(
|
||||
PoStartNextPowerIrp(Irp);
|
||||
return STATUS_SUCCESS;
|
||||
} // end ClasspStartNextPowerIrpCompletion()
|
||||
|
||||
|
@ -24,8 +24,6 @@ Revision History:
|
||||
#include "classp.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* InterpretTransferPacketError
|
||||
*
|
||||
@ -34,7 +32,7 @@ Revision History:
|
||||
*
|
||||
* Return TRUE iff packet should be retried.
|
||||
*/
|
||||
BOOLEAN InterpretTransferPacketError(PTRANSFER_PACKET Pkt)
|
||||
BOOLEAN NTAPI InterpretTransferPacketError(PTRANSFER_PACKET Pkt)
|
||||
{
|
||||
BOOLEAN shouldRetry = FALSE;
|
||||
PCDB pCdb = (PCDB)Pkt->Srb.Cdb;
|
||||
@ -172,7 +170,6 @@ BOOLEAN InterpretTransferPacketError(PTRANSFER_PACKET Pkt)
|
||||
return shouldRetry;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* RetryTransferPacket
|
||||
*
|
||||
@ -181,7 +178,7 @@ BOOLEAN InterpretTransferPacketError(PTRANSFER_PACKET Pkt)
|
||||
* Return TRUE iff the packet is complete.
|
||||
* (if so the status in pkt->irp is the final status).
|
||||
*/
|
||||
BOOLEAN RetryTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
BOOLEAN NTAPI RetryTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
{
|
||||
BOOLEAN packetDone;
|
||||
|
||||
@ -278,18 +275,16 @@ BOOLEAN RetryTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
return packetDone;
|
||||
}
|
||||
|
||||
|
||||
VOID TransferPacketRetryTimerDpc( IN PKDPC Dpc,
|
||||
IN PVOID DeferredContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2)
|
||||
VOID NTAPI TransferPacketRetryTimerDpc(IN PKDPC Dpc,
|
||||
IN PVOID DeferredContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2)
|
||||
{
|
||||
PTRANSFER_PACKET pkt = (PTRANSFER_PACKET)DeferredContext;
|
||||
SubmitTransferPacket(pkt);
|
||||
}
|
||||
|
||||
|
||||
VOID InitLowMemRetry(PTRANSFER_PACKET Pkt, PVOID BufPtr, ULONG Len, LARGE_INTEGER TargetLocation)
|
||||
VOID NTAPI InitLowMemRetry(PTRANSFER_PACKET Pkt, PVOID BufPtr, ULONG Len, LARGE_INTEGER TargetLocation)
|
||||
{
|
||||
ASSERT(Len > 0);
|
||||
ASSERT(!Pkt->InLowMemRetry);
|
||||
@ -299,7 +294,6 @@ VOID InitLowMemRetry(PTRANSFER_PACKET Pkt, PVOID BufPtr, ULONG Len, LARGE_INTEGE
|
||||
Pkt->LowMemRetry_nextChunkTargetLocation = TargetLocation;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* StepLowMemRetry
|
||||
*
|
||||
@ -308,7 +302,7 @@ VOID InitLowMemRetry(PTRANSFER_PACKET Pkt, PVOID BufPtr, ULONG Len, LARGE_INTEGE
|
||||
*
|
||||
* Returns TRUE iff the packet is done.
|
||||
*/
|
||||
BOOLEAN StepLowMemRetry(PTRANSFER_PACKET Pkt)
|
||||
BOOLEAN NTAPI StepLowMemRetry(PTRANSFER_PACKET Pkt)
|
||||
{
|
||||
BOOLEAN packetDone;
|
||||
|
||||
@ -346,4 +340,3 @@ BOOLEAN StepLowMemRetry(PTRANSFER_PACKET Pkt)
|
||||
|
||||
return packetDone;
|
||||
}
|
||||
|
||||
|
@ -24,18 +24,14 @@ Revision History:
|
||||
#include "classp.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
|
||||
#ifdef ALLOC_PRAGMA
|
||||
#pragma alloc_text(PAGE, ClassGetDeviceParameter)
|
||||
#pragma alloc_text(PAGE, ClassScanForSpecial)
|
||||
#pragma alloc_text(PAGE, ClassSetDeviceParameter)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// custom string match -- careful!
|
||||
BOOLEAN ClasspMyStringMatches(IN PCHAR StringToMatch OPTIONAL, IN PCHAR TargetString)
|
||||
BOOLEAN NTAPI ClasspMyStringMatches(IN PCHAR StringToMatch OPTIONAL, IN PCHAR TargetString)
|
||||
{
|
||||
ULONG length; // strlen returns an int, not size_t (!)
|
||||
PAGED_CODE();
|
||||
@ -54,8 +50,7 @@ BOOLEAN ClasspMyStringMatches(IN PCHAR StringToMatch OPTIONAL, IN PCHAR TargetSt
|
||||
return (strncmp(StringToMatch, TargetString, length) == 0);
|
||||
}
|
||||
|
||||
|
||||
VOID ClassGetDeviceParameter(
|
||||
VOID NTAPI ClassGetDeviceParameter(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PWSTR SubkeyName OPTIONAL,
|
||||
IN PWSTR ParameterName,
|
||||
@ -139,8 +134,7 @@ VOID ClassGetDeviceParameter(
|
||||
|
||||
} // end ClassGetDeviceParameter()
|
||||
|
||||
|
||||
NTSTATUS ClassSetDeviceParameter(
|
||||
NTSTATUS NTAPI ClassSetDeviceParameter(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN PWSTR SubkeyName OPTIONAL,
|
||||
IN PWSTR ParameterName,
|
||||
@ -210,7 +204,6 @@ NTSTATUS ClassSetDeviceParameter(
|
||||
|
||||
} // end ClassSetDeviceParameter()
|
||||
|
||||
|
||||
/*
|
||||
* ClassScanForSpecial
|
||||
*
|
||||
@ -218,7 +211,7 @@ NTSTATUS ClassSetDeviceParameter(
|
||||
* hardware based upon id strings. it does not check the registry.
|
||||
*/
|
||||
|
||||
VOID ClassScanForSpecial(
|
||||
VOID NTAPI ClassScanForSpecial(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension,
|
||||
IN CLASSPNP_SCAN_FOR_SPECIAL_INFO DeviceList[],
|
||||
IN PCLASS_SCAN_FOR_SPECIAL_HANDLER Function)
|
||||
@ -312,7 +305,6 @@ VOID ClassScanForSpecial(
|
||||
|
||||
} // end ClasspScanForSpecialByInquiry()
|
||||
|
||||
|
||||
//
|
||||
// In order to provide better performance without the need to reboot,
|
||||
// we need to implement a self-adjusting method to set and clear the
|
||||
@ -338,6 +330,7 @@ VOID ClassScanForSpecial(
|
||||
//
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspPerfIncrementErrorCount(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -389,6 +382,7 @@ ClasspPerfIncrementErrorCount(
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
ClasspPerfIncrementSuccessfulIo(
|
||||
IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension
|
||||
)
|
||||
@ -484,8 +478,7 @@ ClasspPerfIncrementSuccessfulIo(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
PMDL BuildDeviceInputMdl(PVOID Buffer, ULONG BufferLen)
|
||||
PMDL NTAPI BuildDeviceInputMdl(PVOID Buffer, ULONG BufferLen)
|
||||
{
|
||||
PMDL mdl;
|
||||
|
||||
@ -514,14 +507,12 @@ PMDL BuildDeviceInputMdl(PVOID Buffer, ULONG BufferLen)
|
||||
return mdl;
|
||||
}
|
||||
|
||||
|
||||
VOID FreeDeviceInputMdl(PMDL Mdl)
|
||||
VOID NTAPI FreeDeviceInputMdl(PMDL Mdl)
|
||||
{
|
||||
MmUnlockPages(Mdl);
|
||||
IoFreeMdl(Mdl);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
VOID
|
||||
ClasspPerfResetCounters(
|
||||
@ -561,5 +552,3 @@ VOID FreeDeviceInputMdl(PMDL Mdl)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ ULONG MaxWorkingSetTransferPackets = MAX_WORKINGSET_TRANSFER_PACKETS_Consumer;
|
||||
*
|
||||
* Allocate/initialize TRANSFER_PACKETs and related resources.
|
||||
*/
|
||||
NTSTATUS InitializeTransferPackets(PDEVICE_OBJECT Fdo)
|
||||
NTSTATUS NTAPI InitializeTransferPackets(PDEVICE_OBJECT Fdo)
|
||||
{
|
||||
PCOMMON_DEVICE_EXTENSION commonExt = Fdo->DeviceExtension;
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
@ -132,8 +132,7 @@ NTSTATUS InitializeTransferPackets(PDEVICE_OBJECT Fdo)
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
VOID DestroyAllTransferPackets(PDEVICE_OBJECT Fdo)
|
||||
VOID NTAPI DestroyAllTransferPackets(PDEVICE_OBJECT Fdo)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -151,8 +150,7 @@ VOID DestroyAllTransferPackets(PDEVICE_OBJECT Fdo)
|
||||
ASSERT(fdoData->NumTotalTransferPackets == 0);
|
||||
}
|
||||
|
||||
|
||||
PTRANSFER_PACKET NewTransferPacket(PDEVICE_OBJECT Fdo)
|
||||
PTRANSFER_PACKET NTAPI NewTransferPacket(PDEVICE_OBJECT Fdo)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -188,12 +186,11 @@ PTRANSFER_PACKET NewTransferPacket(PDEVICE_OBJECT Fdo)
|
||||
return newPkt;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* DestroyTransferPacket
|
||||
*
|
||||
*/
|
||||
VOID DestroyTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
VOID NTAPI DestroyTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Pkt->Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -218,8 +215,7 @@ VOID DestroyTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
ExFreePool(Pkt);
|
||||
}
|
||||
|
||||
|
||||
VOID EnqueueFreeTransferPacket(PDEVICE_OBJECT Fdo, PTRANSFER_PACKET Pkt)
|
||||
VOID NTAPI EnqueueFreeTransferPacket(PDEVICE_OBJECT Fdo, PTRANSFER_PACKET Pkt)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -324,8 +320,7 @@ VOID EnqueueFreeTransferPacket(PDEVICE_OBJECT Fdo, PTRANSFER_PACKET Pkt)
|
||||
|
||||
}
|
||||
|
||||
|
||||
PTRANSFER_PACKET DequeueFreeTransferPacket(PDEVICE_OBJECT Fdo, BOOLEAN AllocIfNeeded)
|
||||
PTRANSFER_PACKET NTAPI DequeueFreeTransferPacket(PDEVICE_OBJECT Fdo, BOOLEAN AllocIfNeeded)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -365,8 +360,6 @@ PTRANSFER_PACKET DequeueFreeTransferPacket(PDEVICE_OBJECT Fdo, BOOLEAN AllocIfNe
|
||||
return pkt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SetupReadWriteTransferPacket
|
||||
*
|
||||
@ -377,11 +370,11 @@ PTRANSFER_PACKET DequeueFreeTransferPacket(PDEVICE_OBJECT Fdo, BOOLEAN AllocIfNe
|
||||
* The Irp is set up in SubmitTransferPacket because it must be reset
|
||||
* for each packet submission.
|
||||
*/
|
||||
VOID SetupReadWriteTransferPacket( PTRANSFER_PACKET Pkt,
|
||||
PVOID Buf,
|
||||
ULONG Len,
|
||||
LARGE_INTEGER DiskLocation,
|
||||
PIRP OriginalIrp)
|
||||
VOID NTAPI SetupReadWriteTransferPacket(PTRANSFER_PACKET Pkt,
|
||||
PVOID Buf,
|
||||
ULONG Len,
|
||||
LARGE_INTEGER DiskLocation,
|
||||
PIRP OriginalIrp)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Pkt->Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -460,13 +453,12 @@ VOID SetupReadWriteTransferPacket( PTRANSFER_PACKET Pkt,
|
||||
Pkt->CompleteOriginalIrpWhenLastPacketCompletes = TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SubmitTransferPacket
|
||||
*
|
||||
* Set up the IRP for the TRANSFER_PACKET submission and send it down.
|
||||
*/
|
||||
VOID SubmitTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
VOID NTAPI SubmitTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
{
|
||||
PCOMMON_DEVICE_EXTENSION commonExtension = Pkt->Fdo->DeviceExtension;
|
||||
PDEVICE_OBJECT nextDevObj = commonExtension->LowerDeviceObject;
|
||||
@ -508,8 +500,7 @@ VOID SubmitTransferPacket(PTRANSFER_PACKET Pkt)
|
||||
IoCallDriver(nextDevObj, Pkt->Irp);
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS TransferPktComplete(IN PDEVICE_OBJECT NullFdo, IN PIRP Irp, IN PVOID Context)
|
||||
NTSTATUS NTAPI TransferPktComplete(IN PDEVICE_OBJECT NullFdo, IN PIRP Irp, IN PVOID Context)
|
||||
{
|
||||
PTRANSFER_PACKET pkt = (PTRANSFER_PACKET)Context;
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = pkt->Fdo->DeviceExtension;
|
||||
@ -718,13 +709,12 @@ NTSTATUS TransferPktComplete(IN PDEVICE_OBJECT NullFdo, IN PIRP Irp, IN PVOID Co
|
||||
return STATUS_MORE_PROCESSING_REQUIRED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SetupEjectionTransferPacket
|
||||
*
|
||||
* Set up a transferPacket for a synchronous Ejection Control transfer.
|
||||
*/
|
||||
VOID SetupEjectionTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
VOID NTAPI SetupEjectionTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
BOOLEAN PreventMediaRemoval,
|
||||
PKEVENT SyncEventPtr,
|
||||
PIRP OriginalIrp)
|
||||
@ -762,14 +752,13 @@ VOID SetupEjectionTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
Pkt->SyncEventPtr = SyncEventPtr;
|
||||
Pkt->CompleteOriginalIrpWhenLastPacketCompletes = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SetupModeSenseTransferPacket
|
||||
*
|
||||
* Set up a transferPacket for a synchronous Mode Sense transfer.
|
||||
*/
|
||||
VOID SetupModeSenseTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
VOID NTAPI SetupModeSenseTransferPacket(TRANSFER_PACKET *Pkt,
|
||||
PKEVENT SyncEventPtr,
|
||||
PVOID ModeSenseBuffer,
|
||||
UCHAR ModeSenseBufferLen,
|
||||
@ -814,17 +803,16 @@ VOID SetupModeSenseTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
Pkt->CompleteOriginalIrpWhenLastPacketCompletes = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SetupDriveCapacityTransferPacket
|
||||
*
|
||||
* Set up a transferPacket for a synchronous Drive Capacity transfer.
|
||||
*/
|
||||
VOID SetupDriveCapacityTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
PVOID ReadCapacityBuffer,
|
||||
ULONG ReadCapacityBufferLen,
|
||||
PKEVENT SyncEventPtr,
|
||||
PIRP OriginalIrp)
|
||||
VOID NTAPI SetupDriveCapacityTransferPacket(TRANSFER_PACKET *Pkt,
|
||||
PVOID ReadCapacityBuffer,
|
||||
ULONG ReadCapacityBufferLen,
|
||||
PKEVENT SyncEventPtr,
|
||||
PIRP OriginalIrp)
|
||||
{
|
||||
PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Pkt->Fdo->DeviceExtension;
|
||||
PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData;
|
||||
@ -860,7 +848,6 @@ VOID SetupDriveCapacityTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
Pkt->CompleteOriginalIrpWhenLastPacketCompletes = FALSE;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* SetupSendStartUnitTransferPacket
|
||||
@ -907,5 +894,3 @@ VOID SetupDriveCapacityTransferPacket( TRANSFER_PACKET *Pkt,
|
||||
Pkt->CompleteOriginalIrpWhenLastPacketCompletes = FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user