Mmsystem API timeGetTime
Eric Pouech
pouech-eric at wanadoo.fr
Sun Nov 30 09:38:41 CST 2003
Casper Hornstrup wrote:
> How can this API be implemented so it does not have to use
> ReleaseThunkLock and RestoreThunkLock (at least the Win32
> version)?
>
> DWORD WINAPI timeGetTime(void)
> {
> /* FIXME: releasing the win16 lock here is a temporary hack (I hope)
> * that lets mciavi.drv run correctly
> */
> DWORD count;
> ReleaseThunkLock(&count);
> RestoreThunkLock(count);
> TIME_MMTimeStart();
> return WINMM_IData->mmSysTimeMS;
> }
>
>
>
I see two ways of doing it:
- either use a function pointer to ReleaseThunkLock & RestoreThunkLock
which will be initialized if mmsystem is loaded (as we do for most of
the 16 bit functions we need)
- or load by hand these two function with GetProcAddress, and handle the
case where they are not defined.
I'd vote for the first one.
A+
--
Eric Pouech
More information about the wine-devel
mailing list