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

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

?? class.c

?? This is the library for all storage drivers. It simplifies writing a storage driver by implementing
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*++

Copyright (C) Microsoft Corporation, 1991 - 1999

Module Name:

    class.c

Abstract:

    SCSI class driver routines

Environment:

    kernel mode only

Notes:


Revision History:

--*/

#define CLASS_INIT_GUID 1
#include "classp.h"
#include "debug.h"

#ifdef ALLOC_PRAGMA
    #pragma alloc_text(INIT, DriverEntry)
    #pragma alloc_text(PAGE, ClassAddDevice)
    #pragma alloc_text(PAGE, ClassClaimDevice)
    #pragma alloc_text(PAGE, ClassCreateDeviceObject)
    #pragma alloc_text(PAGE, ClassDispatchPnp)
    #pragma alloc_text(PAGE, ClassGetDescriptor)
    #pragma alloc_text(PAGE, ClassGetPdoId)
    #pragma alloc_text(PAGE, ClassInitialize)
    #pragma alloc_text(PAGE, ClassInitializeEx)
    #pragma alloc_text(PAGE, ClassInvalidateBusRelations)
    #pragma alloc_text(PAGE, ClassMarkChildMissing)
    #pragma alloc_text(PAGE, ClassMarkChildrenMissing)
    #pragma alloc_text(PAGE, ClassModeSense)
    #pragma alloc_text(PAGE, ClassPnpQueryFdoRelations)
    #pragma alloc_text(PAGE, ClassPnpStartDevice)
    #pragma alloc_text(PAGE, ClassQueryPnpCapabilities)
    #pragma alloc_text(PAGE, ClassQueryTimeOutRegistryValue)
    #pragma alloc_text(PAGE, ClassRemoveDevice)
    #pragma alloc_text(PAGE, ClassRetrieveDeviceRelations)
    #pragma alloc_text(PAGE, ClassUpdateInformationInRegistry)
    #pragma alloc_text(PAGE, ClassSendDeviceIoControlSynchronous)
    #pragma alloc_text(PAGE, ClassUnload)
    #pragma alloc_text(PAGE, ClasspAllocateReleaseRequest)
    #pragma alloc_text(PAGE, ClasspFreeReleaseRequest)
    #pragma alloc_text(PAGE, ClasspInitializeHotplugInfo)
    #pragma alloc_text(PAGE, ClasspRegisterMountedDeviceInterface)
    #pragma alloc_text(PAGE, ClasspScanForClassHacks)
    #pragma alloc_text(PAGE, ClasspScanForSpecialInRegistry)
#endif

ULONG ClassPnpAllowUnload = TRUE;
ULONG ClassMaxInterleavePerCriticalIo = CLASS_MAX_INTERLEAVE_PER_CRITICAL_IO;
CONST LARGE_INTEGER Magic10000 = {0xe219652c, 0xd1b71758};

#define FirstDriveLetter 'C'
#define LastDriveLetter  'Z'



/*++////////////////////////////////////////////////////////////////////////////

DriverEntry()

Routine Description:

    Temporary entry point needed to initialize the class system dll.
    It doesn't do anything.

Arguments:

    DriverObject - Pointer to the driver object created by the system.

Return Value:

   STATUS_SUCCESS

--*/
NTSTATUS
DriverEntry(
    IN PDRIVER_OBJECT DriverObject,
    IN PUNICODE_STRING RegistryPath
    )
{
    return STATUS_SUCCESS;
}




