Dmitry Timoshkov dmitry@baikal.ru writes:
@@ -84,7 +84,16 @@ BOOL VFWAPIV MCIWndRegisterClass(HINSTAN { WNDCLASSW wc;
- wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS | CS_OWNDC;
- /* Since we are going to register a class belonging to MSVFW32
* and later we will create windows with a different hInstance
* CS_GLOBALCLASS is needed. And because the second attempt
* to register a global class will fail we need to test whether
* the class was already registered.
*/
- if (GetClassInfoW(MSVFW32_hModule, mciWndClassW, &wc))
return TRUE;
This is not thread-safe; if you need to know why the class creation failed you should check the last error returned from RegisterClassW.