您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FsRtlEnterFileSystem函数代码示例

51自学网 2021-06-01 20:48:59
  C++
这篇教程C++ FsRtlEnterFileSystem函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中FsRtlEnterFileSystem函数的典型用法代码示例。如果您正苦于以下问题:C++ FsRtlEnterFileSystem函数的具体用法?C++ FsRtlEnterFileSystem怎么用?C++ FsRtlEnterFileSystem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了FsRtlEnterFileSystem函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Ext2DeQueueCloseRequest

VOIDExt2DeQueueCloseRequest (IN PVOID Context){    PEXT2_IRP_CONTEXT IrpContext;    IrpContext = (PEXT2_IRP_CONTEXT) Context;    ASSERT(IrpContext);    ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&           (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));    __try {        __try {            FsRtlEnterFileSystem();            Ext2Close(IrpContext);        } __except (Ext2ExceptionFilter(IrpContext, GetExceptionInformation())) {            Ext2ExceptionHandler(IrpContext);        }    } __finally {        FsRtlExitFileSystem();    }}
开发者ID:herocodemaster,项目名称:ext2fsd,代码行数:27,


示例2: FatCleanup

NTSTATUSNTAPIFatCleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp){    PFAT_IRP_CONTEXT IrpContext;    NTSTATUS Status;    DPRINT("FatCleanup(DeviceObject %p, Irp %p)/n", DeviceObject, Irp);    /* FatCleanup works only with a volume device object */    if (DeviceObject == FatGlobalData.DiskDeviceObject)    {        /* Complete the request and return success */        Irp->IoStatus.Status = STATUS_SUCCESS;        Irp->IoStatus.Information = FILE_OPENED;        IoCompleteRequest(Irp, IO_DISK_INCREMENT);        return STATUS_SUCCESS;    }    /* Enter FsRtl critical region */    FsRtlEnterFileSystem();    /* Build an irp context */    IrpContext = FatBuildIrpContext(Irp, TRUE);    /* Call internal function */    Status = FatiCleanup(IrpContext, Irp);    /* Leave FsRtl critical region */    FsRtlExitFileSystem();    return Status;}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:35,


示例3: FFSDeQueueCloseRequest

VOID NTAPIFFSDeQueueCloseRequest(	IN PVOID Context){	PFFS_IRP_CONTEXT IrpContext;    PAGED_CODE();	IrpContext = (PFFS_IRP_CONTEXT) Context;	ASSERT(IrpContext);	ASSERT((IrpContext->Identifier.Type == FFSICX) &&			(IrpContext->Identifier.Size == sizeof(FFS_IRP_CONTEXT)));	_SEH2_TRY	{		_SEH2_TRY		{			FsRtlEnterFileSystem();			FFSClose(IrpContext);		}		_SEH2_EXCEPT (FFSExceptionFilter(IrpContext, _SEH2_GetExceptionInformation()))		{			FFSExceptionHandler(IrpContext);		} _SEH2_END;	}	_SEH2_FINALLY	{		FsRtlExitFileSystem();	} _SEH2_END;}
开发者ID:GYGit,项目名称:reactos,代码行数:32,


示例4: FatDequeueRequest

VOIDNTAPIFatDequeueRequest(IN PVOID Context){    PFAT_IRP_CONTEXT IrpContext;    IrpContext = (PFAT_IRP_CONTEXT) Context;    /* Enter critical region. */    FsRtlEnterFileSystem();    /* Handle top level IRP Correctly. */    if (!FlagOn(IrpContext->Flags, IRPCONTEXT_TOPLEVEL))        IoSetTopLevelIrp((PIRP) FSRTL_FSP_TOP_LEVEL_IRP);    /* Enable Synchronous IO. */    SetFlag(IrpContext->Flags, IRPCONTEXT_CANWAIT);    /* Invoke the handler routine. */    IrpContext->QueuedOperationHandler(IrpContext);    /* Restore top level IRP. */	IoSetTopLevelIrp(NULL);    /* Leave critical region. */	FsRtlExitFileSystem();}
开发者ID:GYGit,项目名称:reactos,代码行数:27,


示例5: Ext2FileSystemControl

