Dear all

How to communication with parallel port device under user mode?

Any API can do this? or it's need comunication in kernel mode

Not directly to I/O port

Just like "PC Anywhere" can connect 2 computers by parallel cable
Posted on 2004-06-11 03:20:34 by jordanc

Use Porttalk v2.0 from
or GiveIO or AccessIO and search google.
Posted on 2004-06-11 09:11:54 by KSA
Or just use CreateFile with "LPT1"
Posted on 2004-06-11 09:44:21 by Sephiroth3
Dear KSA
The PortTalk is directly to I/O port, so it's not 100% meet my request

Dear Sephiroth3
I had try this way, but always get error when CreateFile, and return error code =2
do you have any example codes

thanks to all
Posted on 2004-06-14 21:14:46 by jordanc
from what i've found, i think this is pretty hard and you need some sort of drivers, so i just used a package that installs the drivers, and then you can read/write with a simple api call.
i think this is the one i used
hope this helps
Posted on 2004-06-15 07:07:06 by someone
This should work:
xor eax,eax

push eax
push eax
push eax
push eax
push offset Lpt1
call CreateFile
Lpt1 db "LPT1",0
Posted on 2004-06-15 07:44:43 by Sephiroth3
this code doesnt work in WinXP

mov edi,eax
push eax
invoke WriteFile,edi,addr szBuffer,1,esp,0 ;it's locked ? ? ?
pop eax
invoke CloseHandle,edi

Driver based solution:
Posted on 2004-06-15 08:14:33 by Criminal2
lpNumberOfBytesWritten will point to the lpOverlapped parameter, but I don't know if that makes a difference...
Posted on 2004-06-15 11:20:21 by Sephiroth3