Hello all.
According to MSDN all classes in Win32 are local.
My experiments under Win2000 show that user32 always turns off CS_GLOBALCLASS (actually even "system" classes doesn't have it set) and does fix hInstance to the module handle.
The attached patch tries to do the same in Wine.
Comments, suggestions? -- Dmitry.