winspool: Small update for AddMonitor

Detlef Riekenberg wine.dev at web.de
Wed Jun 7 03:51:00 CDT 2006


During my Tests, I found a Problem in AddMonitor, that is related to
caching: (Windows cache all Monitor-Entries and is using this Cache for
all Monitor-Functions, but we do no caching and check the Registry).

RedMon works great with our code, but some Installer set Options for
the Port before calling "AddMonitor"
That works on windows, but not in wine.

Since most wine - users will never install a Printmonitor at all,
I want to avoid caching all Monitor-Entries or protect all
Monitor-Functions with a Mutex.

A small Issue is left (documented also in the Code):
When a User installs two Printmonitors at the same Time with the same
Name but with a different Driver-DLL and a Task-Switch comes between
RegQueryValueExW and RegSetValueExW, a Race Condition is possible but
silently ignored.

A Critical Section is still needed later, when we load and use the
Monitors.



Changelog:
- winspool: Small update for AddMonitor



-- 
By By ...
      ... Detlef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: update_AddMonitor.diff
Type: text/x-patch
Size: 1569 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060607/7ee2ed19/update_AddMonitor.diff


More information about the wine-patches mailing list