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

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

?? ctxinit.c

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

        //
        //  Delete the resource and memory the memory allocated for the resource
        //

        if (streamContext->Resource != NULL) {

            ExDeleteResourceLite( streamContext->Resource );
            CtxFreeResource( streamContext->Resource );
        }

        //
        //  Free the file name
        //

        if (streamContext->FileName.Buffer != NULL) {

            CtxFreeUnicodeString(&streamContext->FileName);
        }

        DebugTrace( DEBUG_TRACE_STREAM_CONTEXT_OPERATIONS,
                    ("[Ctx]: Stream context cleanup complete.\n") );

        break;

    case FLT_STREAMHANDLE_CONTEXT:

        streamHandleContext = (PCTX_STREAMHANDLE_CONTEXT) Context;

        DebugTrace( DEBUG_TRACE_STREAMHANDLE_CONTEXT_OPERATIONS,
                    ("[Ctx]: Cleaning up stream handle context for file %wZ (StreamContext = %p)\n",
                     &streamHandleContext->FileName,
                     streamHandleContext) );

        //
        //  Delete the resource and memory the memory allocated for the resource
        //

        if (streamHandleContext->Resource != NULL) {

            ExDeleteResourceLite( streamHandleContext->Resource );
            CtxFreeResource( streamHandleContext->Resource );
        }

        //
        //  Free the file name
        //

        if (streamHandleContext->FileName.Buffer != NULL) {

            CtxFreeUnicodeString(&streamHandleContext->FileName);
        }

        DebugTrace( DEBUG_TRACE_STREAMHANDLE_CONTEXT_OPERATIONS,
                    ("[Ctx]: Stream handle context cleanup complete.\n") );

        break;

    }

}

//
//  Instance setup/teardown routines.
//

NTSTATUS
CtxInstanceSetup (
    __in PCFLT_RELATED_OBJECTS FltObjects,
    __in FLT_INSTANCE_SETUP_FLAGS Flags,
    __in DEVICE_TYPE VolumeDeviceType,
    __in FLT_FILESYSTEM_TYPE VolumeFilesystemType
    )
