Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2b0e56c8
Commit
2b0e56c8
authored
Oct 29, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now only storing thread id for mci tasks (16 bit htask is now gotten
from WOW functions).
parent
c07a6cf5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
13 deletions
+27
-13
driver.c
dlls/winmm/driver.c
+2
-0
mci.c
dlls/winmm/mci.c
+0
-1
mmsystem.c
dlls/winmm/mmsystem.c
+24
-9
winemm.h
dlls/winmm/winemm.h
+1
-3
No files found.
dlls/winmm/driver.c
View file @
2b0e56c8
...
...
@@ -34,6 +34,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(driver);
static
LPWINE_DRIVER
lpDrvItemList
=
NULL
;
WINE_MMTHREAD
*
(
*
pFnGetMMThread16
)(
HANDLE16
h
)
/* = NULL */
;
/**************************************************************************
* DRIVER_GetNumberOfModuleRefs [internal]
*
...
...
dlls/winmm/mci.c
View file @
2b0e56c8
...
...
@@ -489,7 +489,6 @@ static DWORD MCI_LoadMciDriver(LPCSTR _strDevTyp, LPWINE_MCIDRIVER* lpwmd)
wmd
->
lpfnYieldProc
=
MCI_DefYieldProc
;
wmd
->
dwYieldData
=
VK_CANCEL
;
wmd
->
hCreatorTask
=
GetCurrentTask
();
wmd
->
CreatorThread
=
GetCurrentThreadId
();
EnterCriticalSection
(
&
WINMM_IData
->
cs
);
...
...
dlls/winmm/mmsystem.c
View file @
2b0e56c8
...
...
@@ -49,6 +49,7 @@ extern LONG CALLBACK MMSYSTEM_CallTo16_long_l (FARPROC16,LONG);
extern
LONG
CALLBACK
MMSYSTEM_CallTo16_long_lwll
(
LPMMIOPROC16
,
LONG
,
WORD
,
LONG
,
LONG
);
/* ### stop build ### */
static
WINE_MMTHREAD
*
WINMM_GetmmThread
(
HANDLE16
);
static
LRESULT
MMIO_Callback16
(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
/* ###################################################
...
...
@@ -85,10 +86,12 @@ BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
WINMM_IData
->
h16Module32
=
hndl
;
/* hook in our 16 bit function pointers */
pFnMmioCallback16
=
MMIO_Callback16
;
pFnGetMMThread16
=
WINMM_GetmmThread
;
break
;
case
DLL_PROCESS_DETACH
:
FreeLibrary
(
WINMM_IData
->
h16Module32
);
pFnMmioCallback16
=
NULL
;
pFnGetMMThread16
=
NULL
;
break
;
case
DLL_THREAD_ATTACH
:
case
DLL_THREAD_DETACH
:
...
...
@@ -625,7 +628,7 @@ HTASK16 WINAPI mciGetCreatorTask16(UINT16 uDeviceID)
LPWINE_MCIDRIVER
wmd
;
HTASK16
ret
=
0
;
if
((
wmd
=
MCI_GetDriver
(
uDeviceID
)))
ret
=
wmd
->
hCreatorTask
;
if
((
wmd
=
MCI_GetDriver
(
uDeviceID
)))
ret
=
K32WOWHandle16
(
wmd
->
CreatorThread
,
WOW_TYPE_HTASK
)
;
TRACE
(
"(%u) => %04x
\n
"
,
uDeviceID
,
ret
);
return
ret
;
...
...
@@ -1829,6 +1832,18 @@ void WINAPI mmTaskYield16(void)
extern
DWORD
WINAPI
GetProcessFlags
(
DWORD
);
/******************************************************************
* WINMM_GetmmThread
*
*
*/
static
WINE_MMTHREAD
*
WINMM_GetmmThread
(
HANDLE16
h
)
{
return
(
WINE_MMTHREAD
*
)
MapSL
(
MAKESEGPTR
(
h
,
0
)
);
}
void
WINAPI
WINE_mmThreadEntryPoint
(
DWORD
);
/**************************************************************************
* mmThreadCreate [MMSYSTEM.1120]
*
...
...
@@ -1850,7 +1865,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD d
if
(
hndl
==
0
)
{
ret
=
2
;
}
else
{
WINE_MMTHREAD
*
lpMMThd
=
MapSL
(
MAKESEGPTR
(
hndl
,
0
)
);
WINE_MMTHREAD
*
lpMMThd
=
WINMM_GetmmThread
(
hndl
);
#if 0
/* force mmtask routines even if mmthread is required */
...
...
@@ -1938,7 +1953,7 @@ void WINAPI mmThreadSignal16(HANDLE16 hndl)
TRACE
(
"(%04x)!
\n
"
,
hndl
);
if
(
hndl
)
{
WINE_MMTHREAD
*
lpMMThd
=
MapSL
(
MAKESEGPTR
(
hndl
,
0
)
);
WINE_MMTHREAD
*
lpMMThd
=
WINMM_GetmmThread
(
hndl
);
lpMMThd
->
dwCounter
++
;
if
(
lpMMThd
->
hThread
!=
0
)
{
...
...
@@ -1994,7 +2009,7 @@ void WINAPI mmThreadBlock16(HANDLE16 hndl)
TRACE
(
"(%04x)!
\n
"
,
hndl
);
if
(
hndl
)
{
WINE_MMTHREAD
*
lpMMThd
=
MapSL
(
MAKESEGPTR
(
hndl
,
0
)
);
WINE_MMTHREAD
*
lpMMThd
=
WINMM_GetmmThread
(
hndl
);
if
(
lpMMThd
->
hThread
!=
0
)
{
DWORD
lc
;
...
...
@@ -2019,7 +2034,7 @@ BOOL16 WINAPI mmThreadIsCurrent16(HANDLE16 hndl)
TRACE
(
"(%04x)!
\n
"
,
hndl
);
if
(
hndl
&&
mmThreadIsValid16
(
hndl
))
{
WINE_MMTHREAD
*
lpMMThd
=
MapSL
(
MAKESEGPTR
(
hndl
,
0
)
);
WINE_MMTHREAD
*
lpMMThd
=
WINMM_GetmmThread
(
hndl
);
ret
=
(
GetCurrentThreadId
()
==
lpMMThd
->
dwThreadID
);
}
TRACE
(
"=> %d
\n
"
,
ret
);
...
...
@@ -2036,7 +2051,7 @@ BOOL16 WINAPI mmThreadIsValid16(HANDLE16 hndl)
TRACE
(
"(%04x)!
\n
"
,
hndl
);
if
(
hndl
)
{
WINE_MMTHREAD
*
lpMMThd
=
MapSL
(
MAKESEGPTR
(
hndl
,
0
)
);
WINE_MMTHREAD
*
lpMMThd
=
WINMM_GetmmThread
(
hndl
);
if
(
!
IsBadWritePtr
(
lpMMThd
,
sizeof
(
WINE_MMTHREAD
))
&&
lpMMThd
->
dwSignature
==
WINE_MMTHREAD_CREATED
&&
...
...
@@ -2068,19 +2083,19 @@ HANDLE16 WINAPI mmThreadGetTask16(HANDLE16 hndl)
TRACE
(
"(%04x)
\n
"
,
hndl
);
if
(
mmThreadIsValid16
(
hndl
))
{
WINE_MMTHREAD
*
lpMMThd
=
MapSL
(
MAKESEGPTR
(
hndl
,
0
)
);
WINE_MMTHREAD
*
lpMMThd
=
WINMM_GetmmThread
(
hndl
);
ret
=
lpMMThd
->
hTask
;
}
return
ret
;
}
/**************************************************************************
*
__wine
_mmThreadEntryPoint (MMSYSTEM.2047)
*
WINE
_mmThreadEntryPoint (MMSYSTEM.2047)
*/
void
WINAPI
WINE_mmThreadEntryPoint
(
DWORD
_pmt
)
{
HANDLE16
hndl
=
(
HANDLE16
)
_pmt
;
WINE_MMTHREAD
*
lpMMThd
=
MapSL
(
MAKESEGPTR
(
hndl
,
0
)
);
WINE_MMTHREAD
*
lpMMThd
=
WINMM_GetmmThread
(
hndl
);
TRACE
(
"(%04x %p)
\n
"
,
hndl
,
lpMMThd
);
...
...
dlls/winmm/winemm.h
View file @
2b0e56c8
...
...
@@ -147,7 +147,6 @@ typedef struct tagWINE_MCIDRIVER {
YIELDPROC
lpfnYieldProc
;
DWORD
dwYieldData
;
BOOL
bIs32
;
HTASK16
hCreatorTask
;
DWORD
CreatorThread
;
UINT
uTypeCmdTable
;
UINT
uSpecificCmdTable
;
...
...
@@ -255,8 +254,6 @@ DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD dwParam1, DWORD dwParam2,
DWORD
MCI_SendCommandFrom32
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
);
DWORD
MCI_SendCommandFrom16
(
UINT
wDevID
,
UINT16
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
);
void
CALLBACK
WINE_mmThreadEntryPoint
(
DWORD
_pmt
);
void
MMSYSTEM_MMTIME16to32
(
LPMMTIME
mmt32
,
const
MMTIME16
*
mmt16
);
void
MMSYSTEM_MMTIME32to16
(
LPMMTIME16
mmt16
,
const
MMTIME
*
mmt32
);
...
...
@@ -344,6 +341,7 @@ extern LPWINE_MM_IDATA WINMM_IData;
* NULL otherwise
*/
extern
LRESULT
(
*
pFnMmioCallback16
)(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
extern
WINE_MMTHREAD
*
(
*
pFnGetMMThread16
)(
HANDLE16
);
/* HANDLE16 -> HANDLE conversions */
#define HDRVR_32(h16) ((HDRVR)(ULONG_PTR)(h16))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment