Convert HTASK to void* (based on a patch by Michael Stefaniuc).

diff --git a/dlls/user/misc.c b/dlls/user/misc.c
index f9e15f7..7c64997 100644
--- a/dlls/user/misc.c
+++ b/dlls/user/misc.c
@@ -222,6 +222,17 @@
     return TRUE;
 }
 
+
+/***********************************************************************
+ *           GetAppCompatFlags   (USER32.@)
+ */
+DWORD WINAPI GetAppCompatFlags( HTASK hTask )
+{
+    FIXME("stub\n");
+    return 0;
+}
+
+
 /***********************************************************************
  *		USER_489 (USER.489)
  */
diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index 2e18aeb..196c084 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -506,6 +506,7 @@
     wmd->lpfnYieldProc = MCI_DefYieldProc;
     wmd->dwYieldData = VK_CANCEL;
     wmd->hCreatorTask = GetCurrentTask();
+    wmd->CreatorThread = GetCurrentThreadId();
 
     EnterCriticalSection(&iData->cs);
     /* wmd must be inserted in list before sending opening the driver, coz' it
@@ -2708,4 +2709,3 @@
     RegCloseKey(hWineConf);
     return TRUE;
 }
-
diff --git a/dlls/winmm/mmsystem.c b/dlls/winmm/mmsystem.c
index 6184ccb..dab1825 100644
--- a/dlls/winmm/mmsystem.c
+++ b/dlls/winmm/mmsystem.c
@@ -1969,7 +1969,13 @@
  */
 HTASK16 WINAPI mciGetCreatorTask16(UINT16 uDeviceID)
 {
-    return mciGetCreatorTask(uDeviceID);
+    LPWINE_MCIDRIVER wmd;
+    HTASK16 ret = 0;
+
+    if ((wmd = MCI_GetDriver(uDeviceID))) ret = wmd->hCreatorTask;
+
+    TRACE("(%u) => %04x\n", uDeviceID, ret);
+    return ret;
 }
 
 /**************************************************************************
@@ -1978,13 +1984,11 @@
 HTASK WINAPI mciGetCreatorTask(UINT uDeviceID)
 {
     LPWINE_MCIDRIVER	wmd;
-    HTASK		ret;
+    HTASK ret = 0;
 
-    TRACE("(%u)\n", uDeviceID);
+    if ((wmd = MCI_GetDriver(uDeviceID))) ret = (HTASK)wmd->CreatorThread;
 
-    ret = (!(wmd = MCI_GetDriver(uDeviceID))) ? 0 : wmd->hCreatorTask;
-
-    TRACE("=> %04x\n", ret);
+    TRACE("(%u) => %08lx\n", uDeviceID, ret);
     return ret;
 }
 
diff --git a/dlls/winmm/winemm.h b/dlls/winmm/winemm.h
index 5f5cef3..efa3eb1 100644
--- a/dlls/winmm/winemm.h
+++ b/dlls/winmm/winemm.h
@@ -126,6 +126,7 @@
         DWORD	                dwYieldData;
         BOOL			bIs32;
         HTASK16			hCreatorTask;
+        DWORD                   CreatorThread;
         UINT			uTypeCmdTable;
         UINT			uSpecificCmdTable;
         struct tagWINE_MCIDRIVER*lpNext;