Prev: Input Parameters - IOCTL_GET_HCD_DRIVERKEY_NAME
Next: How to create a listbox for a Unidriver DLL
From: Gregory K on 2 Jun 2010 10:19 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
From: Maxim S. Shatskih on 2 Jun 2010 11:27 Open \\.\NONSPOOLED_LPT1 and write there. -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com "Gregory K" <GregoryK(a)discussions.microsoft.com> wrote in message news:5E396A77-5659-4F0B-B52D-87260B1672F4(a)microsoft.com... > 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
From: Gregory K on 2 Jun 2010 14:50 > 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
|
Pages: 1 Prev: Input Parameters - IOCTL_GET_HCD_DRIVERKEY_NAME Next: How to create a listbox for a Unidriver DLL |