oayran
Newbie level 6
Parallel Port Problem
My current system is win2000 and i want to use visual c++ to get port usage.
The source code i had written is ;
unsigned short parlport=0x378;
void main()
{
int Data;
outp(parlport,0xff);
int status;
status=_inp(parlport);
cout<<"written="<<Data<<endl;
cout<<"read="<<status<<endl;
getch();
}
There is no error while linking but on executing level the error is;
First-chance exception in parallel_port.exe: 0xC0000096: Privileged Instruction.
What can i do ,if you have a mind please write me ,thanks.
My current system is win2000 and i want to use visual c++ to get port usage.
The source code i had written is ;
unsigned short parlport=0x378;
void main()
{
int Data;
outp(parlport,0xff);
int status;
status=_inp(parlport);
cout<<"written="<<Data<<endl;
cout<<"read="<<status<<endl;
getch();
}
There is no error while linking but on executing level the error is;
First-chance exception in parallel_port.exe: 0xC0000096: Privileged Instruction.
What can i do ,if you have a mind please write me ,thanks.