I’m in a problem with a API function, I need to call a function from a “usb_io_interface.dll”: https://github.com/pavel-a/usb-digital-io16-hid/blob/master/doc/Readme_usb_io_interface_lib.md . But this function have a structure like a parameter, my question is how can I call the function if the value returned by the function is a structure?
Best Regards.
Tim_Hare
(Tim Hare)
2
Make the return type of your Declare statement “As Ptr”. Then extract the structure from the ptr.
Hi Tim, I think something like that.
Soft Declare Function usb_io_open_device Lib "usb_io_interface.dll" (usb_io_device_info As Ptr) As Ptr
But how can I extract the structure??
Sorry, But I begining. 
Tim_Hare
(Tim Hare)
5
That particular declare doesn’t return a structure. It returns an integer handle. You pass it a structure that describes the device.
But, if the device return me “0” that mean that the device isn’t working?
Exactly, only I want that the device return me the handle, but only return me “0” 
Tim_Hare
(Tim Hare)
8
That means it couldn’t open the device. How are you passing in the structure?
Thats my fail, I dont know how pass in the structure.