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

Free access to parallel port in Windows XP SP2

Status
Not open for further replies.

mustang82

Junior Member level 3
Joined
Dec 2, 2005
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Third Rock from the sun
Activity points
1,556
hello,

I need to output data via the parallel port for controlling some hardware. But i am using XP with SP2 which brings about several restrictions on parallel port access. I know of a sys file called watpara.sys whose copy and registration in windows/system 32 folder removes this restrictions in windows 2000. If any of you are aware of this is it applicable in windows xp too. Is there any other alternative for free access to parallel port regardless of the use of any particular software.

I want the free access like they have for 98 or 95.

Thanks
 

mirvidon

Member level 1
Joined
Nov 14, 2005
Messages
41
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,286
Location
Spain
Activity points
1,613
lpt port sniffing

Try with some of this sugestions:

- The following registry entry will stop Windows XP checking for new printer connections: [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Parport\Parameters] "DisableWarmPoll"=dword:00000001

- Try disabling the Windows parallel port device driver. On some computers this may make the parallel port inaccessible.
 

aldevan

Full Member level 2
Joined
Aug 2, 2005
Messages
143
Helped
14
Reputation
28
Reaction score
2
Trophy points
1,298
Location
São Paulo - Brazil
Activity points
2,422
disable parallel port registry xp

you can use these drivers: porttalk, UserPort, Port95nt , if you want this file I can upload it
 

mustang82

Junior Member level 3
Joined
Dec 2, 2005
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Third Rock from the sun
Activity points
1,556
deviceiocontrol parallel port

Thank you all for your suggestions but i do not wish to use any software but rather some registry changes or a patched dll etc. Mirvidon, I might try your solution but it should be a harmless operation as my printer also attaches to the same parallel port.
 

hr_rezaee

Advanced Member level 3
Joined
Oct 6, 2004
Messages
751
Helped
109
Reputation
218
Reaction score
24
Trophy points
1,298
Location
Iran-Mashhad
Activity points
4,036
open lpt port in xp

hr_rezaee said:
hi
see www.logix4u.net
that contains many usful information about parallel port and XP and solutions.
in this site you can find dll, activex and c source for your problem.
you can see!!
 

The Svin

Junior Member level 3
Joined
Mar 5, 2005
Messages
31
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,734
port sniffer parallel

I work with par. port in NT Windows (XP included).
The Field is unknown\undocumented chip\signal analysing. Usualy done by creating some ugly device (wich is to catch signal IR,RF or digital from chip) connected to PP. When you get full control (without any stupid Windows driver policy) you can get it in ~1Mh rate despite of declared 400 kh.
The way I do it - a driver that gives ring 3 app that called it access to some ports by changing IO map for the process. Then you can work with usual IN\OUT commands directly from ring 3 app.

The idea of the driver is not mine, I picked it from Four-F, and just modified a little bit. The original idea and driver you can get here
hxxp://ghirai.com/hutch/files/masm_KMDKit_and_Tutorial.zip
 

The Svin

Junior Member level 3
Joined
Mar 5, 2005
Messages
31
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,734
par poort software xp

I wrote here is a very simple example how to grand access for ring3 app to IO with PP ports
 

yogi

Full Member level 6
Joined
Jan 8, 2005
Messages
339
Helped
22
Reputation
44
Reaction score
5
Trophy points
1,298
Activity points
2,181
parallel sniffer

install userport.zip for interfacing parallel port in C,C++,JAVA. For more detail about see my book

MY EXPERIENCE IN PARALLEL PORT INTERFACING
you can get it from yahoo group-booksbybibin
http://groups.yahoo.com/group/booksbybibin/
 

mmelsadek

Newbie level 2
Joined
Mar 31, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Egypt
Activity points
1,324
parallel port registry

since windows 2000 and XP have a restriction in accessing hardware resources via it's addresses you can avoid this restriction by accessing the ports via it's driver using the following API Functions

1- to Open the parallel port use the following function
hDevice = CreateFileW(
"LPT1",
GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);

