Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > how to write integer to LPT under windows 7

Reply
Thread Tools Display Modes

how to write integer to LPT under windows 7

 
 
Gregory K
Guest
Posts: n/a

 
      06-02-2010
My program (C++) needs to write an integer value to the printer port. I used
TVicPort driver that was developed just for that purpose
(http://www.entechtaiwan.com/dev/port/index.shtm). Unfortunately it does not
work under Windows 7. Can somebody suggest software that would allow my
program to write an integer to a parallel port (LPT1, LPT2 etc)?
Gregory
 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      06-02-2010
Open \\.\NONSPOOLED_LPT1 and write there.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

"Gregory K" <> wrote in message news:5E396A77-5659-4F0B-B52D-...
> My program (C++) needs to write an integer value to the printer port. I used
> TVicPort driver that was developed just for that purpose
> (http://www.entechtaiwan.com/dev/port/index.shtm). Unfortunately it does not
> work under Windows 7. Can somebody suggest software that would allow my
> program to write an integer to a parallel port (LPT1, LPT2 etc)?
> Gregory

 
Reply With Quote
 
Gregory K
Guest
Posts: n/a

 
      06-02-2010
> Open \\.\NONSPOOLED_LPT1 and write there.

I tried it. Does not work.

HANDLE h = CreateFile("NONSPOOLED_LPT1", GENERIC_WRITE, 0, 0, OPEN_EXISTING,
0, 0);
returns invalid handle when I use "NONSPOOLED_LPT1", "\\.\NONSPOOLED_LPT1",
"\\\\.\\NONSPOOLED_LPT1".

if I use "LPT1", it creates a handle successfully but WriteFile returns an
error.
I reproduced the same problem under XP, so I must be doing something wrong.
Can you help?
Gregory

 
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
Windows Update keeps coming back with updates I already installed. JustWantItToWork Windows Update 5 03-01-2010 04:50 PM
Overriding default SBS 2008 policies Andrew M. Saucci, Jr. Windows Small Business Server 4 02-08-2010 07:36 AM
I also have an error 646 in Windows update. Please help. Jose Windows Update 12 01-09-2010 01:00 PM
How do you repair windows entirely using your Windows Vista DVD Jonathan Yaniv- Windows Live Butterfly Expert Windows Vista Performance 16 02-12-2008 06:28 PM



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