AnsweredAssumed Answered

problem importing DLL library

Question asked by ramon on Apr 22, 2009
Latest reply on Apr 30, 2009 by david_ballo

Iam trying to control a USB-oscilloscope though its dll library, but There are a problem with data types. When I press "load lib" and vee parses the definition file
the unsigned data type is not recognised (see picture attached).
I am using VEE pro 7.0

Anyone can suggest why this is happening?
Will this happen with VEE pro 9.0?

I think the data types of this driver are not supported by VEE, but I do not know if something can be done to fix this.

This is the definition file "Cscope Control Driver.h":

#include "extcode.h"
#pragma pack(push)
#pragma pack(1)

#ifdef __cplusplus
extern "C" {
typedef struct {
     unsigned short AcquireMode;
     unsigned short AcquisitionMode;
     unsigned short Acquirer;
     unsigned short TransferChans;
     double AMaxScale;
     double AMinScale;
     double BMaxScale;
     double BMinScale;
     unsigned short AProbe;
     unsigned short BProbe;
     unsigned short ACoupling;
     unsigned short BCoupling;
     unsigned short ABandwidth;
     unsigned short BBandwidth;
     unsigned long TriggerSource;
     double TriggerAmplitude;
     double ATriggerAmplitude;
     double BTriggerAmplitude;
     unsigned short TriggerFilter;
     LVBoolean TrigSlope;
     double TriggerHoldoff;
     LVBoolean DigPatternRqd;
     unsigned long DigPattern;
     double ExtTrigThreshold;
     double DigInputThreshold;
     double StartTime;
     double StopTime;
     double PreTrigTime;
     unsigned short Port;
     short NumDivisions;
     short NumSeqFrames;
     long NumBuffers;
     double SigGenFreq;
     double SigGenAmp;
     double SigGenOffset;
     unsigned short SigGenWaveform;
     unsigned short SigGenSweep;
     unsigned short SigGenFunc;
     double SigGenFreq2;
     double SigGenPhase;
     unsigned short Trig2Function;
     double MinTriggerPeriod;
     double MaxTriggerPeriod;
     unsigned long TriggerCount;
     LVBoolean Trig2Slope;
     unsigned long Trig2SourceChan;
     double Trig2Level;
     LVBoolean DigPattern2Rqd;
     unsigned long DigPattern2;
     unsigned short Trigger2Source;
     long WaveformAverages;
     long ValueChanged;
     double FreqSpan;
     double FreqRes;
     double Duration;
     double Resolution;
     LVBoolean UnitsAreLinked;
     LVBoolean ExtSampleClock;
     LVBoolean FSpare2;
     LVBoolean FSpare3;
     LVBoolean FSpare4;
     unsigned short SamplerResolution;
     unsigned short IntfSource;
     unsigned short UpdateRate;
     unsigned short TransferSize;
     double SigGenFreqStep;
     unsigned long TCPAdr;
     unsigned long TCPPort;
     unsigned long CAUSerNumHi;
     unsigned long CAUSerNumLo;
     double NSpare4;
     } TD1;

typedef struct {
     LVBoolean status;
     long code;
     LStrHandle source;
     } TD2;

void __stdcall CscopeControlDriver(long AcquisitionUnit,
     unsigned short Command, double ReplayStartTime, double ReplayStopTime,
     long SamplesInReplay, long FrameNumber, TD1 *AcquireDefinition,
     LVBoolean *GotSamples, double *T0, double *dT, unsigned long *NumSamples,
     unsigned long *NumFrames, float ChanAData[], long ChanAAllocSpace,
     float ChanBData[], long ChanBAllocSpace, unsigned short DigitalInputData[],
     long DigInpAllocSpace, unsigned short *CAUStatus, TD2 *errorOut);

long __cdecl LVDLLStatus(char *errStr, int errStrLen, void *module);

#ifdef __cplusplus
} // extern "C"

#pragma pack(pop)

Thanks, Ramon.