WINSPOOL: search for a printer driver

Vitaly Lipatov lav at etersoft.ru
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:

[System\\CurrentControlSet\\Control\\Print\\Environments\\Windows 
4.0\\Drivers\\hp] 1171461136
"Configuration File"="wineps16"
"Data File"="<datafile?>"
"Datatype"="RAW"
"Dependent Files"=str(7):"<dependent files?>\0"
"Driver"="wineps16"
"Help File"="<helpfile?>"
"Monitor"="<monitor name?>"
"Version"=dword:00000000

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

[System\\CurrentControlSet\\Control\\Print\\Printers\\hp] 1171461818
"Attributes"=dword:00000000
"Datatype"="RAW"
"Default 
DevMode"=hex:68,70,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
...
"Description"="WINEPS Printer using CUPS"
"Location"="<physical location of printer>"
"Name"="hp"
"Parameters"="<parameters?>"
"Port"="LPR:hp"
"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, www.etersoft.ru



More information about the wine-devel mailing list