J
Joe B.
Hello,
This is my first attempt at posting to the newsgroup. My apologies if I
have directed this question to the wrong bunch.
I am trying to use SetupDiGetDeviceInterfaceDetail function in order to get
a handle to a USB HID device so that I can open it using CreateFile.
After struggling with this function for a couple of days, I feel that I
finally understand what it does and what I have to provide it. However,
when I run my program, I get an arcane error message which says "the user
supplied buffer is not valid for the requested operation". I called the
function once to get the required size and that worked telling me I needed
170 bytes. I allocated that much TCHAR for the DevicePath buffer. Then I
cast the buffer as the structure called for in the function parameter list.
Can anyone help me figure out what I'm doing wronb? Shall I post my source
code? Can you point me to a reference that might help me out.
Thanks,
Joe
This is my first attempt at posting to the newsgroup. My apologies if I
have directed this question to the wrong bunch.
I am trying to use SetupDiGetDeviceInterfaceDetail function in order to get
a handle to a USB HID device so that I can open it using CreateFile.
After struggling with this function for a couple of days, I feel that I
finally understand what it does and what I have to provide it. However,
when I run my program, I get an arcane error message which says "the user
supplied buffer is not valid for the requested operation". I called the
function once to get the required size and that worked telling me I needed
170 bytes. I allocated that much TCHAR for the DevicePath buffer. Then I
cast the buffer as the structure called for in the function parameter list.
Can anyone help me figure out what I'm doing wronb? Shall I post my source
code? Can you point me to a reference that might help me out.
Thanks,
Joe