亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? operations.c

?? miniFilter.rar所有框架代碼以及對應的PPT資料,可以直接拿來進行修改即可完成各種驅動,是你開發微軟新過濾構架驅動所必下資料
?? C
?? 第 1 頁 / 共 3 頁
字號:

            status = FmmReacquireMetadataFileReferences( Cbd );

            if (!NT_SUCCESS( status )) {

                DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                            ("[Fmm]: Failed to re-open metadata with status 0x%x after a successful unlock.\n",
                             status) );

                //
                //  Sanity - we are now in a bad state. The volume was unlocked
                //  but we have not been able to re-acquire references to
                //  our metadata file
                //
                //  Ntfs dismounts and remounts the volume after an unlock. So we ignore
                //  failures to open the metadata with STATUS_INVALID_DEVICE_OBJECT_PARAMETER
                //  because the volume should have been remounted and the metadata file
                //  should have been opened on the newly mounted instance of that volume
                //
                //  Note however, that if this is an implicit lock (used by autoXXX.exe) then
                //  ntfs will not automatically dismount the volume. It relies on the application
                //  to restart the system if it has made any changes to the volume. If the
                //  application has not made any changes then ntfs will simply continue on
                //  after the unlock without dismounting the volume. Hence we cannot assume
                //  that ntfs always dismounts the volume. We need to try to re-acquire
                //  a handle to our metadata file and ignore failure with error
                //  STATUS_INVALID_DEVICE_OBJECT_PARAMETER which indicates that the
                //  volume has dismounted
                //
                //  Also it is always possible to fail with STATUS_INSUFFICIENT_RESOURCES
                //  so we should ignore that as well.
                //
                //  It is also possible to fail if the instance context was in a transition state
                //  so we should ignore STATUS_FILE_LOCK_CONFLICT too.
                //

                ASSERT( (status == STATUS_INVALID_DEVICE_OBJECT_PARAMETER) ||
                        (status == STATUS_INSUFFICIENT_RESOURCES) ||
                        (status == STATUS_FILE_LOCK_CONFLICT) );

                //
                //  There is little use updating the return status since it already has a
                //  failure code from the failed dismount
                //
            }
        }

        //
        //  We don't need to process a volume CleanUp any further
        //

        goto FmmPostCleanupCleanup;
    }


    //
    //  Here the filter can do any further processing it may want to do
    //  in the PostCleanUp Callback
    //

FmmPostCleanupCleanup:

    if (!NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_ERROR,
                    ("[Fmm]: FmmPostCleanup -> Failed with status 0x%x \n",
                    status) );

        //
        //  It does not make sense to fail in the the post op, since the operation has completed
        //

    }


    DebugTrace( DEBUG_TRACE_ALL_IO,
                ("[Fmm]: FmmPostCleanup -> Exit (Cbd = %p, FileObject = %p)\n",
                 Cbd,
                 FltObjects->FileObject) );

    return FLT_POSTOP_FINISHED_PROCESSING;
}


