阅读:842回复:1
请教USB驱动程序中的一条指令的含义?
谁能解释一下驱动程序自定义例程中这句话的意思:
if(I.IoctlOutputBufferSize()||I.IoctlInputBufferSize()||I.IoctlBuffer())和 if(!I.IoctlBuffer()||(I.IoctlInputBufferSize()!=sizeof(DWORD))||I.IoctlOutputBufferSize()) 谢谢啦!! |
|
|
沙发#
发布于:2004-09-15 22:41
这是一个例子:
__try { // TODO: Verify that the input parameters are correct //If not, return STATUS_INVALID_PARAMETER if(I.IoctlOutputBufferSize()||I.IoctlInputBufferSize() ||I.IoctlBuffer()) __leave; // TODO: Handle the the USBD12_IOCTL_START_AD request, or //defer the processing of the IRP (i.e. by queuing) and set //status to STATUS_PENDING. PURB pUrb = m_Lower.BuildVendorRequest( NULL, 0, 0, D12×××, 0 ); status = m_Lower.SubmitUrb(pUrb,NULL,NULL,5000L); } __finally { // TODO: Assuming that the request was handled here. Set I.Information // to indicate how much data to copy back to the user. I.Information() = 0; I.Status()=status; } return status; } 为啥I.IoctlOutputBufferSize()、I.IoctlInputBufferSize() 和I.IoctlBuffer()都不为1时才发送urb? 向各位大侠请教啦?先谢谢啦 |
|
|