Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Parallel Port Problem - any ideas?

Status
Not open for further replies.

oayran

Newbie level 6
Joined
Apr 2, 2002
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
TURKEY
Activity points
24
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.
 

From WinNT4 on no direct hardware access is allowed from user space programs. You need to install a kernel-space driver and ask the driver to do it for you.

An easy driver is giveio/portio; but I would recommend to use DLPortIO (do a google search for it). DLPortIO is supported on both the old Windows tree (95,98,ME) and the new NT-based kernel (NT4, 2k, XP)
 

I am using WINSYS driver for parallel port output, but there is serial number embeded in the driver. I would like to rewrite with driver studio. Does anybody has coding examples?

Thanks
 

u can find some drivers on the net
o nt systems you cannot access to parallel port without this driver
i write a dll file that you can use it on win all
if you call me i can give it to you
trabzone_net_team@yahoo.com
if you cannot use dll file in c++ then i can help you again
dont worry be happy man :lol:
 

may this will help a little
hxxp://wxw.beyondlogic.org/porttalk/porttalk.htm

and (NOT C)
hxxp://diskdude.cjb.net/

Hugo
 

Hi oayran,

Look also TVicPort.

Beuch
 

Sorry for language:

Try change :
outp(parlport,0xff);----> _outp(parlport,0xff);
 

Re: Parallel Port Problem

you can not use i/o command and memory access for different segments in the protected mode.

If you want to use this type command you must write driver program.
 

Hello, oayran

I think below can give you little helps.

Good luck.
:roll:
 

i juse DLPort its very good try in google u will find it
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top