[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Add support for some other MCI_ commands and implement
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2003-12-30 23:08:23
Message-ID: 87n099gazc.fsf () mail ! wine ! dyndns ! org
[Download RAW message or body]

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.

-- 
Alexandre Julliard
julliard@winehq.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic