I need some help on importing a (probably unmanaged) C++ dll. From that specific dll, I only have a header file and a dll.
In the header the following is declared:
The definition of Device_ is unknown to me. (It's not in the header file)
typedef struct Device_ *DeviceHandle;
API ResultType GetDevices(DeviceHandle **devices, UInteger *count);
I tried the following in C# and it's not giving me an error, but I also don't get a device list and count equals one, even if there are two registered devices connected.
I also have no idea how to use or cast the list of devices.
[DllImport("SomeDLL.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern ErrorType GetDevices(out IntPtr devices, out UInt32 count);
var devices = new IntPtr();
UInt32 count = 0;
var result = I1_GetDevices(out devices, out count);
I appreciate your help!