Forums › TG Series Discussions › Error When Opening a Device (TG124A). › Reply To: Error When Opening a Device (TG124A).
Andrew
Moderator
- This reply was modified 8 years, 2 months ago by
Andrew.
Hello Nazar,
I’m looking at this function right now and there is only one location where this error value (-3) can be returned. The code for this is below.
if(device < 0 || device >= TG_MAX_DEVICES) {
return tgDeviceInvalidErr;
}
where TG_MAX_DEVICES = 4.
So if the device integer provided is less than 0 or greater then 3 then this error (-3) is returned. I would look into the interop between your C# application and this function. This integer argument is not being passed properly. You are using DllImport and setting the calling convention to Cdecl?
Regards,
Andrew
