• Rémi Bernon's avatar
    plugplay: Broadcast WM_DEVICECHANGE message asynchronously. · f5ca0601
    Rémi Bernon authored
    It may otherwise trigger a nasty race condition, where:
    
    1) For explorer.exe to register the CLSID_ShellWindows classes, it
       needs RpcSS service to be started,
    
    2) services.exe may start WinePlugPlay service group first, waiting for
       its startup to complete,
    
    3) during startup and early device enumeration, hidclass.sys may call
       IoSetDeviceInterfaceState, which calls plugplay_send_event [1],
    
    4) plugplay_send_event tries to broadcast a WM_DEVICECHANGE message with
       BSF_QUERY, waiting for the individual threads to reply,
    
    5) which times-out because window threads are waiting on explorer.exe
       to create its desktop window and reply to the WM_NULL SendMessage.
    
    This happens more likely as there is threads with message queues
    being started, each waiting on the desktop window to reply. Usually
    explorer.exe is able to reply to some messages with the implicit
    message processing while creating its window, but not all of them.
    
    [1] Not completely sure how, it looks like some RPC too, but before
        RpcSs is started?
    Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    f5ca0601
Name
Last commit
Last update
..
arp Loading commit data...
aspnet_regiis Loading commit data...
attrib Loading commit data...
cabarc Loading commit data...
cacls Loading commit data...
chcp.com Loading commit data...
clock Loading commit data...
cmd Loading commit data...
conhost Loading commit data...
control Loading commit data...
cscript Loading commit data...
dism Loading commit data...
dplaysvr Loading commit data...
dpnsvr Loading commit data...
dpvsetup Loading commit data...
dxdiag Loading commit data...
eject Loading commit data...
expand Loading commit data...
explorer Loading commit data...
extrac32 Loading commit data...
fc Loading commit data...
find Loading commit data...
findstr Loading commit data...
fsutil Loading commit data...
hh Loading commit data...
hostname Loading commit data...
icacls Loading commit data...
icinfo Loading commit data...
iexplore Loading commit data...
ipconfig Loading commit data...
lodctr Loading commit data...
mofcomp Loading commit data...
mshta Loading commit data...
msidb Loading commit data...
msiexec Loading commit data...
msinfo32 Loading commit data...
net Loading commit data...
netsh Loading commit data...
netstat Loading commit data...
ngen Loading commit data...
notepad Loading commit data...
oleview Loading commit data...
ping Loading commit data...
plugplay Loading commit data...
powershell Loading commit data...
presentationfontcache Loading commit data...
progman Loading commit data...
reg Loading commit data...
regasm Loading commit data...
regedit Loading commit data...
regini Loading commit data...
regsvcs Loading commit data...
regsvr32 Loading commit data...
rpcss Loading commit data...
rundll.exe16 Loading commit data...
rundll32 Loading commit data...
sc Loading commit data...
schtasks Loading commit data...
sdbinst Loading commit data...
secedit Loading commit data...
servicemodelreg Loading commit data...
services Loading commit data...
shutdown Loading commit data...
spoolsv Loading commit data...
start Loading commit data...
subst Loading commit data...
svchost Loading commit data...
systeminfo Loading commit data...
taskkill Loading commit data...
tasklist Loading commit data...
taskmgr Loading commit data...
termsv Loading commit data...
uninstaller Loading commit data...
unlodctr Loading commit data...
view Loading commit data...
wevtutil Loading commit data...
where Loading commit data...
whoami Loading commit data...
wineboot Loading commit data...
winebrowser Loading commit data...
winecfg Loading commit data...
wineconsole Loading commit data...
winedbg Loading commit data...
winedevice Loading commit data...
winefile Loading commit data...
winemenubuilder Loading commit data...
winemine Loading commit data...
winemsibuilder Loading commit data...
winepath Loading commit data...
winetest Loading commit data...
winevdm Loading commit data...
winhelp.exe16 Loading commit data...
winhlp32 Loading commit data...
winmgmt Loading commit data...
winoldap.mod16 Loading commit data...
winver Loading commit data...
wmic Loading commit data...
wmplayer Loading commit data...
wordpad Loading commit data...
write Loading commit data...
wscript Loading commit data...
wuauserv Loading commit data...
wusa Loading commit data...
xcopy Loading commit data...