FLT_PREOP_CALLBACK_STATUS
FmmPreFSControl (
    __inout PFLT_CALLBACK_DATA Cbd,
    __in PCFLT_RELATED_OBJECTS FltObjects,
    __deref_out_opt PVOID *CompletionContext
    )
{

    NTSTATUS status;
    FLT_PREOP_CALLBACK_STATUS callbackStatus;

    UNREFERENCED_PARAMETER( CompletionContext );
    UNREFERENCED_PARAMETER( FltObjects );

    PAGED_CODE();

    DebugTrace( DEBUG_TRACE_ALL_IO,
                ("[Fmm]: FmmPreFsCtl -> Enter (FsControlCode = 0x%x, Cbd = %p, FileObject = %p)\n",
                 Cbd->Iopb->Parameters.FileSystemControl.Common.FsControlCode,
                 Cbd,
                 FltObjects->FileObject) );


    //
    //  default to no post-op callback
    //

    callbackStatus = FLT_PREOP_SUCCESS_NO_CALLBACK;


    if (Cbd->Iopb->MinorFunction != IRP_MN_USER_FS_REQUEST) {

        goto FmmPreFSControlCleanup;
    }


    switch (Cbd->Iopb->Parameters.FileSystemControl.Common.FsControlCode) {

    //
    //  System FSCTLs that we are interested in
    //

    case FSCTL_DISMOUNT_VOLUME:
    case FSCTL_LOCK_VOLUME:


        if (FmmTargetIsVolumeOpen( Cbd )) {

            //
            //  Give up the metadata file handle and the metadata file object
            //

            status = FmmReleaseMetadataFileReferences( Cbd );

            if ( NT_SUCCESS( status )) {

                //
                //  Continue with the lock/dismount - we need to check if the
                //  lock operation suceeded in the post-op
                //

                callbackStatus = FLT_PREOP_SYNCHRONIZE;
            } else {

                //
                //  Fail the lock/dismount
                //

                DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                            ("[Fmm]: Failed to release metadata file references with status 0x%x for a volume lock/dismount\n",
                             status) );

                Cbd->IoStatus.Status = status;
                callbackStatus = FLT_PREOP_COMPLETE;
            }
        }
        break;

    case FSCTL_UNLOCK_VOLUME:

        //
        //  We need to handle unlock in the post-op
        //

        callbackStatus = FLT_PREOP_SYNCHRONIZE;
        break;

    }

FmmPreFSControlCleanup:


    DebugTrace( DEBUG_TRACE_ALL_IO,
                ("[Fmm]: FmmPreFsCtl -> Exit (FsControlCode = 0x%x, Cbd = %p, FileObject = %p)\n",
                 Cbd->Iopb->Parameters.FileSystemControl.Common.FsControlCode,
                 Cbd,
                 FltObjects->FileObject) );

    return callbackStatus;

}


