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

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

?? isopnp.c

?? USB技術大全-54.8M.zip
?? C
?? 第 1 頁 / 共 3 頁
字號:
            IoSkipCurrentIrpStackLocation (Irp);
            ntStatus = IoCallDriver (deviceExtension->TopOfStackDeviceObject, Irp);
            IsoUsb_DecrementIoCount(DeviceObject);
            return ntStatus;
        }

		// Reset this flag so new IOCTL and IO Irp processing will be re-enabled
        deviceExtension->RemoveDeviceRequested = FALSE;

        break; // end, case IRP_MN_CANCEL_REMOVE_DEVICE

    case IRP_MN_REMOVE_DEVICE:

		// The PnP Manager uses this IRP to direct drivers to remove a device. 
		// For a "polite" device removal, the PnP Manager sends an 
		// IRP_MN_QUERY_REMOVE_DEVICE prior to the remove IRP. In this case, 
		// the device is in the remove-pending state when the remove IRP arrives.
		// For a surprise-style device removal ( i.e. sudden cord yank ), 
		// the physical device has already been removed so the PnP Manager sends 
		// the remove IRP without a prior query-remove. A device can be in any state
		// when it receives a remove IRP as a result of a surprise-style removal.

        // match the inc at the begining of the dispatch routine
        IsoUsb_DecrementIoCount(DeviceObject);

		//
        // Once DeviceRemoved is set no new IOCTL or read/write irps will be passed
        // down the stack to lower drivers; all will be quickly failed
		//
        deviceExtension->DeviceRemoved = TRUE;

		// If any pipes are still open, call USBD with URB_FUNCTION_ABORT_PIPE
		// This call will also close the pipes; if any user close calls get through,
		// they will be noops
		IsoUsb_AbortPipes( DeviceObject );




		// We don't explicitly wait for the below driver to complete, but just make
		// the call and go on, finishing cleanup
        IoCopyCurrentIrpStackLocationToNext(Irp);

        Irp->IoStatus.Status = STATUS_SUCCESS;
        ntStatus = IoCallDriver(stackDeviceObject,
                                Irp);
        //
        // The final decrement to device extension PendingIoCount == 0
		// will set deviceExtension->RemoveEvent, enabling device removal.
		// If there is no pending IO at this point, the below decrement will be it.
        //
        IsoUsb_DecrementIoCount(DeviceObject);


        // wait for any io request pending in our driver to
        // complete for finishing the remove

        KeWaitForSingleObject(
                    &deviceExtension->RemoveEvent,
                    Suspended,
                    KernelMode,
                    FALSE,
                    NULL);

        //
        // Delete the link and FDO we created
        //
        IsoUsb_RemoveDevice(DeviceObject);

        ISOUSB_KdPrint( DBGLVL_DEFAULT,("IsoUsb_ProcessPnPIrp() Detaching from %08X\n",
                         deviceExtension->TopOfStackDeviceObject));

        IoDetachDevice(deviceExtension->TopOfStackDeviceObject);

        ISOUSB_KdPrint( DBGLVL_DEFAULT,("IsoUsb_ProcessPnPIrp() Deleting %08X\n",
                         DeviceObject));
                         
        RtlInitUnicodeString (&DeviceLinkUniCodeString, DeviceLinkName);
        IoDeleteSymbolicLink(&DeviceLinkUniCodeString);
        IoDeleteDevice (DeviceObject);

        return ntStatus; // end, case IRP_MN_REMOVE_DEVICE


    default:
        ISOUSB_KdPrint( DBGLVL_MAXIMUM,("IsoUsb_ProcessPnPIrp() Minor PnP IOCTL not handled\n"));
    } /* case MinorFunction  */


    if (!NT_SUCCESS(ntStatus)) {

		// if anything went wrong, return failure  without passing Irp down
        Irp->IoStatus.Status = ntStatus;
		IoCompleteRequest (Irp,
						   IO_NO_INCREMENT
						   );

		IsoUsb_DecrementIoCount(DeviceObject);

		ISOUSB_KdPrint( DBGLVL_MAXIMUM,("IsoUsb_ProcessPnPIrp() Exit IsoUsb_ProcessPnPIrp FAILURE %x\n", ntStatus));
		return ntStatus;
    }

    IoCopyCurrentIrpStackLocationToNext(Irp);

    //
    // All PNP_POWER messages get passed to the TopOfStackDeviceObject
    // we were given in PnPAddDevice
    //

    ISOUSB_KdPrint( DBGLVL_MAXIMUM,("IsoUsb_ProcessPnPIrp() Passing PnP Irp down, status = %x\n", ntStatus));

    ntStatus = IoCallDriver(stackDeviceObject,
                            Irp);

    IsoUsb_DecrementIoCount(DeviceObject);

    ISOUSB_KdPrint( DBGLVL_MAXIMUM,("IsoUsb_ProcessPnPIrp() Exit IsoUsb_ProcessPnPIrp %x\n", ntStatus));

    return ntStatus;
}