/*************************************************************************** Function: Ext2FileSystemControl** Description:*	The I/O Manager will invoke this routine to handle a *   File System Control IRP** Expected Interrupt Level (for execution) :*  *	???** Arguments:**    DeviceObject - Supplies the volume device object where the*                   file exists**    Irp - Supplies the Irp being processed*** Return Value:**    NTSTATUS - The FSD status for the IRP**************************************************************************/NTSTATUS NTAPIExt2FileSystemControl(    IN PDEVICE_OBJECT DeviceObject,    IN PIRP Irp    ){      NTSTATUS Status = STATUS_SUCCESS;	PIO_STACK_LOCATION IrpSp;    	DebugTrace(DEBUG_TRACE_IRP_ENTRY,   "File System Control IRP Received...", 0);			//	Ext2BreakPoint();	FsRtlEnterFileSystem();	ASSERT(DeviceObject);	ASSERT(Irp);	//    //  Get a pointer to the current Irp stack location    //    IrpSp = IoGetCurrentIrpStackLocation( Irp );		if( IrpSp->MinorFunction == IRP_MN_MOUNT_VOLUME )	{		DebugTrace(DEBUG_TRACE_MOUNT,   "Mount Request Received...", 0);		Status = Ext2MountVolume ( Irp, IrpSp );		Ext2CompleteRequest( Irp, Status );	}	else if( IrpSp->MinorFunction == IRP_MN_USER_FS_REQUEST )	{		DebugTrace(DEBUG_TRACE_FSCTRL,   "IRP_MN_USER_FS_REQUEST received...", 0);		Status = Ext2UserFileSystemRequest( Irp, IrpSp );		Ext2CompleteRequest( Irp, Status );	}	else 	{		if( IrpSp->MinorFunction == IRP_MN_VERIFY_VOLUME )		{			DebugTrace(DEBUG_TRACE_FSCTRL,   "IRP_MN_VERIFY_VOLUME received...", 0);		}		else if( IrpSp->MinorFunction == IRP_MN_LOAD_FILE_SYSTEM )		{			DebugTrace(DEBUG_TRACE_FSCTRL,   "IRP_MN_LOAD_FILE_SYSTEM received...", 0);		}		else		{			DebugTrace(DEBUG_TRACE_FSCTRL,   "Unknown Minor IRP code received...", 0);		}		Status = STATUS_INVALID_DEVICE_REQUEST;		Ext2CompleteRequest( Irp, Status );	}		FsRtlExitFileSystem();    return Status;}
开发者ID:RPG-7,项目名称:reactos,代码行数:85,


示例6: NpFsdQueryVolumeInformation

NTSTATUSNTAPINpFsdQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject,                            IN PIRP Irp){    NTSTATUS Status;    PAGED_CODE();    TRACE("Entered/n");    FsRtlEnterFileSystem();    NpAcquireSharedVcb();    Status = NpCommonQueryVolumeInformation(DeviceObject, Irp);    NpReleaseVcb();    FsRtlExitFileSystem();    if (Status != STATUS_PENDING)    {        Irp->IoStatus.Status = Status;        IoCompleteRequest(Irp, IO_NAMED_PIPE_INCREMENT);    }    TRACE("Leaving, Status = %lx/n", Status);    return Status;}
开发者ID:hoangduit,项目名称:reactos,代码行数:26,


示例7: LklDequeueRequest

VOID DDKAPI LklDequeueRequest(IN PDEVICE_OBJECT device, IN PVOID context){	NTSTATUS status;	PIRPCONTEXT irp_context;	irp_context = (PIRPCONTEXT) context;	ASSERT(irp_context);	ASSERT(irp_context->id.type == IRP_CONTEXT && irp_context->id.size == sizeof(IRPCONTEXT));	IoFreeWorkItem(irp_context->work_item);	if (FLAG_ON(irp_context->flags, VFS_IRP_CONTEXT_NOT_TOP_LEVEL))		IoSetTopLevelIrp((PIRP)FSRTL_FSP_TOP_LEVEL_IRP);	SET_FLAG(irp_context->flags, VFS_IRP_CONTEXT_CAN_BLOCK);	FsRtlEnterFileSystem();	status = LklDispatchRequest(irp_context);	FsRtlExitFileSystem();	IoSetTopLevelIrp(NULL);}
开发者ID:luciang,项目名称:lklvfs,代码行数:25,


示例8: FatLockControl

NTSTATUSNTAPIFatLockControl(PDEVICE_OBJECT DeviceObject, PIRP Irp){    PFAT_IRP_CONTEXT IrpContext;    NTSTATUS Status;    BOOLEAN TopLevel;    DPRINT1("FatLockControl()/n");    /* Enter FsRtl critical region */    FsRtlEnterFileSystem();    /* Set Top Level IRP if not set */    TopLevel = FatIsTopLevelIrp(Irp);    /* Build an irp context */    IrpContext = FatBuildIrpContext(Irp, IoIsOperationSynchronous(Irp));    /* Call internal function */    Status = FatiLockControl(IrpContext, Irp);    /* Reset Top Level IRP */    if (TopLevel) IoSetTopLevelIrp(NULL);    /* Leave FsRtl critical region */    FsRtlExitFileSystem();    return Status;}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:30,


