Hi,
I'm currently interfacing an optris camera with Labview. My program work well, for now. I'm actually trying to use an external signal to trigger a snapshot (electric circuit link to the camera). For that I need to use a fonction of the dll given by Optris (ImagerIPC2.dll), its name is GetFrame, here is it's definition on the header :
IMAGERIPC_API HRESULT WINAPI GetFrame(WORD index, WORD timeout, void *pBuf, unsigned int Size, FrameMetadata *pMetadata);
with pMetadata define as :
struct FrameMetadata
{
unsigned short Size; // size of this structure
unsigned int Counter; // frame counter
unsigned int CounterHW; // frame counter hardware
long long Timestamp; // time stamp in UNITS (10000000 per second)
long long TimestampMedia;
TFlagState FlagState;
float TempChip;
float TempFlag;
float TempBox;
WORD PIFin[2];
// DI = PIFin[0] & 0x8000
// AI1 = PIFin[0] & 0x03FF
// AI2 = PIFin[1] & 0x03FF
};
As you can easily understand, Labview really don't understand the metada struct. So I am trying to do a wrapper dll to just obtain the information that I need ( underlined on the struct : WORD PIFin[0] in order to have the digital input). So I already did it (see in attached file), it's the function : PIFvalue; the two others were to test my dll. So now is my problem :
My dll work because i can use my function add. But when i try to use PIFvalue, I don't succeed to call correctly the function getFrame so at the end *pif= NULL and i don't have what i expect. I don't use to do dll wrapper, so my way to call the function or to use it may be wrong!
Have you a better way to call the function? or may be a correction for my program?
Thanks by advance for your help,
Alexandre Blouin.
PS : I don't join the dll ImagerIPC2.dll because you need the camera in order to use it.