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

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

?? datastore.c

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

        SetFlag( InstanceContext->Flags, INSTANCE_CONTEXT_F_METADATA_OPENED );

    }

    if (fileName.Buffer != NULL) {

        FmmFreeUnicodeString( &fileName );
    }

    return status;
}


VOID
FmmCloseMetadata (
    __in PFMM_INSTANCE_CONTEXT InstanceContext
    )
/*++

Routine Description:

    This routine closes the filters handle to the metadata file.

Arguments:

    InstanceContext - Instance context for this instance.

Return Value:

    Void.

Note:

    The caller must hold the instance context resource when this routine is called.


--*/
{
    PAGED_CODE();

    ASSERT( InstanceContext->MetadataHandle );
    ASSERT( InstanceContext->MetadataFileObject );

    DebugTrace( DEBUG_TRACE_METADATA_OPERATIONS,
                ("[Fmm]: Closing metadata file ... (Volume = %p)\n",
                 InstanceContext->Volume ) );

    //
    //  Dereference the file object and close the file handle.
    //

    ObDereferenceObject( InstanceContext->MetadataFileObject );

    InstanceContext->MetadataFileObject = NULL;


    //
    //  Mark the beginning of a file system operation
    //

    FmmBeginFileSystemOperation( InstanceContext );

    FltClose( InstanceContext->MetadataHandle );

    //
    //  Mark the end of a file system operation
    //

    FmmEndFileSystemOperation( InstanceContext );


    InstanceContext->MetadataHandle = NULL;

    //
    //  Reset flag to indicate filter metadata is closed
    //

    ClearFlag( InstanceContext->Flags, INSTANCE_CONTEXT_F_METADATA_OPENED );

}

NTSTATUS
FmmReleaseMetadataFileReferences (
    __inout PFLT_CALLBACK_DATA Cbd
    )
/*++

Routine Description:

    This routine releases all references to the metadata file on the specified instance.

Arguments:

    Cbd                 - Supplies a pointer to the callbackData which
                          declares the requested operation.

Return Value:

    Status

Note:

    This routine takes care of the synchronization needed to access the metadata
    file object and handle

    This routine will also set the MetadataOpenTriggerFileObject in the instance context
    to the file object of the volume that triggered the release of the metadata file
    references.

--*/
{
    NTSTATUS status = STATUS_SUCCESS;
    PFMM_INSTANCE_CONTEXT instanceContext = NULL;

    PAGED_CODE();

    //
    //  Get the instance context
    //

    status = FltGetInstanceContext( Cbd->Iopb->TargetInstance,
                                    &instanceContext );
    if (!NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                    ("[Fmm]: FmmReleaseMetadataFileReferences -> Failed to get instance context.\n") );

        goto FmmReleaseMetadataFileReferencesCleanup;
    }

    //
    //  Acquire exclusive access to the instance context
    //

    FmmAcquireResourceExclusive( &instanceContext->MetadataResouce);

    if (FlagOn( instanceContext->Flags, INSTANCE_CONTEXT_F_TRANSITION)) {

        //
        //  If this instance context is in a transition state, it implies that
        //  the instance context lock has been released while sending an operation
        //  down to the file system. The reason for doing so is to prevent a potential
        //  deadlock if an underlying filter sends an IO to the top of the filter
        //  stack while we are holding the resource
        //
        //  We have managed to acquire this resource in this state of transition.
        //  It would be incorrect to use or modify the instance context in any way
        //  in this situation. So we simply let go.
        //

        status = STATUS_FILE_LOCK_CONFLICT;

        DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                    ("[Fmm]: FmmReleaseMetadataFileReferences -> Failed to get exclusive access to instance context since it is in a state of transition.\n") );
    } else {

        //
        //  Close the metadata file if it is open
        //

        if (FlagOn( instanceContext->Flags, INSTANCE_CONTEXT_F_METADATA_OPENED )) {

            DebugTrace( DEBUG_TRACE_METADATA_OPERATIONS,
                        ("[Fmm]: FmmReleaseMetadataFileReferences -> Releasing references to metadata handle and file object (InstanceContext = %p VolumeFileObject = %p)\n",
                         instanceContext,
                         Cbd->Iopb->TargetFileObject) );

            //
            //  Close the metadata file object
            //

            FmmCloseMetadata( instanceContext );

            //
            //  Save the volume file object for which we are releasing our references
            //

            instanceContext->MetadataOpenTriggerFileObject = Cbd->Iopb->TargetFileObject;
        } else {

            DebugTrace( DEBUG_TRACE_METADATA_OPERATIONS,
                        ("[Fmm]: FmmReleaseMetadataFileReferences -> Exit without attempting to release references to metadata handle and file object (InstanceContext = %p, VolumeFileObject = %p, MetadataOpenTriggerFileObject = %p, MetadataAlreadyOpen = 0x%x)\n",
                         instanceContext,
                         Cbd->Iopb->TargetFileObject,
                         instanceContext->MetadataOpenTriggerFileObject,
                         FlagOn( instanceContext->Flags, INSTANCE_CONTEXT_F_METADATA_OPENED )) );
        }
    }

    //
    //  Relinquish exclusive access to the instance context
    //

    FmmReleaseResource( &instanceContext->MetadataResouce);