示例9: FatFileSystemControl

NTSTATUSNTAPIFatFileSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp){    NTSTATUS Status = STATUS_SUCCESS;    PFAT_IRP_CONTEXT IrpContext;    BOOLEAN CanWait = TRUE;    DPRINT("FatFileSystemControl(DeviceObject %p, Irp %p)/n", DeviceObject, Irp);    /* Get CanWait flag */    if (IoGetCurrentIrpStackLocation(Irp)->FileObject)    {        CanWait = IoIsOperationSynchronous(Irp);    }    /* Enter FsRtl critical region */    FsRtlEnterFileSystem();    /* Build an irp context */    IrpContext = FatBuildIrpContext(Irp, CanWait);    /* Call internal function */    Status = FatiFileSystemControl(IrpContext, Irp);    /* Leave FsRtl critical region */    FsRtlExitFileSystem();    return Status;}
开发者ID:hoangduit,项目名称:reactos,代码行数:30,


示例10: FatCloseWorker

VOIDFatCloseWorker (    _In_        PDEVICE_OBJECT DeviceObject,    _In_opt_    PVOID Context    )/*++Routine Description:    This routine is a shim between the IO worker package and FatFspClose.Arguments:    DeviceObject - Registration device object, unused    Context - Context value, unusedReturn Value:    None.--*/{    PAGED_CODE();    UNREFERENCED_PARAMETER( DeviceObject );        FsRtlEnterFileSystem();        FatFspClose (Context);        FsRtlExitFileSystem();}
开发者ID:Realhram,项目名称:wdk81,代码行数:32,


示例11: Ext2FastIoWrite

BOOLEANExt2FastIoWrite (    IN PFILE_OBJECT         FileObject,    IN PLARGE_INTEGER       FileOffset,    IN ULONG                Length,    IN BOOLEAN              Wait,    IN ULONG                LockKey,    OUT PVOID               Buffer,    OUT PIO_STATUS_BLOCK    IoStatus,    IN PDEVICE_OBJECT       DeviceObject){    PEXT2_FCB   Fcb = NULL;    BOOLEAN     Status = FALSE;    BOOLEAN     Locked = FALSE;    Fcb = (PEXT2_FCB) FileObject->FsContext;    if (Fcb == NULL)        return FALSE;    __try {        FsRtlEnterFileSystem();        ASSERT((Fcb->Identifier.Type == EXT2FCB) &&               (Fcb->Identifier.Size == sizeof(EXT2_FCB)));        if (IsFlagOn(Fcb->Vcb->Flags, VCB_READ_ONLY)) {            __leave;        }        ExAcquireResourceSharedLite(&Fcb->MainResource, TRUE);        Locked = TRUE;        if (IsEndOfFile(*FileOffset) || ((LONGLONG)(Fcb->Inode->i_size) <                                         (FileOffset->QuadPart + Length)) ) {        } else {            ExReleaseResourceLite(&Fcb->MainResource);            Locked = FALSE;            Status = FsRtlCopyWrite(FileObject, FileOffset, Length, Wait,                                    LockKey, Buffer, IoStatus, DeviceObject);        }    } __finally {        if (Locked) {            ExReleaseResourceLite(&Fcb->MainResource);        }        FsRtlExitFileSystem();    }    DEBUG(DL_IO, ("Ext2FastIoWrite: %wZ Offset: %I64xh Length: %xh Key: %xh Status=%d/n",                   &Fcb->Mcb->ShortName,  FileOffset->QuadPart, Length, LockKey, Status));    return Status;}
开发者ID:Uroc327,项目名称:ext2fsd,代码行数:56,


示例12: UDFClose