/*++

Routine Description:

    This routine is called whenever a new instance is created on a volume. This
    gives us a chance to decide if we need to attach to this volume or not.

Arguments:

    FltObjects - Pointer to the FLT_RELATED_OBJECTS data structure containing
        opaque handles to this filter, instance and its associated volume.

    Flags - Flags describing the reason for this attach request.

Return Value:

    STATUS_SUCCESS - attach
    STATUS_FLT_DO_NOT_ATTACH - do not attach

--*/
{
    PCTX_INSTANCE_CONTEXT instanceContext = NULL;
    NTSTATUS status = STATUS_SUCCESS;
    ULONG volumeNameLength;

    UNREFERENCED_PARAMETER( Flags );
    UNREFERENCED_PARAMETER( VolumeDeviceType );
    UNREFERENCED_PARAMETER( VolumeFilesystemType );

    PAGED_CODE();

    DebugTrace( DEBUG_TRACE_INSTANCES,
                ("[Ctx]: Instance setup started (Volume = %p, Instance = %p)\n",
                 FltObjects->Volume,
                 FltObjects->Instance) );


    //
    //  Allocate and initialize the context for this volume
    //


    //
    //  Allocate the instance context
    //

    DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS,
                ("[Ctx]: Allocating instance context (Volume = %p, Instance = %p)\n",
                 FltObjects->Volume,
                 FltObjects->Instance) );

    status = FltAllocateContext( FltObjects->Filter,
                                 FLT_INSTANCE_CONTEXT,
                                 CTX_INSTANCE_CONTEXT_SIZE,
                                 NonPagedPool,
                                 &instanceContext );

    if (!NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS | DEBUG_TRACE_ERROR,
                    ("[Ctx]: Failed to allocate instance context (Volume = %p, Instance = %p, Status = 0x%x)\n",
                     FltObjects->Volume,
                     FltObjects->Instance,
                     status) );

        goto CtxInstanceSetupCleanup;
    }

    //
    //  Get the NT volume name length
    //

    status = FltGetVolumeName( FltObjects->Volume, NULL, &volumeNameLength );

    if( !NT_SUCCESS( status ) &&
        (status != STATUS_BUFFER_TOO_SMALL) ) {

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS | DEBUG_TRACE_ERROR,
                    ("[Ctx]: Unexpected failure in FltGetVolumeName. (Volume = %p, Instance = %p, Status = 0x%x)\n",
                     FltObjects->Volume,
                     FltObjects->Instance,
                     status) );

        goto CtxInstanceSetupCleanup;
    }

    //
    //  Allocate a string big enough to take the volume name
    //

    instanceContext->VolumeName.MaximumLength = (USHORT) volumeNameLength;
    status = CtxAllocateUnicodeString( &instanceContext->VolumeName );

    if( !NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS | DEBUG_TRACE_ERROR,
                    ("[Ctx]: Failed to allocate volume name string. (Volume = %p, Instance = %p, Status = 0x%x)\n",
                     FltObjects->Volume,
                     FltObjects->Instance,
                     status) );

        goto CtxInstanceSetupCleanup;
    }

    //
    //  Get the NT volume name
    //

    status = FltGetVolumeName( FltObjects->Volume, &instanceContext->VolumeName, &volumeNameLength );

    if( !NT_SUCCESS( status ) ) {

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS | DEBUG_TRACE_ERROR,
                    ("[Ctx]: Unexpected failure in FltGetVolumeName. (Volume = %p, Instance = %p, Status = 0x%x)\n",
                     FltObjects->Volume,
                     FltObjects->Instance,
                     status) );

        goto CtxInstanceSetupCleanup;
    }


    instanceContext->Instance = FltObjects->Instance;
    instanceContext->Volume = FltObjects->Volume;

    //
    //  Set the instance context.
    //

    DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS,
                ("[Ctx]: Setting instance context %p for volume %wZ (Volume = %p, Instance = %p)\n",
                 instanceContext,
                 &instanceContext->VolumeName,
                 FltObjects->Volume,
                 FltObjects->Instance) );

    status = FltSetInstanceContext( FltObjects->Instance,
                                    FLT_SET_CONTEXT_KEEP_IF_EXISTS,
                                    instanceContext,
                                    NULL );

    if( !NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_INSTANCES | DEBUG_TRACE_ERROR,
                    ("[Ctx]: Failed to set instance context for volume %wZ (Volume = %p, Instance = %p, Status = 0x%08X)\n",
                     &instanceContext->VolumeName,
                     FltObjects->Volume,
                     FltObjects->Instance,
                     status) );
        goto CtxInstanceSetupCleanup;
    }


CtxInstanceSetupCleanup:

    //
    //  If FltAllocateContext suceeded then we MUST release the context,
    //  irrespective of whether FltSetInstanceContext suceeded or not.
    //
    //  FltAllocateContext increments the ref count by one.
    //  A successful FltSetInstanceContext increments the ref count by one
    //  and also associates the context with the file system object
    //
    //  FltReleaseContext decrements the ref count by one.
    //
    //  When FltSetInstanceContext succeeds, calling FltReleaseContext will
    //  leave the context with a ref count of 1 corresponding to the internal
    //  reference to the context from the file system structures
    //
    //  When FltSetInstanceContext fails, calling FltReleaseContext will
    //  leave the context with a ref count of 0 which is correct since
    //  there is no reference to the context from the file system structures
    //

    if ( instanceContext != NULL ) {

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS,
                    ("[Ctx]: Releasing instance context %p (Volume = %p, Instance = %p)\n",
                     instanceContext,
                     FltObjects->Volume,
                     FltObjects->Instance) );

        FltReleaseContext( instanceContext );
    }


    if (NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_INSTANCES,
                    ("[Ctx]: Instance setup complete (Volume = %p, Instance = %p). Filter will attach to the volume.\n",
                     FltObjects->Volume,
                     FltObjects->Instance) );
    } else {

        DebugTrace( DEBUG_TRACE_INSTANCES,
                    ("[Ctx]: Instance setup complete (Volume = %p, Instance = %p). Filter will not attach to the volume.\n",
                     FltObjects->Volume,
                     FltObjects->Instance) );
    }

    return status;
}


