K8047 C++ Header

Hi
is there a C++ header file for the K8047, I can find for Delphi / VB and .Net but not for C++. I’m trying to get ReadData working. Got all the other functions ok by reverse engineering them from VB and Borland Builder, but code allways falls over at ReadData, LED on and off work fine… is it
void ReadData(long data); or void ReadData(long &data);
A working snippet would really speed things up or better the whole c header!
Thanks

You can download Borland C++Builder demo from: velleman.be/downloads/files/ … b_demo.zip

This is the header file:

[code]#ifdef __cplusplus
extern “C” {
#endif

#define FUNCTION __declspec(dllimport)
FUNCTION __stdcall StartDevice();
FUNCTION __stdcall StopDevice();
FUNCTION __stdcall LEDon();
FUNCTION __stdcall LEDoff();
FUNCTION __stdcall ReadData(int *ptr);
FUNCTION __stdcall SetGain(int Channel, int Gain);

#ifdef __cplusplus
}
#endif[/code]And this is how you can use the ReadData:

int data[8]; ReadData(data); This seems to work too:

int data[8]; ReadData(&data[0]);Please note: [color=#008000]int [/color] in this example is a 32-bit integer.