George,
I expected something like this ;-)
I found a piece of code on MSDN on how to iterate the printers defined. The problem is that W95 uses both the win.ini and the registry to store this. To complicate things, it is very easy to get these out of sync leaving the list returned in a state of chaos. NT only stores it in the registry and is therefor a lot more reliable.
Thanx for the info.
Regards,
Ron
>>How can I check what is connected to my lpt-ports and if the connected device is online.
>>I need to do this from FPW26...
>>
>>Thanks,
>>
>>Ron
>
>You'd have to check the WIN.INI file to determine what the printers and printer ports are. The easiest way to do this is either to load Foxtools and use the GetProfileString() function in the API to check the various sections of the file (Windows, Ports, Printers) or parse the file using low level file I/O.
>
>As for telling if the printer is on-line or not, even Windows doesn't know that. That functionality is handled through the printer driver which is accessed by winspool.drv. Sorry.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement