Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Re: parallel port addresses

Reply
Thread Tools Display Modes

Re: parallel port addresses

 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      07-24-2010
> 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

http://www.storagecraft.com

 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      07-25-2010
>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

http://www.storagecraft.com

 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      07-26-2010
>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

http://www.storagecraft.com

 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      08-01-2010
>I think i must use "\Device\ParallelPort0" for parport.sys . i have hp
>laserjet 1320 printer.it is bidirectional


And what is the exact task you need to do to the printer?

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Jonathan Wilson
Guest
Posts: n/a

 
      08-01-2010
> Only printing.
What are you doing that cant be done via a regular printer driver?
 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      08-02-2010
>Only printing.

Then why not use the mainstream Windows API?

They are printer-independent after all.

More so: parallel port is dying, and most printers are USB now.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      08-02-2010
>I want to print a simple text documan , in kernel-mode,from a kernel-
>driver i had written


Offload all of this to user-mode process which will call the standard GDI APIs.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallel port under Windows 7 Gregory K Windows Vista Drivers 0 06-21-2010 09:57 PM
Re: VPN keeps dropping at the 3 minute mark Cliff Galiher Windows Small Business Server 3 12-07-2009 02:36 PM
What happen error VPN rasman.log Uyyy Server Networking 0 11-25-2009 05:46 PM
cannot install Vista ACPI error Salsakidd Windows Vista Installation 6 10-10-2007 10:12 AM
Stop Error 0x0000007b Louis LeBrun Windows Vista Installation 17 07-05-2006 09:00 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59