I'm looking for help declaring 2 functions in VB.NET that call an external DLL written in C/C++. The (limited) documentation I have is in C also. This is all of it:
Here's the first one...
usb_open // Opens a USB device //
Description: usb_dev_handle *usb_open(struct *usb_device dev);
usb_open is to be used to open up a device for use. usb_open must be called before attempting to perform any operations to the device. Returns a handle used in future communication with the device.
Here's the second one...
usb_close // Closes a USB device //
Description: int usb_close(usb_dev_handle *dev);
usb_close closes a device opened with usb_open. No further operations may be performed on the handle after usb_close is called. Returns 0 on success or < 0 on error.
Any help would be greatly appreciated. I'm new to VB.NET and have no experience with C/C++. dennis
By the way, here's my first try, (not working)...
<DllImport("libusb0.dll")> Function usb_open(ByRef dev As Int32) As Int32
End Function
Here's the first one...
usb_open // Opens a USB device //
Description: usb_dev_handle *usb_open(struct *usb_device dev);
usb_open is to be used to open up a device for use. usb_open must be called before attempting to perform any operations to the device. Returns a handle used in future communication with the device.
Here's the second one...
usb_close // Closes a USB device //
Description: int usb_close(usb_dev_handle *dev);
usb_close closes a device opened with usb_open. No further operations may be performed on the handle after usb_close is called. Returns 0 on success or < 0 on error.
Any help would be greatly appreciated. I'm new to VB.NET and have no experience with C/C++. dennis
By the way, here's my first try, (not working)...
<DllImport("libusb0.dll")> Function usb_open(ByRef dev As Int32) As Int32
End Function