
mattbrailsford
United Kingdom
Asked
— Edited
Hey,
I was wondering if anyone had an example of using the EZ SDK via a console application? All the samples are full on WinForm apps, where as I would just like to create a simple console app. The problem being, it seems all connections in the WinForms apps are using the EZB_Connect user control, which doesn't work inside a console app.
Has anybody got any examples of using the SDK in a console app?
Many thanks
Matt
EZ_B.EZB_Connect newPort = new EZ_B.EZB_Connect();
var ezb = new EZ_B.EZB();
ezb.Connect(selectedComPort);
// Wait for it to connect
// Do your thing
ezb.Disconnect();
I do seem to get some warnings though about DIrectX attempting managed execution inside OS Loader lock. Does this sound normal?
Cheers
Matt
Could really do with getting this info on the SDK documentation page I would say as it wasn't straight forward getting up and running. After doing the following though, everything seems to be set:
1: Make sure DirectX is up to date (http://www.microsoft.com/en-us/download/details.aspx?id=35)
2: Download the SDK and store the files in a memorable place
3: Create a new visual studio project
4: Make sure it's set to use .NET 3.5
5: Make sure it's set to compile to x86
6: Disable LoaderLock warnings (http://harriyott.com/2006/08/loaderlock-was-detected.aspx)
Anywho, time to go play