Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Urgent, how read from parallel port in visual basic?

Posted on 2003-03-25
Medium Priority
Last Modified: 2013-12-26
Could someone tell me how to read and write to the parallel port in visual basic 6. I know how to do it when the OS is Windows 98 but I need to do it under Windows XP or 2000. The same dll's don't work under the newer OS's because of security issues. Thanks
Question by:ztheonly
1 Comment

Accepted Solution

y2ksw earned 240 total points
ID: 8220005
Very limited use by VB:

A process uses the *CreateFile* function to open a handle to a communications resource. For example, specifying COM1 opens a handle to a serial port, and *LPT1* opens a handle to a parallel port. If the specified resource is currently being used by another process, CreateFile fails. Any thread of the process can use the handle returned by CreateFile to identify the resource in any of the functions that access the resource.

When using CreateFile to open a handle directly to a device, an application must use the special characters " \\ .\" to identify the device. For example, to open a handle to drive A, specify " \\ .\a:" for the lpszName parameter of CreateFile. The calling process can use the handle in the DeviceIoControl function to send control codes to the device.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question