you are supplying NULL instead of supplying the handle name... I believe that is the reason behind the error here... Can you upload your entire code here...
Thank you for the reply aasi.
For some reason I don't get the exception in the C++ statement anymore, and I am not sure what I changed The help file says that supplying NULL for the handle is OK, if you don't want PnP notification, and it seems to work with NULL or a handle now. (The code is presently hacks into my old code, so it would not make much sense to post it).
Moving on, I am now trying to figure out how to implement the PnP callbacks, it sure would be nice if there was a C++ example somewhere.
Do you know why I might get the exceptions in the (unmodified) Control Center C# example? I do eventually want to move to managed code.
If you have installed suiteusb3.4 You can find C++ examples in C:\Program Files\Cypress\Cypress Suite USB 3.4.1\CyAPI\examples... I think screamer example should be implementing PnP callbacks...
I'm not sure why unmodified control center code is not compiling... i remember being able to compile it properly... What error are you seeing when you try to compile it...
Thank you, I was only looking in the examples directory at the top level, I should have dug further down.
On the C# Control Center 'problem', it is a runtime exception, not a compile error, I get when executing the following statement in debug mode:
usbDevices = new USBDeviceList(DeviceMask);
will generate 8-10 messages in the output window:
A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll
If no device is connected, no exceptions.
Dude, I tried replicating the issue at my end... it works fine for me... does your device belong to a specific class or is it generic usb... What is the length of your descriptor table...
Interesting, did you run the application in debug mode, and you did not see this message in the Visual Studio output window?
The application works, but I am always concerned when I see exceptions being thrown, and I was asking why this might be.
I didn't see these exceptions... i was running bulkloop example on my board connected to cyusb.sys and i didn't see these errors... since you are talking about using a third party driver earlier i was thinking it might have something to do with the descriptor of the device because if there is discrepancy in the descriptor the console is bound to throw exceptions....