FmmReleaseMetadataFileReferencesCleanup:

    //
    // Release the references we have acquired
    //

    if (instanceContext != NULL) {

        FltReleaseContext( instanceContext );
    }


    return status;
}


NTSTATUS
FmmReacquireMetadataFileReferences (
    __inout PFLT_CALLBACK_DATA Cbd
    )
/*++

Routine Description:

    This routine re-acquires references to the metadata file on the specified instance.

Arguments:

    Cbd                 - Supplies a pointer to the callbackData which
                          declares the requested operation.

Return Value:

    Status

Note:

    This routine takes care of the synchronization needed to access the metadata
    file object and handle


    This routine will also NULL the MetadataOpenTriggerFileObject in the instance context
    if it was successfully able to open the metadata file references.


--*/
{

    NTSTATUS status = STATUS_SUCCESS;
    PFMM_INSTANCE_CONTEXT instanceContext = NULL;

    PAGED_CODE();

    //
    //  Get the instance context
    //

    status = FltGetInstanceContext( Cbd->Iopb->TargetInstance,
                                    &instanceContext );
    if (!NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                    ("[Fmm]: FmmReacquireMetadataFileReferences -> Failed to get instance context.\n") );

        goto FmmReacquireMetadataFileReferencesCleanup;
    }

    //
    //  Acquire exclusive access to the instance context
    //

    FmmAcquireResourceExclusive( &instanceContext->MetadataResouce );

    if (FlagOn( instanceContext->Flags, INSTANCE_CONTEXT_F_TRANSITION)) {

        //
        //  If this instance context is in a transition state, it implies that
        //  the instance context lock has been released while sending an operation
        //  down to the file system. The reason for doing so is to prevent a potential
        //  deadlock if an underlying filter sends an IO to the top of the filter
        //  stack while we are holding the resource
        //
        //  We have managed to acquire this resource in this state of transition.
        //  It would be incorrect to use or modify the instance context in any way
        //  in this situation. So we simply let go.
        //

        status = STATUS_FILE_LOCK_CONFLICT;

        DebugTrace( DEBUG_TRACE_ERROR | DEBUG_TRACE_METADATA_OPERATIONS,
                    ("[Fmm]: FmmReacquireMetadataFileReferences -> Failed to get exclusive access to instance context since it is in a state of transition.\n") );
    } else {

        //
        //  Re-open the metadata only if the trigger file object match the file object that
        //  caused this function to be called
        //

        if (instanceContext->MetadataOpenTriggerFileObject == Cbd->Iopb->TargetFileObject) {

            //
            //  Open the filter metadata file (do not read the file since we already have
            //  stuff in memory and do not create if the file does not exist
            //

            if (!FlagOn( instanceContext->Flags, INSTANCE_CONTEXT_F_METADATA_OPENED )) {

                DebugTrace( DEBUG_TRACE_METADATA_OPERATIONS,
                            ("[Fmm]: FmmReacquireMetadataFileReferences -> Re-acquiring references to metadata handle and file object (InstanceContext = %p, VolumeFileObject = %p)\n",
                             instanceContext,
                             Cbd->Iopb->TargetFileObject) );

                status = FmmOpenMetadata( instanceContext,
                                                 FALSE );

                //
                //  Reset the trigger file object since the volume open failed.
                //

                instanceContext->MetadataOpenTriggerFileObject = NULL;

            } else {

                DebugTrace( DEBUG_TRACE_METADATA_OPERATIONS,
                            ("[Fmm]: FmmReacquireMetadataFileReferences -> Exit without attempting to re-acquire references to metadata handle and file object (InstanceContext = %p, VolumeFileObject = %p, MetadataOpenTriggerFileObject = %p, MetadataAlreadyOpen = 0x%x)\n",
                             instanceContext,
                             Cbd->Iopb->TargetFileObject,
                             instanceContext->MetadataOpenTriggerFileObject,
                             FlagOn( instanceContext->Flags, INSTANCE_CONTEXT_F_METADATA_OPENED )) );
            }
        } else {


            DebugTrace( DEBUG_TRACE_METADATA_OPERATIONS,
                        ("[Fmm]: FmmReacquireMetadataFileReferences -> Exit without attempting to re-acquire references to metadata handle and file object (InstanceContext = %p, VolumeFileObject = %p, MetadataOpenTriggerFileObject = %p, MetadataAlreadyOpen = 0x%x)\n",
                         instanceContext,
                         Cbd->Iopb->TargetFileObject,
                         instanceContext->MetadataOpenTriggerFileObject,
                         FlagOn( instanceContext->Flags, INSTANCE_CONTEXT_F_METADATA_OPENED )) );
        }
    }

    //
    //  Relinquish exclusive access to the instance context
    //

    FmmReleaseResource( &instanceContext->MetadataResouce );


