阅读:1118回复:0
求教微软驱动例子中如何发送相应的Request
我刚刚开始学习驱动开发,参照微软网站https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/ucx-objects-and-handles-used-by-host-controller-driver页面写了一个USB的Demo,但是网站例程中关于发送Request的地方,都省略掉了。请教论坛各位大牛,帮忙分析一下,省略号部分的内容,需要如何写。实在搞不清楚如何完成这部分功能的
VOID RootHub_EvtRootHubClearHubFeature( UCXROOTHUB UcxRootHub, WDFREQUEST ControlUrb ) { DbgTrace(TL_INFO, RootHub, "RootHub_EvtRootHubClearHubFeature"); WDF_REQUEST_PARAMETERS_INIT(&wdfRequestParams); WdfRequestGetParameters(WdfRequest, &wdfRequestParams); urb = (PURB)wdfRequestParams.Parameters.Others.Arg1; setupPacket = (PWDF_USB_CONTROL_SETUP_PACKET)&urb->UrbControlTransferEx.SetupPacket[0]; ... WdfRequestComplete(ControlUrb, STATUS_SUCCESS); } |
|