/*++////////////////////////////////////////////////////////////////////////////

ClassInitialize()

Routine Description:

    This routine is called by a class driver during its
    DriverEntry routine to initialize the driver.

Arguments:

    Argument1          - Driver Object.
    Argument2          - Registry Path.
    InitializationData - Device-specific driver's initialization data.

Return Value:

    A valid return code for a DriverEntry routine.

--*/
ULONG
ClassInitialize(
    IN  PVOID            Argument1,
    IN  PVOID            Argument2,
    IN  PCLASS_INIT_DATA InitializationData
    )
{
    PDRIVER_OBJECT  DriverObject = Argument1;
    PUNICODE_STRING RegistryPath = Argument2;

    PCLASS_DRIVER_EXTENSION driverExtension;

    NTSTATUS        status;

    PAGED_CODE();

    DebugPrint((3,"\n\nSCSI Class Driver\n"));

    ClasspInitializeDebugGlobals();

    //
    // Validate the length of this structure. This is effectively a
    // version check.
    //

    if (InitializationData->InitializationDataSize != sizeof(CLASS_INIT_DATA)) {

        //
        // This DebugPrint is to help third-party driver writers
        //

        DebugPrint((0,"ClassInitialize: Class driver wrong version\n"));
        return (ULONG) STATUS_REVISION_MISMATCH;
    }

    //
    // Check that each required entry is not NULL. Note that Shutdown, Flush and Error
    // are not required entry points.
    //

    if ((!InitializationData->FdoData.ClassDeviceControl) ||
        (!((InitializationData->FdoData.ClassReadWriteVerification) ||
           (InitializationData->ClassStartIo))) ||
        (!InitializationData->ClassAddDevice) ||
        (!InitializationData->FdoData.ClassStartDevice)) {

        //
        // This DebugPrint is to help third-party driver writers
        //

        DebugPrint((0,
            "ClassInitialize: Class device-specific driver missing required "
            "FDO entry\n"));

        return (ULONG) STATUS_REVISION_MISMATCH;
    }

    if ((InitializationData->ClassEnumerateDevice) &&
        ((!InitializationData->PdoData.ClassDeviceControl) ||
         (!InitializationData->PdoData.ClassStartDevice) ||
         (!((InitializationData->PdoData.ClassReadWriteVerification) ||
            (InitializationData->ClassStartIo))))) {

        //
        // This DebugPrint is to help third-party driver writers
        //

        DebugPrint((0, "ClassInitialize: Class device-specific missing "
                       "required PDO entry\n"));

        return (ULONG) STATUS_REVISION_MISMATCH;
    }

    if((InitializationData->FdoData.ClassStopDevice == NULL) ||
        ((InitializationData->ClassEnumerateDevice != NULL) &&
         (InitializationData->PdoData.ClassStopDevice == NULL))) {

        //
        // This DebugPrint is to help third-party driver writers
        //

        DebugPrint((0, "ClassInitialize: Class device-specific missing "
                       "required PDO entry\n"));
        ASSERT(FALSE);
        return (ULONG) STATUS_REVISION_MISMATCH;
    }

    //
    // Setup the default power handlers if the class driver didn't provide
    // any.
    //

    if(InitializationData->FdoData.ClassPowerDevice == NULL) {
        InitializationData->FdoData.ClassPowerDevice = ClassMinimalPowerHandler;
    }

    if((InitializationData->ClassEnumerateDevice != NULL) &&
       (InitializationData->PdoData.ClassPowerDevice == NULL)) {
        InitializationData->PdoData.ClassPowerDevice = ClassMinimalPowerHandler;
    }

    //
    // warn that unload is not supported
    //
    // ISSUE-2000/02/03-peterwie
    // We should think about making this a fatal error.
    //

    if(InitializationData->ClassUnload == NULL) {

        //
        // This DebugPrint is to help third-party driver writers
        //

        DebugPrint((0, "ClassInitialize: driver does not support unload %wZ\n",
                    RegistryPath));
    }

    //
    // Create an extension for the driver object
    //

    status = IoAllocateDriverObjectExtension(DriverObject,
                                             CLASS_DRIVER_EXTENSION_KEY,
                                             sizeof(CLASS_DRIVER_EXTENSION),
                                             &driverExtension);

    if(NT_SUCCESS(status)) {

        //
        // Copy the registry path into the driver extension so we can use it later
        //

        driverExtension->RegistryPath.Length = RegistryPath->Length;
        driverExtension->RegistryPath.MaximumLength = RegistryPath->MaximumLength;

        driverExtension->RegistryPath.Buffer =
            ExAllocatePoolWithTag(PagedPool,
                                  RegistryPath->MaximumLength,
                                  '1CcS');

        if(driverExtension->RegistryPath.Buffer == NULL) {

            status = STATUS_INSUFFICIENT_RESOURCES;
            return status;
        }

        RtlCopyUnicodeString(
            &(driverExtension->RegistryPath),
            RegistryPath);

        //
        // Copy the initialization data into the driver extension so we can reuse
        // it during our add device routine
        //

        RtlCopyMemory(
            &(driverExtension->InitData),
            InitializationData,
            sizeof(CLASS_INIT_DATA));

        driverExtension->DeviceCount = 0;

    } else if (status == STATUS_OBJECT_NAME_COLLISION) {

        //
        // The extension already exists - get a pointer to it
        //

        driverExtension = IoGetDriverObjectExtension(DriverObject,
                                                     CLASS_DRIVER_EXTENSION_KEY);

        ASSERT(driverExtension != NULL);

    } else {

        DebugPrint((1, "ClassInitialize: Class driver extension could not be "
                       "allocated %lx\n", status));
        return status;
    }

    //
    // Update driver object with entry points.
    //

    DriverObject->MajorFunction[IRP_MJ_CREATE] = ClassCreateClose;
    DriverObject->MajorFunction[IRP_MJ_CLOSE] = ClassCreateClose;
    DriverObject->MajorFunction[IRP_MJ_READ] = ClassReadWrite;
    DriverObject->MajorFunction[IRP_MJ_WRITE] = ClassReadWrite;
    DriverObject->MajorFunction[IRP_MJ_SCSI] = ClassInternalIoControl;
    DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = ClassDeviceControlDispatch;
    DriverObject->MajorFunction[IRP_MJ_SHUTDOWN] = ClassShutdownFlush;
    DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = ClassShutdownFlush;
    DriverObject->MajorFunction[IRP_MJ_PNP] = ClassDispatchPnp;
    DriverObject->MajorFunction[IRP_MJ_POWER] = ClassDispatchPower;
    DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = ClassSystemControl;

    if (InitializationData->ClassStartIo) {
        DriverObject->DriverStartIo = ClasspStartIo;
    }

    if ((InitializationData->ClassUnload) && (ClassPnpAllowUnload == TRUE)) {
        DriverObject->DriverUnload = ClassUnload;
    } else {
        DriverObject->DriverUnload = NULL;
    }

    DriverObject->DriverExtension->AddDevice = ClassAddDevice;

    status = STATUS_SUCCESS;
    return status;
} // end ClassInitialize()

