On creating 16bit windows convert null instances to current process

Dmitry Timoshkov dmitry at baikal.ru
Sat Dec 31 05:43:18 CST 2005


"Joseph Garvin" <k04jg02 at kzoo.edu> wrote:

> +    /* Correct if instance is null now, because later we won't
> +       be able to tell the difference between a 16-bit NULL and
> +       a 32-bit NULL */
> +
> +    if (!instance) 
> +    {
> +        HTASK16 hTask = GetCurrentTask();
> +        TDB *tdb = GlobalLock16(x);
> +        instance = tdb->hInstance;
> +        GlobalUnlock(tdb);
> +    }

Did you ever test it? GlobalLock16 on x coordinate won't return you anything
useful, not mentioning a TDB pointer. Probably you meant GlobalLock(hTask)?
And GlobalUnlock(tdb) is not right at all, you want GlobalUnlock16(hTask).

-- 
Dmitry.



More information about the wine-devel mailing list