NTSTATUS
CtxInstanceQueryTeardown (
    __in PCFLT_RELATED_OBJECTS FltObjects,
    __in FLT_INSTANCE_QUERY_TEARDOWN_FLAGS Flags
    )
/*++

Routine Description:

    This is called when an instance is being manually deleted by a
    call to FltDetachVolume or FilterDetach thereby giving us a
    chance to fail that detach request.

Arguments:

    FltObjects - Pointer to the FLT_RELATED_OBJECTS data structure containing
        opaque handles to this filter, instance and its associated volume.

    Flags - Indicating where this detach request came from.

Return Value:

    Returns the status of this operation.

--*/
{
    UNREFERENCED_PARAMETER( FltObjects );
    UNREFERENCED_PARAMETER( Flags );

    PAGED_CODE();

    DebugTrace( DEBUG_TRACE_INSTANCES,
                ("[Ctx]: Instance query teardown started (Instance = %p)\n",
                 FltObjects->Instance) );


    DebugTrace( DEBUG_TRACE_INSTANCES,
                ("[Ctx]: Instance query teadown ended (Instance = %p)\n",
                 FltObjects->Instance) );
    return STATUS_SUCCESS;
}


VOID
CtxInstanceTeardownStart (
    __in PCFLT_RELATED_OBJECTS FltObjects,
    __in FLT_INSTANCE_TEARDOWN_FLAGS Flags
    )
/*++

Routine Description:

    This routine is called at the start of instance teardown.

Arguments:

    FltObjects - Pointer to the FLT_RELATED_OBJECTS data structure containing
        opaque handles to this filter, instance and its associated volume.

    Flags - Reason why this instance is been deleted.

Return Value:

    None.

--*/
{
    UNREFERENCED_PARAMETER( FltObjects );
    UNREFERENCED_PARAMETER( Flags );

    PAGED_CODE();

    DebugTrace( DEBUG_TRACE_INSTANCES,
                ("[Ctx]: Instance teardown start started (Instance = %p)\n",
                 FltObjects->Instance) );


    DebugTrace( DEBUG_TRACE_INSTANCES,
                ("[Ctx]: Instance teardown start ended (Instance = %p)\n",
                 FltObjects->Instance) );
}


VOID
CtxInstanceTeardownComplete (
    __in PCFLT_RELATED_OBJECTS FltObjects,
    __in FLT_INSTANCE_TEARDOWN_FLAGS Flags
    )