/*************************************************************************** Function: UDFClose()** Description:*   The I/O Manager will invoke this routine to handle a close*   request** Expected Interrupt Level (for execution) :**  IRQL_PASSIVE_LEVEL (invocation at higher IRQL will cause execution*   to be deferred to a worker thread context)** Return Value: STATUS_SUCCESS**************************************************************************/NTSTATUSNTAPIUDFClose(    PDEVICE_OBJECT  DeviceObject,  // the logical volume device object    PIRP            Irp            // I/O Request Packet    ){    NTSTATUS            RC = STATUS_SUCCESS;    PtrUDFIrpContext    PtrIrpContext = NULL;    BOOLEAN             AreWeTopLevel = FALSE;    AdPrint(("UDFClose: /n"));    FsRtlEnterFileSystem();    ASSERT(DeviceObject);    ASSERT(Irp);    //  If we were called with our file system device object instead of a    //  volume device object, just complete this request with STATUS_SUCCESS    if (UDFIsFSDevObj(DeviceObject)) {        // this is a close of the FSD itself        Irp->IoStatus.Status = RC;        Irp->IoStatus.Information = 0;        IoCompleteRequest(Irp, IO_NO_INCREMENT);        FsRtlExitFileSystem();        return(RC);    }    // set the top level context    AreWeTopLevel = UDFIsIrpTopLevel(Irp);    _SEH2_TRY {        // get an IRP context structure and issue the request        PtrIrpContext = UDFAllocateIrpContext(Irp, DeviceObject);        ASSERT(PtrIrpContext);        RC = UDFCommonClose(PtrIrpContext, Irp);    } _SEH2_EXCEPT(UDFExceptionFilter(PtrIrpContext, _SEH2_GetExceptionInformation())) {        RC = UDFExceptionHandler(PtrIrpContext, Irp);        UDFLogEvent(UDF_ERROR_INTERNAL_ERROR, RC);    } _SEH2_END;    if (AreWeTopLevel) {        IoSetTopLevelIrp(NULL);    }    FsRtlExitFileSystem();    return(RC);}
开发者ID:GYGit,项目名称:reactos,代码行数:71,


示例13: DfsFsdCleanup

NTSTATUSDfsFsdCleanup (    IN PDEVICE_OBJECT DeviceObject,    IN PIRP Irp) {    NTSTATUS Status;    PIRP_CONTEXT IrpContext;    PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( Irp );    PFILE_OBJECT FileObject = IrpSp->FileObject;    TYPE_OF_OPEN TypeOfOpen;    PDFS_VCB Vcb;    PDFS_FCB Fcb;    DfsDbgTrace(+1, Dbg, "DfsFsdCleanup:  Entered/n", 0);    ASSERT(IoIsOperationSynchronous(Irp) == TRUE);    //    // Now, pass through to the device that opened the file for us if the    // file was a redirected open of some kind.    //    if (DeviceObject->DeviceType == FILE_DEVICE_DFS) {        TypeOfOpen = DfsDecodeFileObject( FileObject, &Vcb, &Fcb);        if (TypeOfOpen == RedirectedFileOpen) {            Status = DfsVolumePassThrough(DeviceObject, Irp);            DfsDbgTrace(-1, Dbg, "DfsFsdCleanup: RedirectedOpen.Exit -> %08lx/n", Status );            return Status;        }    }    //    //  TypeOfOpen != RedirectedFileOpen. We do nothing special for cleanup;    //  everything is done in the close routine.    //    FsRtlEnterFileSystem();    Status = STATUS_SUCCESS;    DfsCompleteRequest( NULL, Irp, Status );    FsRtlExitFileSystem();    //    //  And return to our caller    //    DfsDbgTrace(-1, Dbg, "DfsFsdCleanup:  Exit -> %08lx/n", Status);    return Status;}
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:55,


示例14: DfsFsdClose

NTSTATUSDfsFsdClose (    IN PDEVICE_OBJECT DeviceObject,    IN PIRP Irp) {    PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation( Irp );    NTSTATUS Status;    PIRP_CONTEXT IrpContext;    DfsDbgTrace(+1, Dbg, "DfsFsdClose:  Entered/n", 0);    ASSERT(IoIsOperationSynchronous(Irp) == TRUE);    if (DeviceObject->DeviceType == FILE_DEVICE_DFS_VOLUME) {        if (DfsLookupFcb(IrpSp->FileObject) == NULL) {            Status = DfsVolumePassThrough(DeviceObject, Irp);            DfsDbgTrace(-1, Dbg, "DfsFsdClose:  Exit -> %08lx/n", Status );            return Status;        }    }    //    //  Call the common close routine, with blocking allowed if synchronous    //    FsRtlEnterFileSystem();    try {        IrpContext = DfsCreateIrpContext( Irp, CanFsdWait( Irp ) );        Status = DfsCommonClose( IrpContext, Irp );    } except(DfsExceptionFilter( IrpContext, GetExceptionCode(), GetExceptionInformation() )) {        //        //  We had some trouble trying to perform the requested        //  operation, so we'll abort the I/O request with        //  the error status that we get back from the        //  execption code        //        Status = DfsProcessException( IrpContext, Irp, GetExceptionCode() );    }    FsRtlExitFileSystem();    //    //  And return to our caller    //    DfsDbgTrace(-1, Dbg, "DfsFsdClose:  Exit -> %08lx/n", Status);    return Status;}
开发者ID:BillTheBest,项目名称:WinNT4,代码行数:53,


示例15: UDFShutdown

/*************************************************************************** Function: UDFShutdown()** Description:*   All disk-based FSDs can expect to receive this shutdown notification*   request whenever the system is about to be halted gracefully. If you*   design and implement a network redirector, you must register explicitly*   for shutdown notification by invoking the IoRegisterShutdownNotification()*   routine from your driver entry.**   Note that drivers that register to receive shutdown notification get*   invoked BEFORE disk-based FSDs are told about the shutdown notification.** Expected Interrupt Level (for execution) :**  IRQL_PASSIVE_LEVEL** Return Value: Irrelevant.**************************************************************************/NTSTATUSNTAPIUDFShutdown(    PDEVICE_OBJECT   DeviceObject,       // the logical volume device object    PIRP             Irp                 // I/O Request Packet    ){    NTSTATUS         RC = STATUS_SUCCESS;    PtrUDFIrpContext PtrIrpContext = NULL;    BOOLEAN          AreWeTopLevel = FALSE;    KdPrint(("UDFShutDown/n"));//    BrutePoint();    FsRtlEnterFileSystem();    ASSERT(DeviceObject);    ASSERT(Irp);    // set the top level context    AreWeTopLevel = UDFIsIrpTopLevel(Irp);    //ASSERT(!UDFIsFSDevObj(DeviceObject));    _SEH2_TRY {        // get an IRP context structure and issue the request        PtrIrpContext = UDFAllocateIrpContext(Irp, DeviceObject);        if(PtrIrpContext) {            RC = UDFCommonShutdown(PtrIrpContext, Irp);        } else {            RC = STATUS_INSUFFICIENT_RESOURCES;            Irp->IoStatus.Status = RC;            Irp->IoStatus.Information = 0;            // complete the IRP            IoCompleteRequest(Irp, IO_DISK_INCREMENT);        }    } _SEH2_EXCEPT(UDFExceptionFilter(PtrIrpContext, _SEH2_GetExceptionInformation())) {        RC = UDFExceptionHandler(PtrIrpContext, Irp);        UDFLogEvent(UDF_ERROR_INTERNAL_ERROR, RC);    } _SEH2_END;    if (AreWeTopLevel) {        IoSetTopLevelIrp(NULL);    }    FsRtlExitFileSystem();    return(RC);} // end UDFShutdown()
开发者ID:GYGit,项目名称:reactos,代码行数:72,


示例16: do_flush

static void do_flush(device_extension* Vcb) {    FsRtlEnterFileSystem();    acquire_tree_lock(Vcb, TRUE);    if (Vcb->write_trees > 0)        do_write(Vcb);        free_tree_cache(&Vcb->tree_cache);    release_tree_lock(Vcb, TRUE);    FsRtlExitFileSystem();}
开发者ID:Krthkpjr,项目名称:btrfs,代码行数:14,


示例17: NtfsFsdDirectoryControl

NTSTATUSNTAPINtfsFsdDirectoryControl(PDEVICE_OBJECT DeviceObject,                        PIRP Irp){    PNTFS_IRP_CONTEXT IrpContext = NULL;    NTSTATUS Status = STATUS_UNSUCCESSFUL;    DPRINT1("NtfsDirectoryControl() called/n");    FsRtlEnterFileSystem();    ASSERT(DeviceObject);    ASSERT(Irp);    NtfsIsIrpTopLevel(Irp);    IrpContext = NtfsAllocateIrpContext(DeviceObject, Irp);    if (IrpContext)    {        switch (IrpContext->MinorFunction)        {            case IRP_MN_QUERY_DIRECTORY:                Status = NtfsQueryDirectory(IrpContext);                break;            case IRP_MN_NOTIFY_CHANGE_DIRECTORY:                DPRINT1("IRP_MN_NOTIFY_CHANGE_DIRECTORY/n");                Status = STATUS_NOT_IMPLEMENTED;                break;            default:                Status = STATUS_INVALID_DEVICE_REQUEST;                break;        }    }    else        Status = STATUS_INSUFFICIENT_RESOURCES;    Irp->IoStatus.Status = Status;    Irp->IoStatus.Information = 0;    IoCompleteRequest(Irp, IO_NO_INCREMENT);    if (IrpContext)        ExFreePoolWithTag(IrpContext, 'PRIN');    IoSetTopLevelIrp(NULL);    FsRtlExitFileSystem();    return Status;}
开发者ID:hoangduit,项目名称:reactos,代码行数:49,


示例18: DokanBuildRequest

NTSTATUSDokanBuildRequest(PDEVICE_OBJECT DeviceObject, PIRP Irp){    BOOLEAN             AtIrqlPassiveLevel = FALSE;    BOOLEAN             IsTopLevelIrp = FALSE;    NTSTATUS            Status = STATUS_UNSUCCESSFUL;    __try {        __try {            AtIrqlPassiveLevel = (KeGetCurrentIrql() == PASSIVE_LEVEL);            if (AtIrqlPassiveLevel) {                FsRtlEnterFileSystem();            }            if (!IoGetTopLevelIrp()) {                IsTopLevelIrp = TRUE;                IoSetTopLevelIrp(Irp);            }            Status = DokanDispatchRequest(DeviceObject, Irp);        }        __except (DokanExceptionFilter(Irp, GetExceptionInformation()))        {            Status = DokanExceptionHandler(DeviceObject, Irp, GetExceptionCode());        }    }    __finally {        if (IsTopLevelIrp) {            IoSetTopLevelIrp(NULL);        }        if (AtIrqlPassiveLevel) {            FsRtlExitFileSystem();        }    }    return Status;}
开发者ID:nmlgc,项目名称:dokany,代码行数:45,


示例19: Ext2Close

/*************************************************************************** Function: Ext2Close()** Description:*	The I/O Manager will invoke this routine to handle a close*	request** Expected Interrupt Level (for execution) :**  IRQL_PASSIVE_LEVEL (invocation at higher IRQL will cause execution*	to be deferred to a worker thread context)** Return Value: Does not matter!**************************************************************************/NTSTATUS NTAPI Ext2Close(PDEVICE_OBJECT		DeviceObject,		// the logical volume device objectPIRP					Irp)					// I/O Request Packet{	NTSTATUS				RC = STATUS_SUCCESS;	PtrExt2IrpContext	PtrIrpContext = NULL;	BOOLEAN				AreWeTopLevel = FALSE;	DebugTrace(DEBUG_TRACE_IRP_ENTRY, "Close IRP Received...", 0);		FsRtlEnterFileSystem();	ASSERT(DeviceObject);	ASSERT(Irp);	// set the top level context	AreWeTopLevel = Ext2IsIrpTopLevel(Irp);	try 	{		// get an IRP context structure and issue the request		PtrIrpContext = Ext2AllocateIrpContext(Irp, DeviceObject);		ASSERT(PtrIrpContext);		RC = Ext2CommonClose(PtrIrpContext, Irp, TRUE);	}	except (Ext2ExceptionFilter(PtrIrpContext, GetExceptionInformation())) 	{		RC = Ext2ExceptionHandler(PtrIrpContext, Irp);		Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);	}	if (AreWeTopLevel) 	{		IoSetTopLevelIrp(NULL);	}	FsRtlExitFileSystem();	return(RC);}
开发者ID:hoangduit,项目名称:reactos,代码行数:61,


示例20: NtfsFsdDispatch

/* * FUNCTION: This function manages IRP for various major functions * ARGUMENTS: *           DriverObject = object describing this driver *           Irp = IRP to be passed to internal functions * RETURNS: Status of I/O Request */NTSTATUS NTAPINtfsFsdDispatch(PDEVICE_OBJECT DeviceObject,                PIRP Irp){  PNTFS_IRP_CONTEXT IrpContext = NULL;  NTSTATUS Status = STATUS_UNSUCCESSFUL;    TRACE_(NTFS, "NtfsFsdDispatch()/n");    FsRtlEnterFileSystem();  ASSERT(DeviceObject);  ASSERT(Irp);    NtfsIsIrpTopLevel(Irp);    IrpContext = NtfsAllocateIrpContext(DeviceObject, Irp);  if (IrpContext)  {    switch (IrpContext->MajorFunction)    {      case IRP_MJ_QUERY_VOLUME_INFORMATION:      {        Status = NtfsQueryVolumeInformation(IrpContext);        break;      }      case IRP_MJ_SET_VOLUME_INFORMATION:      {        Status = NtfsSetVolumeInformation(IrpContext);        break;      }    }  }  else    Status = STATUS_INSUFFICIENT_RESOURCES;	  Irp->IoStatus.Status = Status;  IoCompleteRequest(Irp, IO_NO_INCREMENT);		if (IrpContext)    ExFreePoolWithTag(IrpContext, 'PRIN');	  IoSetTopLevelIrp(NULL);  FsRtlExitFileSystem();  return Status;}
开发者ID:mutoso-mirrors,项目名称:reactos,代码行数:52,


示例21: NpCancelListeningQueueIrp

VOIDNTAPINpCancelListeningQueueIrp(IN PDEVICE_OBJECT DeviceObject,                          IN PIRP Irp){    IoReleaseCancelSpinLock(Irp->CancelIrql);    FsRtlEnterFileSystem();    NpAcquireExclusiveVcb();    RemoveEntryList(&Irp->Tail.Overlay.ListEntry);    FsRtlExitFileSystem();    NpReleaseVcb();    Irp->IoStatus.Status = STATUS_CANCELLED;    IoCompleteRequest(Irp, IO_NAMED_PIPE_INCREMENT);}
开发者ID:hoangduit,项目名称:reactos,代码行数:18,


示例22: do_flush

static void do_flush(device_extension* Vcb) {    LIST_ENTRY rollback;        InitializeListHead(&rollback);        FsRtlEnterFileSystem();    ExAcquireResourceExclusiveLite(&Vcb->tree_lock, TRUE);    if (Vcb->need_write)        do_write(Vcb, &rollback);        free_trees(Vcb);        clear_rollback(&rollback);    ExReleaseResourceLite(&Vcb->tree_lock);    FsRtlExitFileSystem();}
开发者ID:mvardan,项目名称:reactos,代码行数:20,


示例23: VfsDirectoryControl

NTSTATUS DDKAPI VfsDirectoryControl(PDEVICE_OBJECT device, PIRP irp){	NTSTATUS status = STATUS_SUCCESS;	PIRPCONTEXT irp_context = NULL;	BOOLEAN top_level = FALSE;		FsRtlEnterFileSystem();	top_level = LklIsIrpTopLevel(irp);	irp_context = AllocIrpContext(irp, device);	status = CommonDirectoryControl(irp_context, irp);	if (top_level) 		IoSetTopLevelIrp(NULL);	FsRtlExitFileSystem();	return status;}
开发者ID:luciang,项目名称:lklvfs,代码行数:20,


示例24: NpFastWrite

_IRQL_requires_same_BOOLEANNTAPINpFastWrite(    _In_ PFILE_OBJECT FileObject,    _In_ PLARGE_INTEGER FileOffset,    _In_ ULONG Length,    _In_ BOOLEAN Wait,    _In_ ULONG LockKey,    _In_ PVOID Buffer,    _Out_ PIO_STATUS_BLOCK IoStatus,    _In_ PDEVICE_OBJECT DeviceObject){    LIST_ENTRY DeferredList;    BOOLEAN Result;    PAGED_CODE();    InitializeListHead(&DeferredList);    FsRtlEnterFileSystem();    NpAcquireSharedVcb();    Result = NpCommonWrite(FileObject,                           Buffer,                           Length,                           PsGetCurrentThread(),                           IoStatus,                           NULL,                           &DeferredList);    if (Result)        ++NpFastWriteTrue;    else        ++NpFastWriteFalse;    NpReleaseVcb();    NpCompleteDeferredIrps(&DeferredList);    FsRtlExitFileSystem();    return Result;}
开发者ID:hoangduit,项目名称:reactos,代码行数:40,


示例25: FspIopCompleteCanceledIrp

VOID FspIopCompleteCanceledIrp(PIRP Irp){    PAGED_CODE();    DEBUGLOGIRP(Irp, STATUS_CANCELLED);    /*     * An IRP cancel may happen at any time including when APC's are still enabled.     * For this reason we execute FsRtlEnterFileSystem/FsRtlExitFileSystem here.     * This will protect ERESOURCE operations during Request finalizations.     */    FsRtlEnterFileSystem();    PIRP TopLevelIrp = IoGetTopLevelIrp();    IoSetTopLevelIrp(Irp);    FspIopCompleteIrpEx(Irp, STATUS_CANCELLED, TRUE);    IoSetTopLevelIrp(TopLevelIrp);    FsRtlExitFileSystem();}
开发者ID:billziss-gh,项目名称:winfsp,代码行数:22,


示例26: FatRead

NTSTATUSNTAPIFatRead(PDEVICE_OBJECT DeviceObject, PIRP Irp){    NTSTATUS Status;    BOOLEAN TopLevel, CanWait;    PFAT_IRP_CONTEXT IrpContext;    CanWait = TRUE;    TopLevel = FALSE;    Status = STATUS_INVALID_DEVICE_REQUEST;    /* Get CanWait flag */    if (IoGetCurrentIrpStackLocation(Irp)->FileObject != NULL)        CanWait = IoIsOperationSynchronous(Irp);    /* Enter FsRtl critical region */    FsRtlEnterFileSystem();    if (DeviceObject != FatGlobalData.DiskDeviceObject)    {        /* Set Top Level IRP if not set */        TopLevel = FatIsTopLevelIrp(Irp);        /* Build an irp context */        IrpContext = FatBuildIrpContext(Irp, CanWait);        /* Perform the actual read */        Status = FatiRead(IrpContext);        /* Restore top level Irp */        if (TopLevel)            IoSetTopLevelIrp(NULL);    }    /* Leave FsRtl critical region */    FsRtlExitFileSystem();    return Status;}
开发者ID:hoangduit,项目名称:reactos,代码行数:38,


示例27: NpFsdWrite

NTSTATUSNTAPINpFsdWrite(IN PDEVICE_OBJECT DeviceObject,           IN PIRP Irp){    PIO_STACK_LOCATION IoStack;    IO_STATUS_BLOCK IoStatus;    LIST_ENTRY DeferredList;    PAGED_CODE();    NpSlowWriteCalls++;    InitializeListHead(&DeferredList);    IoStack = IoGetCurrentIrpStackLocation(Irp);    FsRtlEnterFileSystem();    NpAcquireSharedVcb();    NpCommonWrite(IoStack->FileObject,                  Irp->UserBuffer,                  IoStack->Parameters.Write.Length,                  Irp->Tail.Overlay.Thread,                  &IoStatus,                  Irp,                  &DeferredList);    NpReleaseVcb();    NpCompleteDeferredIrps(&DeferredList);    FsRtlExitFileSystem();    if (IoStatus.Status != STATUS_PENDING)    {        Irp->IoStatus.Information = IoStatus.Information;        Irp->IoStatus.Status = IoStatus.Status;        IoCompleteRequest(Irp, IO_NAMED_PIPE_INCREMENT);    }    return IoStatus.Status;}
开发者ID:hoangduit,项目名称:reactos,代码行数:38,


示例28: VfsFileSystemControl

////	IRP_MJ_FILE_SYSTEM_CONTROL - is synchronous//NTSTATUS DDKAPI VfsFileSystemControl(PDEVICE_OBJECT device, PIRP irp){	NTSTATUS status = STATUS_SUCCESS;	PIO_STACK_LOCATION stack_location = NULL;	ASSERT(device);	ASSERT(irp);	FsRtlEnterFileSystem();	stack_location = IoGetCurrentIrpStackLocation(irp);	switch (stack_location->MinorFunction) {	case IRP_MN_MOUNT_VOLUME:		status = VfsMountVolume(irp, stack_location);		LklCompleteRequest(irp, status);		break;	case IRP_MN_USER_FS_REQUEST:		status = VfsUserFileSystemRequest(irp, stack_location);		LklCompleteRequest(irp, status);		break;	case IRP_MN_VERIFY_VOLUME:		status = VfsVerifyVolume(irp, stack_location);		LklCompleteRequest(irp, status);		break;	case IRP_MN_LOAD_FILE_SYSTEM:	case IRP_MN_KERNEL_CALL:	    LklCompleteRequest(irp, STATUS_NOT_IMPLEMENTED);		break;	default:		LklCompleteRequest(irp, STATUS_INVALID_DEVICE_REQUEST);		break;	}	FsRtlExitFileSystem();	return status;}
开发者ID:luciang,项目名称:lklvfs,代码行数:41,


示例29: FFSDeQueueRequest

VOIDFFSDeQueueRequest(	IN PVOID Context){	PFFS_IRP_CONTEXT IrpContext;	IrpContext = (PFFS_IRP_CONTEXT) Context;	ASSERT(IrpContext);	ASSERT((IrpContext->Identifier.Type == FFSICX) &&			(IrpContext->Identifier.Size == sizeof(FFS_IRP_CONTEXT)));	__try	{		__try		{			FsRtlEnterFileSystem();			if (!IrpContext->IsTopLevel)			{				IoSetTopLevelIrp((PIRP) FSRTL_FSP_TOP_LEVEL_IRP);			}			FFSDispatchRequest(IrpContext);		}		__except (FFSExceptionFilter(IrpContext, GetExceptionInformation()))		{			FFSExceptionHandler(IrpContext);		}	}	__finally	{		IoSetTopLevelIrp(NULL);		FsRtlExitFileSystem();	}}
开发者ID:layerfsd,项目名称:ffsfsd,代码行数:38,



注:本文中的FsRtlEnterFileSystem函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ FskMemPtrDispose函数代码示例
C++ FromUTF8函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。