Accessing LPT port from NT4.0
Posted on 1997-05-15
I wrote a programm (VC++) to access the parallel port under NT4.0.
I used the CreateFile, ReadFile and WriteFile methods to communicate with the port:
BOOL bWriteFile,bCloseHandle, bWait=FALSE, bOVResult;
bWriteFile=WriteFile(hLPT, &ccb, 1, &nNumberOfBytesWritten, &st_Overlapped);
The result: If I have installed a printer + printer driver the printer reacts (binking, message: receiving data ...). The main problem is that I will not print!
If there is no printer driver + printer installed, several errors occur as the case may be the Overlapped structure is filled.
Wrong or not defined access number
The parameter is wrong (WHICH????)
How can I write a Byte to the parallel pot WITHOUT WRITING A VXD DRIVER!!!???
Thanks to all who have a comment or solution.