K8055 microsoft visual studio c++ 2013

Hello,

I can’t for the life of me get this thing to work !

I want to write a dialogbased windows program with microsoft visual studio 2013 C++ .
The examples all use windows form designer, which is kinda hard to read, since the syntax is not native c/c++ -code.
The way the demo links to the K8055D.dll is impossible for me to recreate in “normal” MFC - Application (given that i am not a professional programmer).

I managed to create a .lib file from the K8055D_C.dll , linked that and included the header (K8055D_C.h) into my program and it seems to work. For example I can call the function version(); and the corresponding window pops up.

…Buuuut the function opendevice() always returns a “0” no matter wich card i try to initialize and all the other fuctions like setalldigital() don’t work.

Has anybody an idea why my program does not work ? …or (even better) has anybody a working sample project written in c++ that doesn’t use form design.
Thanks a lot !

I’m one better than you. OpenDevice works. It returns -1 if I use the wrong code and 0 if I use the right code. SearchDevices seems to work too, but nothing else seems to.

I did have to do quite a bit of juggling with the lib file to get this far though. Why don’t you guys provide a Visual Studio lib file?

I Take it back, I put a second card in the machine and Open device always returns 0. Most disappointing.

Okay this seems to be something to do with the Windows version of Visual Studio. If I build an app in C# that includes the library using Dllimport attributes when this code is compiled in the windows version I get the symptoms that OpenDevice etc work, but nothing communicating over USB does. If I compile this using the Desktop version all will work fine.

I think this is because OpenDevice SetDevice etc are all on DLL functions. SetAllDigital clearly has to tell the board what to do and this does not work in the windows version. I’m not sure that anyone out there has managed to get a K8055 to work with Modern UI yet, but I suspect not.

Looks like I may well be going back to C#

Trevor