/*++

Routine Description:

    This routine is called at the end of instance teardown.

Arguments:

    FltObjects - Pointer to the FLT_RELATED_OBJECTS data structure containing
        opaque handles to this filter, instance and its associated volume.

    Flags - Reason why this instance is been deleted.

Return Value:

    None.

--*/
{
    PCTX_INSTANCE_CONTEXT instanceContext;
    NTSTATUS status;

    UNREFERENCED_PARAMETER( Flags );

    PAGED_CODE();

    DebugTrace( DEBUG_TRACE_INSTANCES,
                ("[Ctx]: Instance teardown complete started (Instance = %p)\n",
                 FltObjects->Instance) );

    DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS,
                ("[Ctx]: Getting instance context (Volume = %p, Instance = %p)\n",
                 FltObjects->Volume,
                 FltObjects->Instance) );

    status = FltGetInstanceContext( FltObjects->Instance,
                                    &instanceContext );

    if (NT_SUCCESS( status )) {

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS,
                    ("[Ctx]: Instance teardown for volume %wZ (Volume = %p, Instance = %p, InstanceContext = %p)\n",
                     &instanceContext->VolumeName,
                     FltObjects->Volume,
                     FltObjects->Instance,
                     instanceContext) );


        //
        //  Here the filter may perform any teardown of its own structures associated
        //  with this instance.
        //
        //  The filter should not free memory or synchronization objects allocated to
        //  objects within the instance context. That should be performed in the
        //  cleanup callback for the instance context
        //

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS,
                    ("[Ctx]: Releasing instance context %p for volume %wZ (Volume = %p, Instance = %p)\n",
                     instanceContext,
                     &instanceContext->VolumeName,
                     FltObjects->Volume,
                     FltObjects->Instance) );

        FltReleaseContext( instanceContext );
    } else {

        DebugTrace( DEBUG_TRACE_INSTANCE_CONTEXT_OPERATIONS | DEBUG_TRACE_ERROR,
                    ("[Ctx]: Failed to get instance context (Volume = %p, Instance = %p Status = 0x%x)\n",
                     FltObjects->Volume,
                     FltObjects->Instance,
                     status) );
    }

    DebugTrace( DEBUG_TRACE_INSTANCES,
                ("[Ctx]: Instance teardown complete ended (Instance = %p)\n",
                 FltObjects->Instance) );
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久精品人人做人人爽50路| 欧美日韩国产乱码电影| 欧美亚洲精品一区| 久久久精品欧美丰满| 婷婷久久综合九色综合伊人色| 国产成人精品影视| 91精品国产高清一区二区三区 | 亚洲成av人片www| 国产精品123| 欧美成人综合网站| 午夜精品在线视频一区| 91麻豆国产香蕉久久精品| 久久九九影视网| 精品一区二区在线免费观看| 精品视频999| 亚洲国产毛片aaaaa无费看| 99视频在线精品| 国产精品久久综合| 高清不卡在线观看| 国产精品免费久久久久| 粉嫩久久99精品久久久久久夜| 久久网这里都是精品| 精品一区二区三区在线播放视频 | 亚洲精品一区二区三区香蕉| 亚洲成人动漫在线免费观看| 欧美亚洲一区三区| 亚洲欧洲成人av每日更新| 成人国产精品免费网站| 欧美激情一二三区| 成人精品高清在线| 亚洲欧洲国产专区| 色视频一区二区| 亚洲自拍偷拍欧美| 欧美日韩国产欧美日美国产精品| 五月婷婷综合激情| 日韩一区二区三区四区五区六区 | 一区二区高清视频在线观看| 91在线视频官网| 亚洲激情成人在线| 欧美亚洲禁片免费| 日韩不卡一区二区三区| 日韩亚洲欧美在线观看| 国产制服丝袜一区| 国产精品久久久久婷婷| 在线看一区二区| 天堂蜜桃91精品| 亚洲精品在线网站| 丁香激情综合国产| 一区二区三区久久| 日韩一区二区免费视频| 国产一区二区美女| 一区二区三区在线高清| 欧美一区二区精美| 国产激情一区二区三区四区| 国产精品不卡在线| 欧美日韩国产高清一区| 国产一区二区三区高清播放| 中文字幕一区三区| 日韩一区二区在线免费观看| 国产精品综合网| 亚洲精品日日夜夜| 欧美成人一区二区三区片免费 | 国精产品一区一区三区mba桃花 | 天天综合色天天| 久久久精品免费网站| 欧美在线播放高清精品| 久久国产精品72免费观看| 国产精品色在线| 在线播放中文一区| 9i在线看片成人免费| 男人的天堂亚洲一区| 中文字幕不卡的av| 日韩一区国产二区欧美三区| 色综合咪咪久久| 精品一区二区三区免费观看| 亚洲最色的网站| 久久久美女艺术照精彩视频福利播放| 色吊一区二区三区| 国产91在线观看丝袜| 免费观看30秒视频久久| 亚洲人精品午夜| 国产亚洲午夜高清国产拍精品| 在线精品视频一区二区| 国产+成+人+亚洲欧洲自线| 免费不卡在线视频| 亚洲一区二区综合| 中文字幕在线不卡一区二区三区| 欧美成人猛片aaaaaaa| 欧美性极品少妇| 色综合久久综合网欧美综合网 | 国产伦精品一区二区三区免费迷| 亚洲国产精品久久人人爱| 国产免费成人在线视频| 欧美成人精品二区三区99精品| 欧美日韩国产影片| 日本精品免费观看高清观看| 成人免费看黄yyy456| 国产一区二区三区在线观看免费| 午夜视频在线观看一区二区三区| 亚洲三级在线看| 国产精品黄色在线观看| 久久久精品欧美丰满| 久久久午夜电影| 久久久久久久国产精品影院| 欧美电视剧免费全集观看| 日韩欧美一区中文| 日韩一区二区在线观看视频播放| 7878成人国产在线观看| 欧美日本一区二区三区| 在线欧美日韩精品| 欧美性videosxxxxx| 欧美日韩在线三级| 51精品久久久久久久蜜臀| 欧美精品v日韩精品v韩国精品v| 欧美亚洲高清一区| 欧美日韩你懂得| 欧美一区二区三区免费观看视频| 91精品国产91综合久久蜜臀| 91麻豆精品国产91| 欧美mv日韩mv国产网站| 欧美r级在线观看| 久久嫩草精品久久久久| 国产蜜臀97一区二区三区| 中文字幕色av一区二区三区| 一区在线观看视频| 亚洲一区二区三区中文字幕 | 欧美浪妇xxxx高跟鞋交| 欧美一级电影网站| 久久精品视频免费| 自拍偷在线精品自拍偷无码专区 | 欧亚洲嫩模精品一区三区| 欧美日韩在线亚洲一区蜜芽| 69堂亚洲精品首页| 精品国产电影一区二区| 亚洲国产精品二十页| 亚洲欧美日韩综合aⅴ视频| 亚洲综合精品久久| 久久精品国产一区二区三| 成人性生交大片免费看在线播放| 不卡的av电影在线观看| 欧美日韩极品在线观看一区| 日韩片之四级片| 日韩理论电影院| 日韩成人一区二区| 丁香一区二区三区| 欧美日韩精品一区二区三区 | 亚洲一区二区在线免费看| 午夜精品国产更新| 国产成人精品亚洲午夜麻豆| 91麻豆国产在线观看| 日韩欧美成人一区| 一区二区日韩电影| 国产一区二区久久| 精品视频一区三区九区| 久久久一区二区| 亚洲第一电影网| 成人av免费在线播放| 日韩欧美不卡一区| 亚洲一区二区三区视频在线播放 | 国产成人精品影视| 色就色 综合激情| 不卡电影一区二区三区| 欧美性猛交xxxxxx富婆| 久久久亚洲精品一区二区三区| 国产精品欧美一级免费| 日韩二区三区在线观看| 99精品视频在线播放观看| 欧美一级一区二区| 一区二区不卡在线视频 午夜欧美不卡在 | 欧美一区二区成人6969| 亚洲色图在线视频| 国产成人免费视频网站| 欧美一区二区三级| 一个色在线综合| a亚洲天堂av| 久久久青草青青国产亚洲免观| 亚洲va欧美va人人爽午夜| jlzzjlzz欧美大全| 欧美高清在线精品一区| 国产一区福利在线| 精品美女被调教视频大全网站| 一区二区三区不卡在线观看 | 一区二区三区在线视频免费观看| 国产老肥熟一区二区三区| 日韩欧美国产综合一区| 偷拍与自拍一区| 欧美三级视频在线| 亚洲精品乱码久久久久久久久 | 一本大道av伊人久久综合| 国产亚洲精品免费| 国产成人在线看| 久久久一区二区| 国产成人午夜高潮毛片| 久久精品视频一区二区三区| 六月丁香综合在线视频| 欧美mv和日韩mv的网站| 精品在线亚洲视频| 久久免费看少妇高潮| 国产福利一区在线观看| 欧美激情综合在线|