I am am trying to get the Front Panel DLL working for the first time. I have an xem3001 board along with Visual Studio 2005. I made a simple command line program (via the wizard) and then trie dthe following code:
// okTest.cpp : Defines the entry point for the console application.
//
#include “stdafx.h”
#include “okCUsbFrontPanel.h”
int _tmain(int argc, _TCHAR* argv])
{
int NumDevices;
okCUsbXEM3001v2 *xem = new okCUsbXEM3001v2();
NumDevices = xem->GetDeviceCount();
printf("NumDevices: %i",NumDevices);
delete xem;
}
IN the Linker properties, the follow is set:
Ignore Specfic Libraries : libc;libcmt;libcd;libcmtd;msvcrtd
I have also put the okFrontPanel.lib and okFrontPanel.dll in the same folder as the debug executable.
When I run the program, The debugger halts with a break point and I get the message:
"The output window may have more diagnostic information
HEAP[okTest.exe]: Invalid Address specified to RtlFreeHeap( 00380000, 0038AD00 )
Windows has triggered a breakpoint in okTest.exe.
This may be due to a corruption of the heap, and indicates a bug in okTest.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information"
Any Ideas?
-Eli Hughes