NTSTATUS
IsoUsb_PnPAddDevice(
    IN PDRIVER_OBJECT DriverObject,
    IN PDEVICE_OBJECT PhysicalDeviceObject
    )
/*++

Routine Description:

    This routine is called to create and initialize our Functional Device Object (FDO).
    For monolithic drivers, this is done in DriverEntry(), but Plug and Play devices
    wait for a PnP event

Arguments:

    DriverObject - pointer to the driver object for this instance of IsoUsb

    PhysicalDeviceObject - pointer to a device object created by the bus

Return Value:

    STATUS_SUCCESS if successful,
    STATUS_UNSUCCESSFUL otherwise

--*/
{
    NTSTATUS                ntStatus = STATUS_SUCCESS;
    PDEVICE_OBJECT          deviceObject = NULL;
    PDEVICE_EXTENSION       deviceExtension;
    USBD_VERSION_INFORMATION versionInformation;
    ULONG i;

    
    ISOUSB_KdPrint( DBGLVL_DEFAULT,("enter IsoUsb_PnPAddDevice()\n"));

    //
    // create our funtional device object (FDO)
    //

    ntStatus =
        IsoUsb_CreateDeviceObject(DriverObject, PhysicalDeviceObject, &deviceObject);

    if (NT_SUCCESS(ntStatus)) {
        deviceExtension = deviceObject->DeviceExtension;

        deviceObject->Flags &= ~DO_DEVICE_INITIALIZING;

        //
        // we support direct io for read/write
        //
        deviceObject->Flags |= DO_DIRECT_IO;


        //Set this flag causes the driver to not receive a IRP_MN_STOP_DEVICE
        //during suspend and also not get an IRP_MN_START_DEVICE during resume.  
        //This is neccesary because during the start device call, 
        // the GetDescriptors() call  will be failed by the USB stack.
        deviceObject->Flags |= DO_POWER_PAGABLE;

        // initialize our device extension
        //
        // remember the Physical device Object
        //
        deviceExtension->PhysicalDeviceObject=PhysicalDeviceObject;

        //
        // Attach to the PDO
        //

        deviceExtension->TopOfStackDeviceObject =
	    IoAttachDeviceToDeviceStack(deviceObject, PhysicalDeviceObject);

	// Get a copy of the physical device's capabilities into a
	// DEVICE_CAPABILITIES struct in our device extension;
	// We are most interested in learning which system power states
	// are to be mapped to which device power states for handling
	// IRP_MJ_SET_POWER Irps.
	IsoUsb_QueryCapabilities(PhysicalDeviceObject,
				 &deviceExtension->DeviceCapabilities);


		// We want to determine what level to auto-powerdown to; This is the lowest
		//  sleeping level that is LESS than D3;
		// If all are set to D3, auto powerdown/powerup will be disabled.

	deviceExtension->PowerDownLevel = PowerDeviceUnspecified; // init to disabled
	for (i=PowerSystemSleeping1; i<= PowerSystemSleeping3; i++) {

			if ( deviceExtension->DeviceCapabilities.DeviceState[i] < PowerDeviceD3 )
				deviceExtension->PowerDownLevel = deviceExtension->DeviceCapabilities.DeviceState[i];
	}

#if DBG

        // May want override auto power-down level from registry;
        // ( CurrentControlSet\Services\IsoUsb\Parameters )
		// Setting to 0 or 1 in registry disables auto power-down
        IsoUsb_GetRegistryDword( ISOUSB_REGISTRY_PARAMETERS_PATH,
                                         L"PowerDownLevel",
                                         &(deviceExtension->PowerDownLevel) );



        //
        // display the device  caps
        //

        ISOUSB_KdPrint( DBGLVL_MEDIUM,(" >>>>>> DeviceCaps\n"));
        ISOUSB_KdPrint( DBGLVL_MEDIUM,(" SystemWake = %s\n",
            ISOUSB_StringForSysState( deviceExtension->DeviceCapabilities.SystemWake ) ));
        ISOUSB_KdPrint( DBGLVL_MEDIUM,(" DeviceWake = %s\n",
            ISOUSB_StringForDevState( deviceExtension->DeviceCapabilities.DeviceWake) ));

        for (i=PowerSystemUnspecified; i< PowerSystemMaximum; i++) {

            ISOUSB_KdPrint( DBGLVL_MEDIUM,(" Device State Map: sysstate %s = devstate %s\n",
                 ISOUSB_StringForSysState( i ),
                 ISOUSB_StringForDevState( deviceExtension->DeviceCapabilities.DeviceState[i] ) ));
        }
        ISOUSB_KdPrint( DBGLVL_MEDIUM,(" <<<<<<<<DeviceCaps\n"));
#endif
	// We keep a pending IO count ( extension->PendingIoCount )  in the device extension.
	// The first increment of this count is done on adding the device.
	// Subsequently, the count is incremented for each new IRP received and
	// decremented when each IRP is completed or passed on.

	// Transition to 'one' therefore indicates no IO is pending and signals
	// deviceExtension->NoPendingIoEvent. This is needed for processing
	// IRP_MN_QUERY_REMOVE_DEVICE

	// Transition to 'zero' signals an event ( deviceExtension->RemoveEvent )
	// to enable device removal. This is used in processing for IRP_MN_REMOVE_DEVICE
	//
	IsoUsb_IncrementIoCount(deviceObject);

    }

    USBD_GetUSBDIVersion(&versionInformation);



    if( NT_SUCCESS( ntStatus ) )
    {
	NTSTATUS actStat;
	// try to power up device
	ISOUSB_KdPrint( DBGLVL_DEFAULT,("IsoUsb_PnPAddDevice() - Power Up device\n"));
	actStat = IsoUsb_SelfSuspendOrActivate( deviceObject, FALSE );
    }


    ISOUSB_KdPrint( DBGLVL_DEFAULT,("exit IsoUsb_PnPAddDevice() (%x)\n", ntStatus));

    return ntStatus;
}


