Discussion Locked

Detecting number and location of paralle

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am looking for a way to detect the number of parallel ports and location (address) of these ports. This solution must work for a Window application running in either Windows 95/98 or Windows NT.

I have successfully used a pointer to the BIOS to detect and communicate over the parallel ports in a DOS based application that runs on both Windows 95/98 or Windows NT. The problem is that this code does not work in a Window based application.

I noticed that Win32 SDK has the command
void GetParallelPortsList(LPSTR szSymbol);
GetParallelPortsList sets the specified symbol to a list of all parallel ports (that is, "LPT1","LPT2",_).
Argument
szSymbol
Specifies the name of the symbol to associate with the list.

But it doesn't give very much information on how to use this command and even after getting a list of ports, I still do not know what other command is required to open that port.

Any ideas on how to proceed are appriciated.

2 replies

by pjbotti

The download looks like a good program to detect system hardware. However, it is written in visual basic, which is a language that I am unfamiliar with, and come with insufficient documentation on how to use it. There is a file path that is incorrect. My preffered languages are ANSI C and C++. If someone knows of an SDK function or library that I could use in a C environment, that would be helpfull.

This discussion is closed to new replies.