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.