C++ problem, please help if you can

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
KillerIdiot
User
User


Joined: 23 May 2006
Posts: 2

PostPosted: Thu May 25, 2006 8:48 pm    Post subject: C++ problem, please help if you can Reply with quote

For some reason, when i use the function to open the unit, it will not work, i even checked to make sure that the program provided is able to connect to the device. Here is my code, please tell me if there is anything i am missing:

#include <conio.h>
#include <iostream.h>
#include <windows.h>

short (*FPshortVOID)(void) = NULL;
void main()
{
short handle;
HINSTANCE dll;
dll = LoadLibrary("PS2000.dll");
FPshortVOID = (short (*)(void))GetProcAddress(dll,"ps2000_open_unit");
do{
handle = (*FPshortVOID)();

if(handle == -1)
{
cout << "Unit Did Not Initialize... Press Any Key To Retry\n";
getch();
}
else if(handle == 0)
{
cout << "No Unit Found... Press Any Key When Connected\n";
getch();
}
else
{
cout << "Initialized Correctly\n";
getch();
}
}while(handle <= 0);
}
Back to top
Sarah
Guest





PostPosted: Wed May 31, 2006 10:33 am    Post subject: Reply with quote

Hi

Which unit do you have? Is it the PS2202? This is not compatible with writing your own software. The PS2104 and PS2105 are compatible however.

Best Regards
Back to top
KillerIdiot
User
User


Joined: 23 May 2006
Posts: 2

PostPosted: Wed Jun 07, 2006 8:25 pm    Post subject: Reply with quote

Thank you very much... that was my problem...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group