WINSPOOL: search for a printer driver

Vitaly Lipatov lav at
Wed Feb 14 08:51:11 CST 2007

When wine is loading, CUPS_LoadPrinters function get printer list from CUPS 
and add printer and their printer drivers to registry. If printer is already 
exist, we do not override nor printer driver, nor printer entry.
It all works fine.
Note, we place printer driver in "Windows 4.0" registry entry if Wine version 
is win9x and use "Windows NT x86" registry entry if Wine version is win2000 
and above.

If we will change wine version after printer loaded, Wine printing is got 
failed. Wine search in empty registry entry.

For example, I get such configuration after run wine in win98 mode:

4.0\\Drivers\\hp] 1171461136
"Configuration File"="wineps16"
"Data File"="<datafile?>"
"Dependent Files"=str(7):"<dependent files?>\0"
"Help File"="<helpfile?>"
"Monitor"="<monitor name?>"

[System\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT 
x86\\Drivers\\Version-3] 1171461821

[System\\CurrentControlSet\\Control\\Print\\Printers\\hp] 1171461818
"Description"="WINEPS Printer using CUPS"
"Location"="<physical location of printer>"
"Print Processor"="WinPrint"
"Printer Driver"="hp"

I try to find a better way to resolve this problem.
Some ideas:
1. Check if Wine version is changed and reset printer drivers.
2. Search in both registry entry in any way.
3. ...

Vitaly Lipatov, ALT Linux Team
Russia, Saint-Petersburg,

More information about the wine-devel mailing list