阅读:1177回复:1
关于iorequest 的问题
如果我想分多次传输一个大文件,下面这段代码中iorequest.usize的值应该是一次传输的数据长度还是总共传输的长度?十分感谢指点!
ioRequest.uAddressL = 0; ioRequest.bAddressH = 0; ioRequest.uSize = threadParam->uiLength; ioRequest.bCommand = 0x81; //start, read ioBlock.uOffset = 0; ioBlock.uLength = sizeof(IO_REQUEST); ioBlock.pbyData = (PUCHAR)&ioRequest; ioBlock.uIndex = SETUP_DMA_REQUEST; bResult = DeviceIoControl(hDevice, //读寄存器 IOCTL_WRITE_REGISTERS, (PVOID)&ioBlock, //输入缓冲区 sizeof(IO_BLOCK), NULL, //接收缓冲区 0, &nBytes, //实际接收数据个数 NULL); |
|
沙发#
发布于:2004-12-28 14:20
DDK里面应该有很多差不多的例子,
不妨参考参考, 找找看。 Good luck! |
|
|