Test and Measurement Forum

Using PS3000 drivers on Visual C++ Studio

Post your C and C++ discussions here

Using PS3000 drivers on Visual C++ Studio

Postby physicsfaith » Fri Jul 20, 2007 7:39 pm

Has anyone successfully compiled PS3000con.c or PS3000.c with MS Visual C++ Studio 2005? I am getting all kinds of errors. Most stem from this section of code:

typedef struct {
short handle;
MODEL_TYPE model;
PS3000_RANGE firstRange;
PS3000_RANGE lastRange;
//BYTE signalGenerator;
//BYTE external;
short timebases;
short noOfChannels;
CHANNEL_SETTINGS channelSettings [MAX_CHANNELS];
short values [MAX_CHANNELS][BUFFER_SIZE];
PS3000_RANGE triggerRange;
}
UNIT_MODEL;

UNIT_MODEL unitOpened;

The compiler doesn't recognize BYTE, and so any later line that refers to unitOpened...signalgenerator or external has an error. I have the 2 lines commented out just to get rid of the errors for now.
physicsfaith
Active User
Active User
 
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Postby physicsfaith » Fri Jul 20, 2007 8:01 pm

I answered my own question. Apparently c++ doesn't know what a BYTE variable is. I changed it to char and atleast the compiler doesnt complain. I'll report back if it actually works.
physicsfaith
Active User
Active User
 
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS


Return to C and C++

Who is online

Users browsing this forum: No registered users and 1 guest