Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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.
 

vomit

Full Member level 2
Joined
Jun 14, 2002
Messages
148
Helped
14
Reputation
28
Reaction score
4
Trophy points
1,298
Activity points
1,527
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)
 

Epegic

Member level 5
Joined
Mar 29, 2002
Messages
84
Helped
24
Reputation
46
Reaction score
19
Trophy points
1,288
Activity points
597
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
 

real_tr

Member level 3
Joined
Mar 22, 2002
Messages
63
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Turkiye
Activity points
433
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:
 

HugoRatlos

Member level 2
Joined
Oct 15, 2001
Messages
50
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Location
good old europe
Activity points
322
may this will help a little
hxxp://wxw.beyondlogic.org/porttalk/porttalk.htm

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

Hugo
 

beuch

Member level 3
Joined
Jun 6, 2001
Messages
65
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
France
Activity points
518
Hi oayran,

Look also TVicPort.

Beuch
 

harri_el_sucio

Member level 1
Joined
Apr 2, 2002
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
230
Sorry for language:

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

bunalmis

Full Member level 5
Joined
Jan 3, 2003
Messages
268
Helped
19
Reputation
38
Reaction score
11
Trophy points
1,298
Location
Ireland
Activity points
2,147
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.
 

cheolim

Full Member level 1
Joined
Dec 3, 2002
Messages
97
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
873
Hello, oayran

I think below can give you little helps.

Good luck.
:roll:
 

jOKEr

Newbie level 1
Joined
Feb 2, 2003
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Poland
Activity points
6
i juse DLPort its very good try in google u will find it
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top