From: zubeyir on
Hi everybody,
i had written a driver uses inport() and outport() macros to write to
LPT1 . I use base address 378h and data port 378h + 400h, Driver is
working truely, But there is another PC HP compaq desktop . Driver
didnt work . I look from XP hardware manager , LPT1 io resource is at
EF00 - EF07. I had decided to use EF03h as ECP data port.Printer isnt
writing. Is there anyone to help me about true ECP register location
at this computer .
From: Maxim S. Shatskih on
> i had written a driver uses inport() and outport() macros to write to
> LPT1

You cannot do this reliably, the port is owned by parport.sys, and you can only send requests to parport.sys

Otherwise, you will have races with parport.sys and thus major issues.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: zubeyir on
On Jul 24, 11:58 pm, "Maxim S. Shatskih"
<ma...(a)storagecraft.com.no.spam> wrote:
> > i had written a driver uses inport() and outport() macros to write  to
> > LPT1
>
> You cannot do this reliably, the port is owned by parport.sys, and you can only send requests to parport.sys
>
> Otherwise, you will have races with parport.sys and thus major issues.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
> ma...(a)storagecraft.comhttp://www.storagecraft.com

Thank you for answer .
The OS was XP SP1 and parallel port base address was 378h . I had used
import() and outport() macros and no problem . New computer HP Compaq
dx2420 and the os is XP SP3 , I use EF00 base address and EF03h data
port . What is the problem . Is it about registry or another things
you said . Please , tell me details .
From: Maxim S. Shatskih on
>port . What is the problem . Is it about registry or another things
>you said . Please , tell me details .

About things I said.

What you do is unreliable by definition. It is absolutely normal that this approach works on one machine and does not on another.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Maxim S. Shatskih on
>The OS was XP SP1 and parallel port base address was 378h . I had used
>import() and outport() macros and no problem .

Proper way of doing things like this these in proper OSes (like Windows or Linux or FreeBSD or MacOS):

a) look at the API to the OS-provided parallel port driver
b) if this API is enough for you - use it
c) otherwise, develop a _full replacement_ of the OS-provided driver. To install such full replacement to Windows, patch the ImagePath registry value, this will get rid of PnP (but not KMCS!) signature checks.

inport() and outport() can only be used reliably for your purpose in MS-DOS or the standalone bare-metal OS-less boot environment (but modern days people usually avoid them in favour of WinPE - better but requires the royalty - or specially tailored Linux - worse but free).

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com