2- to write to the parallel port use the following function
DeviceIoControl(
hDevice,
IOCTL_PP_WRITE_DATA,
&Value,
sizeof(Value),
&FakeByteForDriverBug,
sizeof(FakeByteForDriverBug),
&Transferred,
NULL);

3- to access the control pins use
DeviceIoControl(
hDevice,
IOCTL_PP_WRITE_CONTROL,
&Value,
sizeof(Value),
&FakeByteForDriverBug,
sizeof(FakeByteForDriverBug),
&Transferred,
NULL);

4- to read the status pins use
DeviceIoControl(
hDevice,
IOCTL_PP_READ_STATUS,
NULL,
0,
pValue,
sizeof(UCHAR),
&Transferred,
NULL);

5- and finally to close the paralllel port (you must close it after you finish your work to make it avilable for other programs) use
CloseHandle(hDevice);

these function can be used from any programming language (they are built in the operating system itself) and work in win 98 to win XP

please refer to your compiler documentation for more information
note also that there is no book describe these functions, only the compiler documentation does so.

for furthur information see the attached C file

Good Luck
 

mzlin0708

Newbie level 1
Joined
Jun 20, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
parallel port c compiler in xp

You can use this library.
 

sss123

Junior Member level 1
Joined
Mar 15, 2006
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,357
registry editing of parrallel port

Any body knows a parallel port sniffer software that could work on XP?
 

sohel

Newbie level 1
Joined
Jun 27, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,284
usage deviceiocontrol lpt

I want to make moving display, can anybody help me to design circuit.
 

ehsanelahimirza

Full Member level 6
Joined
Feb 24, 2006
Messages
336
Helped
28
Reputation
56
Reaction score
7
Trophy points
1,298
Activity points
3,567
paraller port sniffer windows

sss123 said:
Any body knows a parallel port sniffer software that could work on XP?
u try to search google bcz once i neede i got a lot of things about the same problem
 

F Wong

Newbie level 3
Joined
May 31, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,308
Re: parallel port registry

Hello,

Your code looks extremely interesting and fits my need.
Howevere I can't compile with the Microsoft Visual C++ 6.0
because many constants have not been defined.

What is the recommended compiler?

Thank you so much
F. Wong

since windows 2000 and XP have a restriction in accessing hardware resources via it's addresses you can avoid this restriction by accessing the ports via it's driver using the following API Functions

1- to Open the parallel port use the following function
hDevice = CreateFileW(
"LPT1",
GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);

2- to write to the parallel port use the following function
DeviceIoControl(
hDevice,
IOCTL_PP_WRITE_DATA,
&Value,
sizeof(Value),
&FakeByteForDriverBug,
sizeof(FakeByteForDriverBug),
&Transferred,
NULL);

3- to access the control pins use
DeviceIoControl(
hDevice,
IOCTL_PP_WRITE_CONTROL,
&Value,
sizeof(Value),
&FakeByteForDriverBug,
sizeof(FakeByteForDriverBug),
&Transferred,
NULL);

4- to read the status pins use
DeviceIoControl(
hDevice,
IOCTL_PP_READ_STATUS,
NULL,
0,
pValue,
sizeof(UCHAR),
&Transferred,
NULL);

5- and finally to close the paralllel port (you must close it after you finish your work to make it avilable for other programs) use
CloseHandle(hDevice);

these function can be used from any programming language (they are built in the operating system itself) and work in win 98 to win XP

please refer to your compiler documentation for more information
note also that there is no book describe these functions, only the compiler documentation does so.

for furthur information see the attached C file

Good Luck
 

F Wong

Newbie level 3
Joined
May 31, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,308
Re: Parallel port in XP

Hello,

I found some var. def in your attchment (ppapi.h):
IOCTL_PP_WRITE_DATA
IOCTL_PP_WRITE CONTROL
IOCTL_PP_READ_STATUS

But I don't see the def for IOCTL_PP_READ_DATA.

I did search files such as devioctl.h, winioctl.h. ntddpar.h etc
but I could not make up the value for IOCTL_PP_READ_DATA.

Please help.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top