[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

parallel port on NT

How we can to use the parallel port on Windows NT?  
0
pcardinal
Asked:
pcardinal
  • 4
  • 2
1 Solution
 
MDarlingCommented:
Use CreateFile to open it...

    sprintf(PortName,"LPT1",PortNo);

      hPicLpt = CreateFile( PortName, GENERIC_READ|GENERIC_WRITE,0L,0L,OPEN_EXISTING,0L,0L);

WriteFile and ReadFile (or DeviceIOControl) to talk to it...

regards,
Mike.
0
 
MDarlingCommented:
correction :

sprintf(PortName,"LPT%d",PortNo);
0
 
pcardinalAuthor Commented:
I suppose that with method I can access only to data bit.  How can access to control bit like 'busy' line?
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
MDarlingCommented:
Your quite right - If you wish to
access the individual regs then you have to write an NT device driver.

not easy - but there are some good examples in the NTDDK.

regards,
Mike.
0
 
pcardinalAuthor Commented:
What is NTDDK?  Is on MSDN disk?
0
 
MDarlingCommented:
NTDDK = the NT Device Driver Kit and
yes it comes with the MSDN subscription
or you can download it from microsoft's
web site (be warned though - it'll be a big download).

regards,
Mike.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now