FmmReacquireMetadataFileReferencesCleanup:

    //
    // Release the references we have acquired
    //

    if (instanceContext != NULL) {

        FltReleaseContext( instanceContext );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频一区在线播放| 99精品欧美一区二区三区小说| 综合分类小说区另类春色亚洲小说欧美| 欧美精品第一页| 欧美亚洲综合另类| 色婷婷激情综合| 91在线观看视频| 成人毛片老司机大片| 成人亚洲一区二区一| 国产乱国产乱300精品| 狠狠色狠狠色综合| 天堂资源在线中文精品| 亚洲日本韩国一区| 国产精品福利av| 中文字幕不卡三区| 欧美一区二区三区系列电影| 欧美日韩精品一二三区| 欧美日韩一区二区三区在线| 欧美在线免费观看亚洲| 欧美日精品一区视频| 欧美无乱码久久久免费午夜一区 | 韩国v欧美v日本v亚洲v| 久久精品国产精品亚洲红杏| 亚洲成人自拍网| 午夜一区二区三区视频| 午夜久久久久久久久久一区二区| 亚洲欧洲成人av每日更新| 亚洲视频一区二区在线| 亚洲视频一区二区免费在线观看| 亚洲欧美一区二区三区孕妇| 亚洲精品视频在线看| 一区二区三区精品| 亚洲国产成人va在线观看天堂 | 亚洲大片精品永久免费| 五月婷婷久久丁香| 美女爽到高潮91| 国产美女精品一区二区三区| 国产69精品一区二区亚洲孕妇| 粉嫩一区二区三区在线看| 成人高清视频在线观看| 国产精品18久久久久久久久久久久 | 亚洲欧美区自拍先锋| 亚洲自拍偷拍av| 免费在线观看视频一区| 韩国精品免费视频| av高清不卡在线| 欧美一a一片一级一片| 欧美日韩一区 二区 三区 久久精品| 精品视频色一区| 精品卡一卡二卡三卡四在线| 国产欧美视频一区二区| 亚洲美女淫视频| 老司机午夜精品99久久| 狠狠色丁香久久婷婷综| 99久久精品国产一区| 欧美精品色综合| 精品国产乱码久久| 国产精品久久久久久亚洲伦| 亚洲午夜国产一区99re久久| 日本免费新一区视频| 成人黄色a**站在线观看| 欧美午夜精品久久久久久超碰| 欧美成人综合网站| 亚洲国产乱码最新视频| 从欧美一区二区三区| 日韩一区二区三区高清免费看看| 中文字幕中文字幕在线一区 | 亚洲一区二区三区三| 国产乱码一区二区三区| 欧美精品丝袜久久久中文字幕| 国产精品丝袜在线| 国产专区欧美精品| 日韩亚洲欧美一区| 午夜精品福利一区二区三区av| 91性感美女视频| 亚洲国产精品二十页| 精品一区二区三区在线播放| 欧美日韩国产另类不卡| 亚洲最大成人网4388xx| 国产+成+人+亚洲欧洲自线| 欧美成人精品福利| 青青草国产精品97视觉盛宴| 欧美三级三级三级| 亚洲一区二区三区中文字幕 | 91.com视频| 午夜久久久久久电影| 日本二三区不卡| 亚洲乱码国产乱码精品精的特点| 懂色av中文字幕一区二区三区| 欧美tk—视频vk| 美女爽到高潮91| 欧美一区二区三区电影| 日韩成人精品在线| 欧美精品丝袜中出| 日韩av不卡一区二区| 欧美一区二区福利视频| 天天做天天摸天天爽国产一区 | 欧美日韩不卡在线| 亚洲精品高清在线观看| 99精品国产91久久久久久| 国产精品入口麻豆九色| 成人国产视频在线观看| 国产日韩高清在线| zzijzzij亚洲日本少妇熟睡| 中文字幕va一区二区三区| 波多野结衣在线一区| 1区2区3区国产精品| 91网站视频在线观看| 日韩伦理av电影| av成人老司机| 亚洲综合一二三区| 欧美精品久久天天躁| 蜜臀91精品一区二区三区 | 亚洲一区二区视频在线| 欧美色手机在线观看| 亚洲成人免费视频| 欧美日韩视频在线第一区| 奇米精品一区二区三区在线观看一| 欧美日韩午夜在线| 极品瑜伽女神91| 久久九九全国免费| 色综合视频在线观看| 亚洲成av人片一区二区三区| 制服丝袜中文字幕一区| 免费欧美高清视频| 久久久www成人免费无遮挡大片| 高清不卡在线观看av| 中文字幕在线不卡国产视频| 色婷婷av一区二区三区之一色屋| 婷婷中文字幕综合| 久久久亚洲精品一区二区三区| 成人免费视频一区二区| 亚洲精品水蜜桃| 精品久久久久av影院| 成人av电影在线播放| 亚洲国产精品麻豆| 欧美va亚洲va国产综合| 国内久久精品视频| 中文字幕亚洲在| 欧美日韩在线直播| 久久国产三级精品| 中文字幕亚洲区| 4hu四虎永久在线影院成人| 国产69精品久久久久毛片 | 韩日欧美一区二区三区| 国产精品另类一区| 欧美日韩情趣电影| 粉嫩aⅴ一区二区三区四区| 亚洲国产婷婷综合在线精品| 久久亚区不卡日本| 欧美色图片你懂的| 国产99久久精品| 石原莉奈在线亚洲三区| 日本一区二区免费在线观看视频 | 欧美一区二区大片| 91小视频免费观看| 久久精品国产秦先生| 一区二区三区高清| 久久这里只有精品6| 欧美亚洲尤物久久| 国产91对白在线观看九色| 婷婷综合另类小说色区| 国产精品嫩草影院com| 日韩亚洲欧美综合| 欧洲av一区二区嗯嗯嗯啊| 成人午夜在线视频| 久久精品国产亚洲一区二区三区| 一区二区三区四区不卡在线| 久久久久久久久岛国免费| 91精品久久久久久久91蜜桃| 99精品国产视频| 国产suv精品一区二区6| 三级亚洲高清视频| 一区二区三区中文字幕电影| 日本一区二区三区国色天香 | 国产午夜精品美女毛片视频| 欧美精品高清视频| 色哦色哦哦色天天综合| 成人夜色视频网站在线观看| 狠狠色丁香婷婷综合| 免费在线看成人av| 日韩专区一卡二卡| 一区二区三区蜜桃网| 亚洲欧美在线观看| 国产天堂亚洲国产碰碰| 日韩欧美综合在线| 欧美午夜宅男影院| 在线观看成人小视频| 91麻豆成人久久精品二区三区| 国产一区二区三区免费观看| 日本在线不卡视频| 午夜精品免费在线观看| 亚洲午夜激情网页| 亚洲资源在线观看| 一区二区三区 在线观看视频| 综合久久国产九一剧情麻豆| 国产精品久久久久久久午夜片| 久久精品一区四区| 久久久夜色精品亚洲| 久久天天做天天爱综合色|