NTSTATUS
IsoUsb_StartDevice(
    IN  PDEVICE_OBJECT DeviceObject
    )
/*++

Routine Description:

    Called from IsoUsb_ProcessPnPIrp(), the dispatch routine for IRP_MJ_PNP.
    Initializes a given instance of the device on the USB.
    USB client drivers such as us set up URBs (USB Request Packets) to send requests
    to the host controller driver (HCD). The URB structure defines a format for all
    possible commands that can be sent to a USB device.
    Here, we request the device descriptor and store it, and configure the device.


Arguments:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人综合婷婷国产精品久久| 在线看一区二区| 99九九99九九九视频精品| 精品国产不卡一区二区三区| 亚洲少妇屁股交4| 高清不卡一区二区在线| 欧美一级高清大全免费观看| 色系网站成人免费| 免费高清成人在线| 99久久亚洲一区二区三区青草| 日韩国产成人精品| 337p粉嫩大胆噜噜噜噜噜91av| 日产欧产美韩系列久久99| av电影天堂一区二区在线| 日本一区二区三区久久久久久久久不| 蜜臀91精品一区二区三区| 日韩欧美激情四射| 国产一区二区伦理| 亚洲人成伊人成综合网小说| 国模一区二区三区白浆| 国产日产欧美一区| aaa欧美日韩| 奇米综合一区二区三区精品视频 | 亚洲麻豆国产自偷在线| 国产成人免费网站| 国产亚洲欧美色| 91免费视频网| 91视频.com| 日韩不卡一区二区| 色视频欧美一区二区三区| 色欧美日韩亚洲| 日本高清不卡在线观看| 国内精品国产成人国产三级粉色| 亚洲电影第三页| 亚洲va中文字幕| 国产精品国产自产拍高清av| 日韩精品中文字幕在线一区| 在线视频亚洲一区| 欧美怡红院视频| 色综合久久久久久久久久久| 99精品视频一区二区三区| 欧美亚洲综合网| 欧美日韩免费一区二区三区视频| 粉嫩aⅴ一区二区三区四区五区| 国产suv一区二区三区88区| 国产电影精品久久禁18| 国产suv精品一区二区6| 不卡av免费在线观看| 欧美日韩国产首页| 久久香蕉国产线看观看99| 亚洲一区二区三区四区在线| 午夜精品久久久久久久| 国产福利一区二区三区| 中文子幕无线码一区tr| 精品剧情在线观看| 国产精品美女久久久久久2018| 欧美中文字幕一区二区三区亚洲| 99riav一区二区三区| 国产精品麻豆久久久| 精品一区二区三区在线视频| 欧美一级黄色大片| 黄一区二区三区| 国产欧美中文在线| 91美女片黄在线观看91美女| 亚洲一区中文日韩| 精品国产一区a| 成人免费视频视频在线观看免费| 欧美高清视频在线高清观看mv色露露十八 | 亚洲国产美女搞黄色| www.欧美日韩| 久久久久久一级片| 国产精品2024| 一区二区三区自拍| 色av成人天堂桃色av| 久久精品一区二区| 欧美电影在线免费观看| 一区二区在线观看免费视频播放| 成人免费毛片片v| 国产精品网站导航| 国产成人亚洲精品狼色在线| 国产精品免费aⅴ片在线观看| 成人综合婷婷国产精品久久| 国产精品视频你懂的| 成人app下载| 日本不卡在线视频| 国产精品久久免费看| 日本乱码高清不卡字幕| 日产国产高清一区二区三区| 精品少妇一区二区三区视频免付费 | 日韩精品电影在线| 久久免费视频色| 欧美专区在线观看一区| 五月天丁香久久| 丝袜诱惑制服诱惑色一区在线观看 | 国产精品亚洲午夜一区二区三区| 成人的网站免费观看| 日本aⅴ亚洲精品中文乱码| 亚洲免费毛片网站| 亚洲综合精品自拍| 亚洲成人激情综合网| 日韩高清不卡在线| 国产精品一区二区久激情瑜伽| 国产又黄又大久久| heyzo一本久久综合| 99久精品国产| 欧美日韩国产欧美日美国产精品| 欧美日韩在线直播| 国产欧美一区二区在线| 亚洲免费在线视频一区 二区| 国产精品久久久久久久久免费樱桃 | 国产精品久久久久影院| 亚洲一区二区av在线| 亚瑟在线精品视频| 成人av网站免费观看| 日韩一级免费观看| 亚洲欧美另类久久久精品2019| 亚洲在线中文字幕| 国产·精品毛片| 欧美中文字幕一区二区三区亚洲 | 欧美日韩专区在线| 中文字幕成人av| 免费精品视频最新在线| 91丨porny丨首页| 日韩亚洲欧美在线观看| 欧美激情一二三区| 国产亚洲欧洲一区高清在线观看| 久久久99精品久久| 亚洲国产视频一区二区| 国产福利视频一区二区三区| 欧美日韩久久一区| 中文字幕日韩av资源站| 国产在线精品免费| 91精品国产高清一区二区三区蜜臀| 国产日韩亚洲欧美综合| 亚洲777理论| 在线视频你懂得一区二区三区| 国产清纯白嫩初高生在线观看91 | 高清视频一区二区| 正在播放亚洲一区| 欧美久久久久免费| 一区二区三区电影在线播| 成人av中文字幕| 国产精品乱码久久久久久| 久久99久久久欧美国产| 日韩欧美亚洲国产另类 | 奇米一区二区三区| 制服丝袜av成人在线看| 亚洲精品网站在线观看| 在线综合视频播放| 日韩国产欧美一区二区三区| 蜜臀av性久久久久蜜臀av麻豆| 精品国产免费人成在线观看| 毛片av一区二区三区| 国产日韩亚洲欧美综合| 欧洲一区二区三区在线| 日本成人在线一区| 亚洲特黄一级片| 欧美一二区视频| 91国偷自产一区二区开放时间 | 裸体在线国模精品偷拍| 成人av小说网| 一区二区三区国产| 国产一区二区美女诱惑| 欧美日韩另类一区| 亚洲一区二区三区自拍| 欧美午夜电影网| 裸体歌舞表演一区二区| 精品对白一区国产伦| 成人永久免费视频| 综合欧美一区二区三区| 99re亚洲国产精品| 亚洲综合另类小说| 亚洲精品一区二区三区99| 成人精品小蝌蚪| 日韩主播视频在线| 国产欧美日韩麻豆91| 在线欧美日韩国产| 国产激情视频一区二区在线观看 | 久久久久9999亚洲精品| 91丨九色丨国产丨porny| 午夜精品久久久久久久99樱桃 | 91精品国产综合久久婷婷香蕉| 免费成人在线视频观看| 国产亚洲综合av| 日韩免费高清av| 99久精品国产| 成人午夜电影小说| 久久狠狠亚洲综合| 亚洲动漫第一页| 色婷婷综合久久| 成人精品免费视频| 国产成都精品91一区二区三| 偷偷要91色婷婷| 视频一区国产视频| 一色桃子久久精品亚洲| 久久久亚洲综合| 精品国产一区二区亚洲人成毛片| 欧美精品少妇一区二区三区| www.视频一区| 欧美专区日韩专区|