/*++////////////////////////////////////////////////////////////////////////////

ClassInitializeEx()

Routine Description:

    This routine is allows the caller to do any extra initialization or
    setup that is not done in ClassInitialize. The operation is
    controlled by the GUID that is passed and the contents of the Data
    parameter is dependent upon the GUID.

    This is the list of supported operations:

    Guid - GUID_CLASSPNP_QUERY_REGINFOEX
    Data - A PCLASS_QUERY_WMI_REGINFO_EX callback function pointer

        Initialized classpnp to callback a PCLASS_QUERY_WMI_REGINFO_EX
        callback instead of a PCLASS_QUERY_WMI_REGINFO callback. The
        former callback allows the driver to specify the name of the
        mof resource.

Arguments:

    DriverObject
    Guid
    Data

Return Value:

    Status Code

--*/
ULONG
ClassInitializeEx(
    IN  PDRIVER_OBJECT   DriverObject,
    IN  LPGUID           Guid,
    IN  PVOID            Data

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91美女片黄在线| 日韩一级片在线播放| 久久久久久久精| 久久成人精品无人区| 2017欧美狠狠色| 国产精品 欧美精品| 国产精品久久久久久久久搜平片| 成人免费高清视频| 亚洲精品免费看| 777a∨成人精品桃花网| 韩国av一区二区| 中文字幕av资源一区| 91国产福利在线| 免费观看久久久4p| 欧美国产日韩在线观看| 在线精品视频小说1| 日本在线不卡视频| 国产欧美日本一区二区三区| 99r国产精品| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲制服丝袜在线| 2023国产一二三区日本精品2022| 不卡av在线网| 日本一区中文字幕| 国产精品女主播av| 欧美精品第1页| 成人小视频在线| 日本不卡中文字幕| 中文字幕一区视频| 精品免费99久久| 日本韩国视频一区二区| 精品伊人久久久久7777人| 亚洲视频网在线直播| 日韩欧美国产综合一区| 97精品国产97久久久久久久久久久久| 亚洲成av人片一区二区梦乃| 国产农村妇女毛片精品久久麻豆| 欧美午夜片在线观看| 成人一区二区三区| 青青草一区二区三区| 亚洲蜜桃精久久久久久久| 精品sm在线观看| 精品视频1区2区| 成人av手机在线观看| 美女一区二区久久| 亚洲一区二区高清| 国产精品嫩草影院av蜜臀| 日韩欧美国产一二三区| 91福利资源站| 99久久国产免费看| 国产精品资源在线| 日韩电影一区二区三区四区| 国产成人免费视频一区| 日韩国产欧美在线观看| 亚洲精品欧美激情| 欧美国产日韩精品免费观看| 欧美xxxxxxxx| 91精品国产黑色紧身裤美女| 在线观看欧美日本| 99久久精品国产毛片| 国产成人综合在线播放| 另类调教123区| 日韩黄色片在线观看| 亚洲高清免费在线| 亚洲一区二区三区影院| 一区二区三区欧美亚洲| 亚洲乱码中文字幕| 亚洲欧美日本在线| 成人免费在线播放视频| 国产精品久久久久国产精品日日| 久久久精品人体av艺术| 久久亚洲免费视频| 久久综合成人精品亚洲另类欧美| 日韩欧美色综合| 日韩一区二区三区电影在线观看 | 欧美zozo另类异族| 91精品视频网| 日韩午夜电影在线观看| 日韩免费看的电影| 久久一二三国产| 国产清纯白嫩初高生在线观看91 | 高清在线不卡av| 国产成人鲁色资源国产91色综| 国产精品456| 99久久婷婷国产综合精品| 暴力调教一区二区三区| 91免费版在线| 欧美精品一二三区| 欧美α欧美αv大片| 欧美va在线播放| 久久精品亚洲精品国产欧美| 国产精品理论在线观看| 亚洲人成网站在线| 亚洲一区二区三区四区中文字幕| 婷婷夜色潮精品综合在线| 美日韩一区二区三区| 国产高清精品久久久久| 99久久免费国产| 欧美日韩一区二区三区四区五区| 欧美一区二区三区播放老司机| 精品国产百合女同互慰| 国产精品福利一区二区三区| 亚洲一区中文日韩| 久久99精品网久久| 成人黄色网址在线观看| 欧美日韩一区精品| 精品国产免费久久| 亚洲人成小说网站色在线| 日韩av在线发布| 国产精品99久久久久久似苏梦涵| 成人v精品蜜桃久久一区| 欧美少妇xxx| 久久看人人爽人人| 亚洲精品免费看| 精品一二三四区| 91老师国产黑色丝袜在线| 欧美一区二区不卡视频| 国产精品国产自产拍高清av | 奇米影视一区二区三区| 风间由美一区二区av101| 欧美性欧美巨大黑白大战| 久久综合色鬼综合色| 亚洲综合在线观看视频| 韩国一区二区三区| 欧美三级电影网站| 国产精品久久二区二区| 精品在线播放免费| 精品污污网站免费看| 日本一区二区成人| 免费在线观看日韩欧美| 色综合久久中文综合久久牛| 久久综合给合久久狠狠狠97色69| 亚洲一区二区三区激情| 懂色av中文一区二区三区| 欧美日韩中字一区| 国产精品成人免费精品自在线观看| 秋霞国产午夜精品免费视频| 色域天天综合网| 亚洲国产精品成人综合色在线婷婷 | 国产日产亚洲精品系列| 日韩精品成人一区二区在线| 97se亚洲国产综合自在线不卡| 精品国产一二三区| 日韩中文字幕av电影| 色哟哟一区二区| 国产精品国产自产拍高清av王其| 久久99日本精品| 欧美精品在线观看播放| 一区二区三区日本| 99久久99久久精品免费看蜜桃| 久久一区二区三区国产精品| 日本不卡视频一二三区| 欧美日韩一区精品| 一区二区三区四区高清精品免费观看| 国产91在线观看| 久久精品视频一区二区三区| 久久av中文字幕片| 日韩视频一区在线观看| 日韩电影在线观看一区| 在线电影国产精品| 亚洲成人福利片| 欧美日韩夫妻久久| 香蕉久久夜色精品国产使用方法| 色婷婷亚洲综合| 亚洲综合激情另类小说区| 色狠狠桃花综合| 一区二区在线看| 欧美在线你懂的| 亚洲电影你懂得| 777a∨成人精品桃花网| 男男成人高潮片免费网站| 91精品国产综合久久福利软件| 日韩成人精品视频| 精品欧美一区二区三区精品久久| 久久66热偷产精品| 国产午夜三级一区二区三| 成人少妇影院yyyy| 亚洲日本青草视频在线怡红院| 91美女片黄在线| 天天综合色天天综合色h| 欧美精选一区二区| 麻豆国产欧美一区二区三区| 亚洲精品一区二区三区99| 福利视频网站一区二区三区| 国产精品高清亚洲| 欧美亚洲国产一区二区三区va| 天堂资源在线中文精品| 精品久久久久99| 国产电影一区二区三区| 中文字幕亚洲欧美在线不卡| 欧美午夜不卡在线观看免费| 日韩国产精品久久久| 精品毛片乱码1区2区3区| 白白色 亚洲乱淫| 亚洲福利一区二区三区| 亚洲精品一区二区在线观看| 91亚洲大成网污www| 男女男精品视频网| 日韩美女视频19| 日韩一区二区精品在线观看|