I am currently studying the MSDN NT DDK and the software samples that go
with it. Of specific interest are the PARPORT.C and the PARSIMP.C files.
As I look through the code I do not see any evidence of a handshaking
capability with the parallel port. Is it possible? If so, how can this
be done? Is there any sample code out there? Anything that uses the *.c
drivers mentioned above?
Thanks in advance.
Will you be sharing the parallel port with a printer and your device?? If
not, disable all of the parallel port drivers (parport.sys, parclass.sys)
and take exclusive ownership of the port. At this point, use
\ddk\src\general\portio as your boilerplate.
If you must share with a printer, then you must write a parallel class
driver in order to do this. I don't know about the handshaking so you
might have to tweak the driver in order to enable this. I don't know if
anything more than a simple tweak is required.
-Paul
Flannan Lo <flann...@dreo.dnd.ca> wrote in article
<338353...@dreo.dnd.ca>...
PARPORT itself is only a contention handler, and is not intended to be
replaced, nor should there be a need to replace it. Parallel class drivers
cooperate for ownership of the port hardware through PARPORT. PARCLASS and
PARSIMP show how this negotiation for port ownership is performed. Once a
class driver owns the port, it can perform whatever operations on the
hardware it needs to.
The code for PARCLASS is somewhat convoluted, but don't get discouraged. A
lot of code in there is specific to printer handshaking and timing issues
and can pulled out if you use it as a basis for your own driver.
Hope this helps.