ralph wrote:there is no such "Devices" in my win.ini.
I use windows 2000 profesional.
I wonder if there is a way to know if there is a printer installed, or the printer status. All the functions PrnGetname(), PrnGetport(), etc. fails if the printer is unavailable.
Ralph
I have found the same problem : GPF, with FW 2.5.
So, i have rewritted these functions : PrnGetName() and PrnGetPort().
This work ok under 98 and XP. Tell me if you have a problem please.
******************
FUNCTION WinDefPrn()
******************
* To replace PrnGetName(), failed function of Fivewin 2.5
* Return the name of the default Windows printer
* by take it directly in the Windows registry
* Pour remplacer la fonction défaillante PrnGetName() de Fivewin 2.5
* Retourne le nom de l'imprimante par défaut
* en le prenant directement dans le registre Windows
LOCAL cDefPrn := ""
LOCAL oReg := TReg32():New(HKEY_CURRENT_CONFIG, "System\CurrentControlSet\Control\Print\Printers")
IF oReg:nError = 0
cDefPrn := oReg:Get("Default", "")
ENDIF
oReg:Close()
oReg := NIL
RETURN cDefPrn