--*/
-#include "CdProcs.h"
+#include "cdprocs.h"
//
// The Bug check file id for this module
// Use a try-finally to perform the final cleanup.
//
- try {
+ _SEH2_TRY {
//
// Loop while there are more bytes to transfer.
}
try_exit: NOTHING;
- } finally {
+ } _SEH2_FINALLY {
//
// Perform final cleanup on the IoRuns if necessary.
CdFinishBuffers( IrpContext, IoRuns, CleanupRunCount, TRUE, FALSE );
}
- }
+ } _SEH2_END;
return Status;
}
// Use a try-finally to perform the final cleanup.
//
- try {
+ _SEH2_TRY {
//
// If the initial offset lies within the RIFF header then copy the
KeFlushIoBuffers( IrpContext->Irp->MdlAddress, TRUE, FALSE );
try_exit: NOTHING;
- } finally {
+ } _SEH2_FINALLY {
//
// Perform final cleanup on the IoRuns if necessary.
CdFinishBuffers( IrpContext, IoRuns, CleanupRunCount, TRUE, FALSE );
}
- }
+ } _SEH2_END;
return Status;
}
// deallocate the Mdl and return the appropriate "expected" status.
//
- try {
+ _SEH2_TRY {
MmProbeAndLockPages( Mdl, IrpContext->Irp->RequestorMode, IoWriteAccess );
Status = STATUS_SUCCESS;
+#ifdef _MSC_VER
#pragma warning(suppress: 6320)
- } except(EXCEPTION_EXECUTE_HANDLER) {
+#endif
+ } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
- Status = GetExceptionCode();
+ Status = _SEH2_GetExceptionCode();
IoFreeMdl( Mdl );
IrpContext->Irp->MdlAddress = NULL;
Status = STATUS_INVALID_USER_BUFFER;
}
- }
+ } _SEH2_END;
}
//
CurrentRawOffset = (LONGLONG) ((ULONG) CurrentRawOffset / RAW_SECTOR_SIZE);
+#ifdef _MSC_VER
#pragma prefast( suppress: __WARNING_RESULTOFSHIFTCASTTOLARGERSIZE, "This is fine beacuse raw sector size > sector shift" )
+#endif
CurrentCookedOffset = (LONGLONG) ((ULONG) CurrentRawOffset << SECTOR_SHIFT );
CurrentRawOffset = (LONGLONG) ((ULONG) CurrentRawOffset * RAW_SECTOR_SIZE);
IO_COMPLETION_ROUTINE CdSyncCompletionRoutine;
NTSTATUS
+NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
CdSyncCompletionRoutine (
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
CdAcquireCacheForRead( IrpContext);
- try {
+ _SEH2_TRY {
//
// Check the cache hasn't gone away due to volume verify failure (which
// pages and update the MDL with physical page information.
//
- try {
+ _SEH2_TRY {
MmProbeAndLockPages( Vcb->SectorCacheIrp->MdlAddress,
KernelMode,
(LOCK_OPERATION) IoWriteAccess );
}
+#ifdef _MSC_VER
#pragma warning(suppress: 6320)
- except(EXCEPTION_EXECUTE_HANDLER) {
+#endif
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
IoFreeMdl( Vcb->SectorCacheIrp->MdlAddress );
Vcb->SectorCacheIrp->MdlAddress = NULL;
- }
+ } _SEH2_END;
if (NULL == Vcb->SectorCacheIrp->MdlAddress) {
Result = TRUE;
}
- finally {
+ _SEH2_FINALLY {
CdReleaseCache( IrpContext);
- }
+ } _SEH2_END;
return Result;
}
//
NTSTATUS
+NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
CdMultiSyncCompletionRoutine (
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
//
NTSTATUS
+NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
CdMultiAsyncCompletionRoutine (
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
//
NTSTATUS
+NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
CdSingleSyncCompletionRoutine (
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
//
NTSTATUS
+NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */
CdSingleAsyncCompletionRoutine (
PDEVICE_OBJECT DeviceObject,
PIRP Irp,