FLT_POSTOP_CALLBACK_STATUS
FmmPostFSControl (
    __inout PFLT_CALLBACK_DATA Cbd,
    __in PCFLT_RELATED_OBJECTS FltObjects,
    __in PVOID CompletionContext,
    __in FLT_POST_OPERATION_FLAGS Flags
    )
{

    NTSTATUS status;

    UNREFERENCED_PARAMETER( CompletionContext );
    UNREFERENCED_PARAMETER( Flags );

    PAGED_CODE();

    DebugTrace( DEBUG_TRACE_ALL_IO,
                ("[Fmm]: FmmPostFsCtl -> Enter (FsControlCode = 0x%x, Cbd = %p, FileObject = %p)\n",
                 Cbd->Iopb->Parameters.FileSystemControl.Common.FsControlCode,
                 Cbd,
                 FltObjects->FileObject) );


    if (!FlagOn(Flags,FLTFL_POST_OPERATION_DRAINING)) {

        switch (Cbd->Iopb->Parameters.FileSystemControl.Common.FsControlCode) {

        //
        //  System FSCTLs that we are interested in
        //

        case FSCTL_DISMOUNT_VOLUME:

            if (FmmTargetIsVolumeOpen( Cbd )) {

                if (NT_SUCCESS( Cbd->IoStatus.Status )) {

                    //
                    //  Dismount succeeded - teardown our instance because its no longer valid.
                    //  If we do not tear down this instance, it will stay around until the
                    //  last handle for that volume is closed. This will cause the instance
                    //  enumeration APIs to see multiple instances
                    //

                    status = FltDetachVolume( Globals.Filter, FltObjects->Volume, NULL );

                    if (!NT_SUCCESS( status )) {

                        DebugTrace( DEBUG_TRACE_ERROR,
                                    ("[Fmm]: Failed to detach instance with status 0x%x after a volume dismount\n",
                                     status) );

                        //
                        //  Doesn't make sense to update the status code in the post-op with a
                        //  failure code since the operation has already been performed by the
                        //  file system
                        //
                    }

                } else {

                    //
                    //  The dismount failed - reaquire our references to the metadata file
                    //  handle and the metadata file object
                    //

                    status = FmmReacquireMetadataFileReferences( Cbd );

                    if (!NT_SUCCESS( status )) {

                        DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                                    ("[Fmm]: Failed to re-open metadata with status 0x%x after a failed dismount with status 0x%x\n",
                                     status,
                                     Cbd->IoStatus.Status) );

                        //
                        //  Sanity - we are now in a bad state. The dismount has failed
                        //  but we have not been able to re-acquire references to
                        //  our metadata file
                        //
                        //  It is always possible to fail with STATUS_INSUFFICIENT_RESOURCES
                        //  so we should ignore that.
                        //
                        //  It is also possible to fail if the instance context was in a transition state
                        //  so we should ignore STATUS_FILE_LOCK_CONFLICT too.
                        //

                        ASSERT( (status == STATUS_INSUFFICIENT_RESOURCES) ||
                                (status == STATUS_FILE_LOCK_CONFLICT) );

                        //
                        //  There is little use updating the return status since it already has a
                        //  failure code from the failed dismount
                        //
                    }
                }
            }

            break;

        case FSCTL_LOCK_VOLUME:


            if (FmmTargetIsVolumeOpen( Cbd )) {

                if (!NT_SUCCESS( Cbd->IoStatus.Status )) {

                    //
                    //  The lock failed - reaquired our references to the metadata file
                    //  handle and the metadata file object
                    //

                    status = FmmReacquireMetadataFileReferences( Cbd );

                    if (!NT_SUCCESS( status )) {

                        DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                                    ("[Fmm]: Failed to re-open metadata with status 0x%x after a failed lock with status 0x%x\n",
                                     status,
                                     Cbd->IoStatus.Status) );

                        //
                        //  Sanity - we are now in a bad state. The lock has failed
                        //  but we have not been able to re-acquire references to
                        //  our metadata file
                        //
                        //  It is always possible to fail with STATUS_INSUFFICIENT_RESOURCES
                        //  so we should ignore that.
                        //
                        //  It is also possible to fail if the instance context was in a transition state
                        //  so we should ignore STATUS_FILE_LOCK_CONFLICT too.
                        //

                        ASSERT( (status == STATUS_INSUFFICIENT_RESOURCES) ||
                                (status == STATUS_FILE_LOCK_CONFLICT) );

                        //
                        //  There is little use updating the return status since it already has a
                        //  failure code from the failed lock
                        //

                    }
                } else {

                    //
                    //  The lock operation suceeded - update the MetadataOpenTriggerFileObject in the
                    //  instance context to the File Object on the lock operation suceeded because this
                    //  the file object on close/unlock of which, we need to reacquire our metadata file
                    //  references
                    //

                    status = FmmSetMetadataOpenTriggerFileObject( Cbd );

                    if (!NT_SUCCESS( status )) {

                        DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                                    ("[Fmm]: Failed to update MetadataOpenTriggerFileObject in the instance context with status 0x%x after a successful lock.\n",
                                     status,
                                     Cbd->IoStatus.Status) );

                        //
                        //  Sanity - we are now in a bad state. We have failed to
                        //  set the TriggerFileObject We may not be able to detect
                        //  an unlock operation on which we need to re-acquire our
                        //  metadata file references
                        //

                        ASSERT( status == STATUS_FILE_LOCK_CONFLICT );

                        //
                        //  Doesn't make sense to update the status code in the
                        //  post-op with a failure code since the operation has
                        //  already been performed by the file system
                        //
                    }

                }
            }

            break;

        case FSCTL_UNLOCK_VOLUME:

            if (NT_SUCCESS( Cbd->IoStatus.Status )) {

                //
                //  The unlock suceeded - reaquired our references to the metadata file
                //  handle and the metadata file object
                //

                status = FmmReacquireMetadataFileReferences( Cbd );

                if (!NT_SUCCESS( status )) {

                    DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                                ("[Fmm]: Failed to re-open metadata with status 0x%x after a successful unlock.\n",
                                 status) );

                    //
                    //  Sanity - we are now in a bad state. The volume was unlocked
                    //  but we have not been able to re-acquire references to
                    //  our metadata file
                    //
                    //  Ntfs dismounts and remounts the volume after an unlock. So we ignore
                    //  failures to open the metadata with STATUS_INVALID_DEVICE_OBJECT_PARAMETER
                    //  because the volume should have been remounted and the metadata file
                    //  should have been opened on the newly mounted instance of that volume
                    //
                    //  Note however, that if this is an implicit lock (used by autoXXX.exe) then
                    //  ntfs will not automatically dismount the volume. It relies on the application
                    //  to restart the system if it has made any changes to the volume. If the
                    //  application has not made any changes then ntfs will simply continue on
                    //  after the unlock without dismounting the volume. Hence we cannot assume
                    //  that ntfs always dismounts the volume. We need to try to re-acquire
                    //  a handle to our metadata file and ignore failure with error
                    //  STATUS_INVALID_DEVICE_OBJECT_PARAMETER which indicates that the
                    //  volume has dismounted
                    //
                    //  Also it is always possible to fail with STATUS_INSUFFICIENT_RESOURCES
                    //  so we should ignore that as well.
                    //
                    //  It is also possible to fail if the instance context was in a transition state
                    //  so we should ignore STATUS_FILE_LOCK_CONFLICT too.
                    //

                    ASSERT( (status == STATUS_INVALID_DEVICE_OBJECT_PARAMETER) ||
                            (status == STATUS_INSUFFICIENT_RESOURCES) ||
                            (status == STATUS_FILE_LOCK_CONFLICT) );

                    //
                    //  There is little use updating the return status since it already has a
                    //  failure code from the failed dismount
                    //
                }
            }


            break;

        }
    }

    DebugTrace( DEBUG_TRACE_ALL_IO,
                ("[Fmm]: FmmPostFsCtl -> Exit (FsControlCode = 0x%x, Cbd = %p, FileObject = %p)\n",
                 Cbd->Iopb->Parameters.FileSystemControl.Common.FsControlCode,
                 Cbd,
                 FltObjects->FileObject) );


    return FLT_POSTOP_FINISHED_PROCESSING;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产麻豆精品在线| 久久99这里只有精品| 欧洲在线/亚洲| 欧美主播一区二区三区美女| 在线观看日韩精品| 成人黄色777网| 一区二区三区在线免费观看| 亚洲最色的网站| 激情六月婷婷久久| 97精品国产露脸对白| 777xxx欧美| 日本一区二区免费在线观看视频 | 在线观看日韩av先锋影音电影院| 91丨porny丨首页| 久久综合色一综合色88| 亚洲一区二区三区四区五区黄 | 精品99久久久久久| 一区二区三区资源| 亚洲一区二区五区| 美女爽到高潮91| 国产精品白丝av| 欧美日韩一区精品| 精品精品国产高清一毛片一天堂| 国产精品全国免费观看高清| 亚洲午夜免费视频| 免费在线看成人av| 久久97超碰国产精品超碰| 蜜桃av一区二区在线观看| 成a人片国产精品| 欧美高清视频一二三区| 欧美va亚洲va| 精品国精品国产| 久久久高清一区二区三区| 激情图片小说一区| 欧美性色黄大片| 亚洲欧洲综合另类在线| 国产精品99久久久久久久vr | 精品剧情在线观看| 国产肉丝袜一区二区| 亚洲男人天堂一区| 久久成人18免费观看| 99热国产精品| 精品欧美黑人一区二区三区| 一区在线观看免费| 精品蜜桃在线看| 日韩在线播放一区二区| 92国产精品观看| 中文字幕精品一区二区三区精品| 中文字幕亚洲精品在线观看| 国产精品国产a级| 成人精品高清在线| 国产女主播一区| k8久久久一区二区三区| 久久影视一区二区| 成人中文字幕电影| 国产精品伦理一区二区| 国产精品一二三四区| 国产欧美va欧美不卡在线| 豆国产96在线|亚洲| 亚洲精品免费在线| 亚洲成av人片在www色猫咪| 丁香啪啪综合成人亚洲小说 | 欧美激情综合在线| 日本午夜一区二区| 国产精品伦理在线| 国内成人自拍视频| 亚洲影院久久精品| 国产日产亚洲精品系列| 91久久国产综合久久| 婷婷开心激情综合| 亚洲男同1069视频| 99精品视频在线播放观看| 午夜av区久久| 中文字幕在线不卡国产视频| 欧美精品黑人性xxxx| 99免费精品视频| 国产精品亚洲一区二区三区在线| 亚洲一区视频在线| 一区二区在线观看视频在线观看| 日韩精品一区在线| 91精品国产欧美一区二区成人| 美美哒免费高清在线观看视频一区二区 | 日韩制服丝袜先锋影音| 日本午夜精品一区二区三区电影| 日韩不卡一二三区| 成人国产精品免费观看| 欧美日本一道本| 精品欧美久久久| 无码av中文一区二区三区桃花岛| 久久99国产精品久久99果冻传媒| 成+人+亚洲+综合天堂| 成人一级片在线观看| 高清成人在线观看| 精品处破学生在线二十三| 中文字幕一区二区在线观看| 亚洲主播在线观看| 成人激情开心网| 国产一区二区在线免费观看| 天天综合日日夜夜精品| 国产激情视频一区二区三区欧美| 在线视频中文字幕一区二区| 成人午夜精品在线| 色94色欧美sute亚洲线路二| a亚洲天堂av| 欧美亚洲动漫另类| 精品国产网站在线观看| 亚洲激情自拍偷拍| 美女在线观看视频一区二区| 91色porny| 国产偷国产偷精品高清尤物| 亚洲不卡在线观看| caoporen国产精品视频| 成人h动漫精品| 亚洲欧美在线视频| 国产大片一区二区| 99久久国产综合精品色伊 | 国产精品亲子乱子伦xxxx裸| 国产电影一区在线| 久久夜色精品国产噜噜av| 国产乱码精品一品二品| 精品国产乱码久久久久久图片 | 亚洲大片精品永久免费| 国产成人在线免费观看| 欧美色大人视频| 精品日韩欧美一区二区| 国产精一区二区三区| 中文字幕亚洲区| 精品国产91久久久久久久妲己| 国产九色精品成人porny| 亚洲精选在线视频| 91论坛在线播放| 亚洲高清久久久| 亚洲黄色av一区| 欧美极品少妇xxxxⅹ高跟鞋 | 亚洲国产日韩一区二区| 精品久久久三级丝袜| 国产精品99久久久| 毛片av一区二区| 日韩影院免费视频| 亚洲女女做受ⅹxx高潮| 国产日韩欧美综合一区| 欧美大片国产精品| 91精品在线免费观看| 色婷婷av一区| 91论坛在线播放| 欧美在线免费视屏| 欧美性猛片aaaaaaa做受| 一本大道综合伊人精品热热 | 亚洲图片有声小说| 亚洲成年人网站在线观看| 亚洲午夜久久久| 日韩av一二三| 日产国产高清一区二区三区| 日本一区中文字幕| 亚洲成年人影院| 天天综合天天做天天综合| 精品少妇一区二区三区在线播放| av电影在线观看不卡| 色综合色综合色综合色综合色综合| 成人国产精品免费网站| 在线观看视频91| 久久久久久97三级| 一区二区三区四区不卡视频| 亚洲18色成人| 国产99久久久久| 日韩欧美在线不卡| 亚洲欧美激情在线| 九色porny丨国产精品| 99精品视频一区二区| 日韩一区二区不卡| 最好看的中文字幕久久| 久久草av在线| 在线播放视频一区| 中国色在线观看另类| 水野朝阳av一区二区三区| 亚洲激情自拍偷拍| 激情综合色播激情啊| 91成人免费网站| 日韩欧美国产不卡| 亚洲日本一区二区| 91蜜桃网址入口| 久久亚洲综合av| 蜜桃传媒麻豆第一区在线观看| 成人爽a毛片一区二区免费| 欧美日韩免费视频| 中文字幕一区二区在线播放| 丁香桃色午夜亚洲一区二区三区| 欧美三级中文字幕| 日本vs亚洲vs韩国一区三区 | 大美女一区二区三区| 国产欧美综合在线观看第十页| 另类中文字幕网| 久久亚洲影视婷婷| 丁香一区二区三区| 亚洲欧美综合网| 欧美精选午夜久久久乱码6080| 亚洲你懂的在线视频| 欧美一区二区三区人| 国产激情一区二区三区| 中文字幕av一区二区三区免费看 |