- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I am trying to get my host application to work with the new cyusb3.sys. As mentioned in the PDF, some of the IOCTL definitions have changed. I am not a coder and am just the tech trying to get it to work. I have all the source code etc...
I could use some help with changing the code. Here is the IOCTL code from the host application.
' ************************************
' IOCTL Definitions
' ************************************
' Set the base of the IOCTL control codes
Private Const Ezusb_IOCTL_INDEX = &H800
' (DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method)
' note: DeviceType for each control code is FILE_DEVICE_UNKNOWN
' FILE_DEVICE_UNKNOWN * 2^16 = &H220000
' 'Access' = FILE_ANY_ACCESS = 0
Public Const IOCTL_Ezusb_GET_PIPE_INFO = &H220000 + METHOD_BUFFERED + (Ezusb_IOCTL_INDEX + 0) * 4
Public Const IOCTL_Ezusb_GET_DEVICE_DESCRIPTOR = &H220000 + METHOD_BUFFERED + (Ezusb_IOCTL_INDEX + 1) * 4
Public Const IOCTL_EZUSB_BULK_READ = &H220000 + METHOD_OUT_DIRECT + (Ezusb_IOCTL_INDEX + 19) * 4
Public Const IOCTL_EZUSB_BULK_WRITE = &H220000 + METHOD_IN_DIRECT + (Ezusb_IOCTL_INDEX + 20) * 4
Public Const IOCTL_Ezusb_RESETPIPE = &H220000 + METHOD_IN_DIRECT + (Ezusb_IOCTL_INDEX + 13) * 4
Public Const IOCTL_Ezusb_ABORTPIPE = &H220000 + METHOD_IN_DIRECT + (Ezusb_IOCTL_INDEX + 15) * 4
Public Const IOCTL_Ezusb_SETINTERFACE = &H220000 + METHOD_BUFFERED + (Ezusb_IOCTL_INDEX + 16) * 4
'---- Usage
'result = DeviceIoControl(hUSB, IOCTL_Ezusb_RESETPIPE, PipeNumber, 0, 0, 0, lBytesReturned, 0)
'result = DeviceIoControl(hUSB, IOCTL_Ezusb_ABORTPIPE, PipeNumber, 0, 0, 0, lBytesReturned, 0)
'result = DeviceIoControl(hUSB, IOCTL_Ezusb_SETINTERFACE, tSetInterfaceIn, Len(tSetInterfaceIn), 0, 0, lBytesReturned, 0)
'#define IOCTL_Ezusb_RESETPIPE CTL_CODE(FILE_DEVICE_UNKNOWN, \
' Ezusb_IOCTL_INDEX+13,\
' METHOD_IN_DIRECT, \
' FILE_ANY_ACCESS)
'
'#define IOCTL_Ezusb_ABORTPIPE CTL_CODE(FILE_DEVICE_UNKNOWN, \
' Ezusb_IOCTL_INDEX+15,\
' METHOD_IN_DIRECT, \
' FILE_ANY_ACCESS)
'
'#define IOCTL_Ezusb_SETINTERFACE CTL_CODE(FILE_DEVICE_UNKNOWN, \
' Ezusb_IOCTL_INDEX+16,\
' METHOD_BUFFERED, \
' FILE_ANY_ACCESS)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jeremiah,
Once you have implemented the changes as specified in the IOCTL Mapping table of the pdf guide, you should be able to get this working.
If you are facing any specific issues, please explain.
Regards,
- Madhu sudhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats the issue, Im not sure how to treat the IOCTL that arent direct
equivlents. The code i printed is as is without any changes for posterity.
I can rewrite the direct equivlents but not the other and havent really
found any other info on how do just that. So any help would be huge.
On Fri, Jun 15, 2018, 3:41 AM Madhu Lakshmipathy <