>How can I make a simple DOS EXE application, be able to read
>I/O port 379h in WindowsXP ?
>As simple as
> MOV DX,0379h
> IN AL,DX
>(The 379h is whatever would be the next address of the
>actual parallel port address)
>It doesn't work in XP. It seems that XP is blocking this
>address access.
>Its being working for years now in DOS/95/98/ME without any
>problem.
>XP and 2000 is just trying to put me out of business.
>Is there any solution to run this DOS application in XP?
>Thank you for saving my kids bread by helping me.
>Wagner.
Welcome to the new world of Windows programming. Surely if you
understand writing directly to hardware, you will understand why this
is not something you want to let your operating system do. The
operating system must be the arbitrator of all applications that want
to access hardware. Letting you directly address hardware with your
program would be the first hole in the* that would eventually
bring the whole system down.
If you need to write to a printer, you have two choices, one is to use
the Windows API for printing. If the API does not give you the
control that you need, then your second choice would be to write a
compliant device driver for the printer that accomplishes what you
need.
I just realized that I made a big assumption that may not be true.
You asked about the Parallel port but did not mention printers. I
guess your application could have to do with some of the other devices
that have used the parallel port over the years such as inexpensive
scanners, and the ever so loved copy protection devices. If your
needs are more along these lines and not printer related, I suspect
that you are going to have to investigate Microsoft's Driver
Development Kit.
Bob T.