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
ac5de27d
Commit
ac5de27d
authored
Oct 31, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 31, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/mmsystem now compiles with -DSTRICT.
parent
4bbd7b3e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
75 additions
and
71 deletions
+75
-71
Makefile.in
dlls/winmm/Makefile.in
+1
-1
driver.c
dlls/winmm/driver.c
+10
-10
joystick.c
dlls/winmm/joystick.c
+1
-1
lolvldrv.c
dlls/winmm/lolvldrv.c
+11
-10
mci.c
dlls/winmm/mci.c
+9
-9
message16.c
dlls/winmm/message16.c
+2
-2
mmio.c
dlls/winmm/mmio.c
+14
-14
mmsystem.c
dlls/winmm/mmsystem.c
+25
-21
playsound.c
dlls/winmm/playsound.c
+1
-1
winemm.h
dlls/winmm/winemm.h
+0
-1
winmm.c
dlls/winmm/winmm.c
+0
-0
mmddk.h
include/mmddk.h
+1
-1
No files found.
dlls/winmm/Makefile.in
View file @
ac5de27d
EXTRADEFS
=
-D_WINMM_
-DWINE_NO_STRICT
EXTRADEFS
=
-D_WINMM_
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../..
SRCDIR
=
@srcdir@
...
...
dlls/winmm/driver.c
View file @
ac5de27d
...
...
@@ -91,10 +91,10 @@ static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg,
if
(
pFnSendMessage16
)
ret
=
pFnSendMessage16
(
lpDrv
->
d
.
d16
.
hDriver16
,
msg
,
lParam1
,
lParam2
);
}
else
{
TRACE
(
"Before call32 proc=%p drvrID=%08lx hDrv=%
08x
wMsg=%04x p1=%08lx p2=%08lx
\n
"
,
TRACE
(
"Before call32 proc=%p drvrID=%08lx hDrv=%
p
wMsg=%04x p1=%08lx p2=%08lx
\n
"
,
lpDrv
->
d
.
d32
.
lpDrvProc
,
lpDrv
->
d
.
d32
.
dwDriverID
,
(
HDRVR
)
lpDrv
,
msg
,
lParam1
,
lParam2
);
ret
=
lpDrv
->
d
.
d32
.
lpDrvProc
(
lpDrv
->
d
.
d32
.
dwDriverID
,
(
HDRVR
)
lpDrv
,
msg
,
lParam1
,
lParam2
);
TRACE
(
"After call32 proc=%p drvrID=%08lx hDrv=%
08x
wMsg=%04x p1=%08lx p2=%08lx => %08lx
\n
"
,
TRACE
(
"After call32 proc=%p drvrID=%08lx hDrv=%
p
wMsg=%04x p1=%08lx p2=%08lx => %08lx
\n
"
,
lpDrv
->
d
.
d32
.
lpDrvProc
,
lpDrv
->
d
.
d32
.
dwDriverID
,
(
HDRVR
)
lpDrv
,
msg
,
lParam1
,
lParam2
,
ret
);
}
return
ret
;
...
...
@@ -110,12 +110,12 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1,
LPWINE_DRIVER
lpDrv
;
LRESULT
retval
=
0
;
TRACE
(
"(%
04x
, %04X, %08lX, %08lX)
\n
"
,
hDriver
,
msg
,
lParam1
,
lParam2
);
TRACE
(
"(%
p
, %04X, %08lX, %08lX)
\n
"
,
hDriver
,
msg
,
lParam1
,
lParam2
);
if
((
lpDrv
=
DRIVER_FindFromHDrvr
(
hDriver
))
!=
NULL
)
{
retval
=
DRIVER_SendMessage
(
lpDrv
,
msg
,
lParam1
,
lParam2
);
}
else
{
WARN
(
"Bad driver handle %
u
\n
"
,
hDriver
);
WARN
(
"Bad driver handle %
p
\n
"
,
hDriver
);
}
TRACE
(
"retval = %ld
\n
"
,
retval
);
...
...
@@ -343,7 +343,7 @@ LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
{
LPWINE_DRIVER
lpDrv
;
TRACE
(
"(%
04x
, %08lX, %08lX);
\n
"
,
hDrvr
,
lParam1
,
lParam2
);
TRACE
(
"(%
p
, %08lX, %08lX);
\n
"
,
hDrvr
,
lParam1
,
lParam2
);
if
((
lpDrv
=
DRIVER_FindFromHDrvr
(
hDrvr
))
!=
NULL
)
{
...
...
@@ -399,7 +399,7 @@ DWORD WINAPI GetDriverFlags(HDRVR hDrvr)
LPWINE_DRIVER
lpDrv
;
DWORD
ret
=
0
;
TRACE
(
"(%
04x
)
\n
"
,
hDrvr
);
TRACE
(
"(%
p
)
\n
"
,
hDrvr
);
if
((
lpDrv
=
DRIVER_FindFromHDrvr
(
hDrvr
))
!=
NULL
)
{
ret
=
WINE_GDF_EXIST
|
lpDrv
->
dwFlags
;
...
...
@@ -416,13 +416,13 @@ HMODULE WINAPI GetDriverModuleHandle(HDRVR hDrvr)
LPWINE_DRIVER
lpDrv
;
HMODULE
hModule
=
0
;
TRACE
(
"(%
04x
);
\n
"
,
hDrvr
);
TRACE
(
"(%
p
);
\n
"
,
hDrvr
);
if
((
lpDrv
=
DRIVER_FindFromHDrvr
(
hDrvr
))
!=
NULL
)
{
if
(
!
(
lpDrv
->
dwFlags
&
WINE_GDF_16BIT
))
hModule
=
lpDrv
->
d
.
d32
.
hModule
;
}
TRACE
(
"=> %
04x
\n
"
,
hModule
);
TRACE
(
"=> %
p
\n
"
,
hModule
);
return
hModule
;
}
...
...
@@ -454,7 +454,7 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE
(
"(%08lX, %04X, %
04X
, %04X, %08lX, %08lX, %08lX); !
\n
"
,
TRACE
(
"(%08lX, %04X, %
p
, %04X, %08lX, %08lX, %08lX); !
\n
"
,
dwCallBack
,
uFlags
,
hDev
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
switch
(
uFlags
&
DCB_TYPEMASK
)
{
...
...
@@ -464,7 +464,7 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
WARN
(
"uFlags=%04X has null DCB value, but dwCallBack=%08lX is not null !
\n
"
,
uFlags
,
dwCallBack
);
break
;
case
DCB_WINDOW
:
TRACE
(
"Window(%04lX) handle=%
04X
!
\n
"
,
dwCallBack
,
hDev
);
TRACE
(
"Window(%04lX) handle=%
p
!
\n
"
,
dwCallBack
,
hDev
);
PostMessageA
((
HWND
)
dwCallBack
,
wMsg
,
(
WPARAM
)
hDev
,
dwParam1
);
break
;
case
DCB_TASK
:
/* aka DCB_THREAD */
...
...
dlls/winmm/joystick.c
View file @
ac5de27d
...
...
@@ -269,7 +269,7 @@ MMRESULT WINAPI joyReleaseCapture(UINT wID)
*/
MMRESULT
WINAPI
joySetCapture
(
HWND
hWnd
,
UINT
wID
,
UINT
wPeriod
,
BOOL
bChanged
)
{
TRACE
(
"(%
04X
, %04X, %d, %d);
\n
"
,
hWnd
,
wID
,
wPeriod
,
bChanged
);
TRACE
(
"(%
p
, %04X, %d, %d);
\n
"
,
hWnd
,
wID
,
wPeriod
,
bChanged
);
if
(
wID
>=
MAXJOYSTICK
||
hWnd
==
0
)
return
JOYERR_PARMS
;
if
(
wPeriod
<
JOY_PERIOD_MIN
||
wPeriod
>
JOY_PERIOD_MAX
)
return
JOYERR_PARMS
;
...
...
dlls/winmm/lolvldrv.c
View file @
ac5de27d
...
...
@@ -295,10 +295,10 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
if
(
!
mld
)
return
NULL
;
/* find an empty slot in MM_MLDrvs table */
for
(
*
hndl
=
0
;
*
hndl
<
MAX_MM_MLDRVS
;
(
*
hndl
)
++
)
{
for
(
*
hndl
=
0
;
(
DWORD
)
*
hndl
<
MAX_MM_MLDRVS
;
(
*
hndl
)
++
)
{
if
(
!
MM_MLDrvs
[(
UINT
)
*
hndl
])
break
;
}
if
(
*
hndl
==
MAX_MM_MLDRVS
)
{
if
(
(
DWORD
)
*
hndl
==
MAX_MM_MLDRVS
)
{
/* the MM_MLDrvs table could be made growable in the future if needed */
ERR
(
"Too many open drivers
\n
"
);
return
NULL
;
...
...
@@ -343,7 +343,7 @@ void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld)
return
;
}
}
ERR
(
"Bad Handle %
08x
at %p (not freed)
\n
"
,
hndl
,
mld
);
ERR
(
"Bad Handle %
p
at %p (not freed)
\n
"
,
hndl
,
mld
);
}
/**************************************************************************
...
...
@@ -413,26 +413,27 @@ LPWINE_MLD MMDRV_GetByID(UINT uDevID, UINT type)
/**************************************************************************
* MMDRV_Get [internal]
*/
LPWINE_MLD
MMDRV_Get
(
HANDLE
hndl
,
UINT
type
,
BOOL
bCanBeID
)
LPWINE_MLD
MMDRV_Get
(
HANDLE
_
hndl
,
UINT
type
,
BOOL
bCanBeID
)
{
LPWINE_MLD
mld
=
NULL
;
UINT
hndl
=
(
UINT
)
_hndl
;
assert
(
type
<
MMDRV_MAX
);
if
(
(
UINT
)
hndl
>=
llTypes
[
type
].
wMaxId
&&
if
(
hndl
>=
llTypes
[
type
].
wMaxId
&&
hndl
!=
(
UINT16
)
-
1
&&
hndl
!=
(
UINT
)
-
1
)
{
if
(
(
UINT
)
hndl
&
0x8000
)
{
hndl
=
(
HANDLE
)((
UINT
)
hndl
&
~
0x8000
)
;
if
(
hndl
&
0x8000
)
{
hndl
=
hndl
&
~
0x8000
;
if
(
hndl
<
sizeof
(
MM_MLDrvs
)
/
sizeof
(
MM_MLDrvs
[
0
]))
{
mld
=
MM_MLDrvs
[
(
UINT
)
hndl
];
mld
=
MM_MLDrvs
[
hndl
];
if
(
!
mld
||
!
HeapValidate
(
GetProcessHeap
(),
0
,
mld
)
||
mld
->
type
!=
type
)
mld
=
NULL
;
}
hndl
=
(
HANDLE
)((
UINT
)
hndl
|
0x8000
)
;
hndl
=
hndl
|
0x8000
;
}
}
if
(
mld
==
NULL
&&
bCanBeID
)
{
mld
=
MMDRV_GetByID
(
(
UINT
)
hndl
,
type
);
mld
=
MMDRV_GetByID
(
hndl
,
type
);
}
return
mld
;
}
...
...
dlls/winmm/mci.c
View file @
ac5de27d
...
...
@@ -217,7 +217,7 @@ static BOOL MCI_IsCommandTableValid(UINT uTbl)
int
idx
=
0
;
BOOL
inCst
=
FALSE
;
TRACE
(
"Dumping cmdTbl=%d [hMem=%
08x
devType=%d]
\n
"
,
TRACE
(
"Dumping cmdTbl=%d [hMem=%
p
devType=%d]
\n
"
,
uTbl
,
S_MciCmdTable
[
uTbl
].
hMem
,
S_MciCmdTable
[
uTbl
].
uDevType
);
if
(
uTbl
>=
MAX_MCICMDTABLE
||
!
S_MciCmdTable
[
uTbl
].
hMem
||
!
S_MciCmdTable
[
uTbl
].
lpTable
)
...
...
@@ -315,7 +315,7 @@ static UINT MCI_GetCommandTable(UINT uDevType)
if
(
hMem
)
{
uTbl
=
MCI_SetCommandTable
(
hMem
,
uDevType
);
}
else
{
WARN
(
"No command table found in resource %
04x
[%s]
\n
"
,
WARN
(
"No command table found in resource %
p
[%s]
\n
"
,
WINMM_IData
->
hWinMM32Instance
,
str
);
}
}
...
...
@@ -538,7 +538,7 @@ static DWORD MCI_LoadMciDriver(LPCSTR _strDevTyp, LPWINE_MCIDRIVER* lpwmd)
wmd
->
uSpecificCmdTable
=
LOWORD
(
modp
.
wCustomCommandTable
);
wmd
->
uTypeCmdTable
=
MCI_COMMAND_TABLE_NOT_LOADED
;
TRACE
(
"Loaded driver %
x
(%s), type is %d, cmdTable=%08x
\n
"
,
TRACE
(
"Loaded driver %
p
(%s), type is %d, cmdTable=%08x
\n
"
,
wmd
->
hDriver
,
strDevTyp
,
modp
.
wType
,
modp
.
wCustomCommandTable
);
wmd
->
lpstrDeviceType
=
strDevTyp
;
...
...
@@ -878,7 +878,7 @@ DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet,
LPSTR
devAlias
=
NULL
;
BOOL
bAutoOpen
=
FALSE
;
TRACE
(
"('%s', %p, %d, %
X
)
\n
"
,
lpstrCommand
,
lpstrRet
,
uRetLen
,
hwndCallback
);
TRACE
(
"('%s', %p, %d, %
p
)
\n
"
,
lpstrCommand
,
lpstrRet
,
uRetLen
,
hwndCallback
);
/* format is <command> <device> <optargs> */
if
(
!
(
verb
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpstrCommand
)
+
1
)))
...
...
@@ -1103,7 +1103,7 @@ UINT WINAPI mciLoadCommandResource(HINSTANCE hInst, LPCWSTR resNameW, UINT type)
HGLOBAL
hMem
;
UINT16
ret
=
MCI_NO_COMMAND_TABLE
;
TRACE
(
"(%
04x
, %s, %d)!
\n
"
,
hInst
,
debugstr_w
(
resNameW
),
type
);
TRACE
(
"(%
p
, %s, %d)!
\n
"
,
hInst
,
debugstr_w
(
resNameW
),
type
);
/* if a file named "resname.mci" exits, then load resource "resname" from it
* otherwise directly from driver
...
...
@@ -1333,14 +1333,14 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms)
TRACE
(
"wDevID=%04X wDeviceID=%d dwRet=%ld
\n
"
,
wmd
->
wDeviceID
,
lpParms
->
wDeviceID
,
dwRet
);
if
(
dwParam
&
MCI_NOTIFY
)
mciDriverNotify
(
lpParms
->
dwCallback
,
wmd
->
wDeviceID
,
MCI_NOTIFY_SUCCESSFUL
);
mciDriverNotify
(
(
HWND
)
lpParms
->
dwCallback
,
wmd
->
wDeviceID
,
MCI_NOTIFY_SUCCESSFUL
);
return
0
;
errCleanUp:
if
(
wmd
)
MCI_UnLoadMciDriver
(
wmd
);
if
(
dwParam
&
MCI_NOTIFY
)
mciDriverNotify
(
lpParms
->
dwCallback
,
0
,
MCI_NOTIFY_FAILURE
);
mciDriverNotify
(
(
HWND
)
lpParms
->
dwCallback
,
0
,
MCI_NOTIFY_FAILURE
);
return
dwRet
;
}
...
...
@@ -1380,7 +1380,7 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
MCI_UnLoadMciDriver
(
wmd
);
if
(
dwParam
&
MCI_NOTIFY
)
mciDriverNotify
(
lpParms
->
dwCallback
,
wDevID
,
mciDriverNotify
(
(
HWND
)
lpParms
->
dwCallback
,
wDevID
,
(
dwRet
==
0
)
?
MCI_NOTIFY_SUCCESSFUL
:
MCI_NOTIFY_FAILURE
);
return
dwRet
;
...
...
@@ -1503,7 +1503,7 @@ static DWORD MCI_Break(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms)
if
(
lpParms
==
NULL
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
if
(
dwFlags
&
MCI_NOTIFY
)
mciDriverNotify
(
lpParms
->
dwCallback
,
wDevID
,
mciDriverNotify
(
(
HWND
)
lpParms
->
dwCallback
,
wDevID
,
(
dwRet
==
0
)
?
MCI_NOTIFY_SUCCESSFUL
:
MCI_NOTIFY_FAILURE
);
return
dwRet
;
...
...
dlls/winmm/message16.c
View file @
ac5de27d
...
...
@@ -41,7 +41,7 @@ extern WORD CALLBACK MMDRV_CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LON
*/
static
void
MMDRV_Callback
(
LPWINE_MLD
mld
,
HDRVR
hDev
,
UINT
uMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE
(
"CB (*%08lx)(%
08x
%08x %08lx %08lx %08lx
\n
"
,
TRACE
(
"CB (*%08lx)(%
p
%08x %08lx %08lx %08lx
\n
"
,
mld
->
dwCallback
,
hDev
,
uMsg
,
mld
->
dwClientInstance
,
dwParam1
,
dwParam2
);
if
(
!
mld
->
bFrom32
&&
(
mld
->
dwFlags
&
DCB_TYPEMASK
)
==
DCB_FUNCTION
)
{
...
...
@@ -1764,7 +1764,7 @@ static BOOL MMDRV_GetDescription16(const char* fname, char* buf, int buflen)
ret
=
TRUE
;
TRACE
(
"Got '%s' [%d]
\n
"
,
buf
,
buflen
);
theEnd:
CloseHandl
e
(
hFile
);
_lclos
e
(
hFile
);
return
ret
;
}
...
...
dlls/winmm/mmio.c
View file @
ac5de27d
...
...
@@ -671,7 +671,7 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
(
LPARAM
)
szFileName
,
0
,
MMIO_PROC_32A
);
/* grab file size, when possible */
wm
->
dwFileSize
=
GetFileSize
(
wm
->
info
.
adwInfo
[
0
],
NULL
);
wm
->
dwFileSize
=
GetFileSize
(
(
HANDLE
)
wm
->
info
.
adwInfo
[
0
],
NULL
);
if
(
refmminfo
->
wErrorRet
==
0
)
return
wm
->
info
.
hmmio
;
...
...
@@ -714,7 +714,7 @@ MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT uFlags)
LPWINE_MMIO
wm
;
MMRESULT
result
;
TRACE
(
"(%
04X
, %04X);
\n
"
,
hmmio
,
uFlags
);
TRACE
(
"(%
p
, %04X);
\n
"
,
hmmio
,
uFlags
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -746,7 +746,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
LPWINE_MMIO
wm
;
LONG
count
;
TRACE
(
"(%
04X
, %p, %ld);
\n
"
,
hmmio
,
pch
,
cch
);
TRACE
(
"(%
p
, %p, %ld);
\n
"
,
hmmio
,
pch
,
cch
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
-
1
;
...
...
@@ -796,7 +796,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
LPWINE_MMIO
wm
;
LONG
count
;
TRACE
(
"(%
04X
, %p, %ld);
\n
"
,
hmmio
,
pch
,
cch
);
TRACE
(
"(%
p
, %p, %ld);
\n
"
,
hmmio
,
pch
,
cch
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
-
1
;
...
...
@@ -851,7 +851,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
LPWINE_MMIO
wm
;
LONG
offset
;
TRACE
(
"(%
04X
, %08lX, %d);
\n
"
,
hmmio
,
lOffset
,
iOrigin
);
TRACE
(
"(%
p
, %08lX, %d);
\n
"
,
hmmio
,
lOffset
,
iOrigin
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -916,7 +916,7 @@ MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags)
{
LPWINE_MMIO
wm
;
TRACE
(
"(
0x%04x
,%p,0x%08x)
\n
"
,
hmmio
,
lpmmioinfo
,
uFlags
);
TRACE
(
"(
%p
,%p,0x%08x)
\n
"
,
hmmio
,
lpmmioinfo
,
uFlags
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -936,7 +936,7 @@ MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO* lpmmioinfo, UINT uFlags
{
LPWINE_MMIO
wm
;
TRACE
(
"(
0x%04x
,%p,0x%08x)
\n
"
,
hmmio
,
lpmmioinfo
,
uFlags
);
TRACE
(
"(
%p
,%p,0x%08x)
\n
"
,
hmmio
,
lpmmioinfo
,
uFlags
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -963,7 +963,7 @@ MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT
{
LPWINE_MMIO
wm
;
TRACE
(
"(hmmio=%
04x
, pchBuf=%p, cchBuf=%ld, uFlags=%#08x)
\n
"
,
TRACE
(
"(hmmio=%
p
, pchBuf=%p, cchBuf=%ld, uFlags=%#08x)
\n
"
,
hmmio
,
pchBuffer
,
cchBuffer
,
uFlags
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
...
...
@@ -979,7 +979,7 @@ MMRESULT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags)
{
LPWINE_MMIO
wm
;
TRACE
(
"(%
04X
, %04X)
\n
"
,
hmmio
,
uFlags
);
TRACE
(
"(%
p
, %04X)
\n
"
,
hmmio
,
uFlags
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -994,7 +994,7 @@ MMRESULT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags)
{
LPWINE_MMIO
wm
;
TRACE
(
"hmmio=%
04X
, lpmmioinfo=%p, uFlags=%04X
\n
"
,
hmmio
,
lpmmioinfo
,
uFlags
);
TRACE
(
"hmmio=%
p
, lpmmioinfo=%p, uFlags=%04X
\n
"
,
hmmio
,
lpmmioinfo
,
uFlags
);
/* NOTE: mmioAdvance16 heavily relies on parameters from lpmmioinfo we're using
* here. be sure if you change something here to check mmioAdvance16 as well
...
...
@@ -1101,7 +1101,7 @@ LRESULT MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1,
{
LPWINE_MMIO
wm
;
TRACE
(
"(%
04X
, %u, %ld, %ld, %d)
\n
"
,
hmmio
,
uMessage
,
lParam1
,
lParam2
,
type
);
TRACE
(
"(%
p
, %u, %ld, %ld, %d)
\n
"
,
hmmio
,
uMessage
,
lParam1
,
lParam2
,
type
);
if
(
uMessage
<
MMIOM_USER
)
return
MMSYSERR_INVALPARAM
;
...
...
@@ -1132,7 +1132,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
FOURCC
srchType
;
TRACE
(
"(%
04X
, %p, %p, %04X);
\n
"
,
hmmio
,
lpck
,
lpckParent
,
uFlags
);
TRACE
(
"(%
p
, %p, %p, %04X);
\n
"
,
hmmio
,
lpck
,
lpckParent
,
uFlags
);
if
(
lpck
==
NULL
)
return
MMSYSERR_INVALPARAM
;
...
...
@@ -1230,7 +1230,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
*/
MMRESULT
WINAPI
mmioAscend
(
HMMIO
hmmio
,
LPMMCKINFO
lpck
,
UINT
uFlags
)
{
TRACE
(
"(%
04X
, %p, %04X);
\n
"
,
hmmio
,
lpck
,
uFlags
);
TRACE
(
"(%
p
, %p, %04X);
\n
"
,
hmmio
,
lpck
,
uFlags
);
if
(
lpck
->
dwFlags
&
MMIO_DIRTY
)
{
DWORD
dwOldPos
,
dwNewSize
;
...
...
@@ -1268,7 +1268,7 @@ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO* lpck, UINT uFlags)
LONG
size
;
LONG
ix
;
TRACE
(
"(%
04X
, %p, %04X);
\n
"
,
hmmio
,
lpck
,
uFlags
);
TRACE
(
"(%
p
, %p, %04X);
\n
"
,
hmmio
,
lpck
,
uFlags
);
dwOldPos
=
mmioSeek
(
hmmio
,
0
,
SEEK_CUR
);
TRACE
(
"dwOldPos=%ld
\n
"
,
dwOldPos
);
...
...
dlls/winmm/mmsystem.c
View file @
ac5de27d
...
...
@@ -55,6 +55,9 @@ static LRESULT DRIVER_CloseDriver16(HDRVR16, LPARAM, LPARAM);
static
LRESULT
DRIVER_SendMessage16
(
HDRVR16
,
UINT
,
LPARAM
,
LPARAM
);
static
LRESULT
MMIO_Callback16
(
SEGPTR
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
#define HMODULE_32(h16) ((HMODULE)(ULONG_PTR)(h16))
#define HINSTANCE_32(h16) ((HMODULE)(ULONG_PTR)(h16))
/* ###################################################
* # LIBRARY #
* ###################################################
...
...
@@ -69,7 +72,7 @@ static LRESULT MMIO_Callback16(SEGPTR, LPMMIOINFO, UINT, LPARAM, LPARAM
BOOL
WINAPI
MMSYSTEM_LibMain
(
DWORD
fdwReason
,
HINSTANCE
hinstDLL
,
WORD
ds
,
WORD
wHeapSize
,
DWORD
dwReserved1
,
WORD
wReserved2
)
{
TRACE
(
"
0x%x
0x%lx
\n
"
,
hinstDLL
,
fdwReason
);
TRACE
(
"
%p
0x%lx
\n
"
,
hinstDLL
,
fdwReason
);
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
...
...
@@ -130,7 +133,7 @@ BOOL16 WINAPI PlaySound16(LPCSTR pszSound, HMODULE16 hmod, DWORD fdwSound)
DWORD
lc
;
ReleaseThunkLock
(
&
lc
);
retv
=
PlaySoundA
(
pszSound
,
hmod
,
fdwSound
);
retv
=
PlaySoundA
(
pszSound
,
HMODULE_32
(
hmod
)
,
fdwSound
);
RestoreThunkLock
(
lc
);
return
retv
;
...
...
@@ -444,7 +447,7 @@ UINT16 WINAPI auxGetDevCaps16(UINT16 uDeviceID, LPAUXCAPS16 lpCaps, UINT16 uSize
TRACE
(
"(%04X, %p, %d) !
\n
"
,
uDeviceID
,
lpCaps
,
uSize
);
if
((
wmld
=
MMDRV_Get
(
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
if
((
wmld
=
MMDRV_Get
(
(
HANDLE
)(
ULONG_PTR
)
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
return
MMDRV_Message
(
wmld
,
AUXDM_GETDEVCAPS
,
(
DWORD
)
lpCaps
,
uSize
,
TRUE
);
}
...
...
@@ -458,7 +461,7 @@ UINT16 WINAPI auxGetVolume16(UINT16 uDeviceID, LPDWORD lpdwVolume)
TRACE
(
"(%04X, %p) !
\n
"
,
uDeviceID
,
lpdwVolume
);
if
((
wmld
=
MMDRV_Get
(
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
if
((
wmld
=
MMDRV_Get
(
(
HANDLE
)(
ULONG_PTR
)
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
return
MMDRV_Message
(
wmld
,
AUXDM_GETVOLUME
,
(
DWORD
)
lpdwVolume
,
0L
,
TRUE
);
}
...
...
@@ -472,7 +475,7 @@ UINT16 WINAPI auxSetVolume16(UINT16 uDeviceID, DWORD dwVolume)
TRACE
(
"(%04X, %lu) !
\n
"
,
uDeviceID
,
dwVolume
);
if
((
wmld
=
MMDRV_Get
(
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
if
((
wmld
=
MMDRV_Get
(
(
HANDLE
)(
ULONG_PTR
)
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
return
MMDRV_Message
(
wmld
,
AUXDM_SETVOLUME
,
dwVolume
,
0L
,
TRUE
);
}
...
...
@@ -500,7 +503,7 @@ DWORD WINAPI auxOutMessage16(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD
uDeviceID
,
uMessage
,
dw1
,
dw2
);
break
;
}
if
((
wmld
=
MMDRV_Get
(
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
if
((
wmld
=
MMDRV_Get
(
(
HANDLE
)(
ULONG_PTR
)
uDeviceID
,
MMDRV_AUX
,
TRUE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
return
MMDRV_Message
(
wmld
,
uMessage
,
dw1
,
dw2
,
TRUE
);
...
...
@@ -633,7 +636,8 @@ HTASK16 WINAPI mciGetCreatorTask16(UINT16 uDeviceID)
LPWINE_MCIDRIVER
wmd
;
HTASK16
ret
=
0
;
if
((
wmd
=
MCI_GetDriver
(
uDeviceID
)))
ret
=
K32WOWHandle16
(
wmd
->
CreatorThread
,
WOW_TYPE_HTASK
);
if
((
wmd
=
MCI_GetDriver
(
uDeviceID
)))
ret
=
HTASK_16
(
wmd
->
CreatorThread
);
TRACE
(
"(%u) => %04x
\n
"
,
uDeviceID
,
ret
);
return
ret
;
...
...
@@ -1214,7 +1218,7 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16* lphWaveOut, UINT16 uDeviceID,
const
LPWAVEFORMATEX
lpFormat
,
DWORD
dwCallback
,
DWORD
dwInstance
,
DWORD
dwFlags
)
{
H
WAVEOUT
hWaveOut
;
H
ANDLE
hWaveOut
;
UINT
ret
;
/* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
...
...
@@ -1508,7 +1512,7 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID,
const
LPWAVEFORMATEX
lpFormat
,
DWORD
dwCallback
,
DWORD
dwInstance
,
DWORD
dwFlags
)
{
H
WAVEIN
hWaveIn
;
H
ANDLE
hWaveIn
;
UINT
ret
;
/* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
...
...
@@ -1856,7 +1860,7 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD);
* bit.0 set means create a 16 bit task instead of thread calling a 16 bit proc
* bit.1 set means to open a VxD for this thread (unsupported)
*/
LRESULT
WINAPI
mmThreadCreate16
(
FARPROC16
fpThreadAddr
,
LPHANDLE
lpHndl
,
DWORD
dwPmt
,
DWORD
dwFlags
)
LRESULT
WINAPI
mmThreadCreate16
(
FARPROC16
fpThreadAddr
,
LPHANDLE
16
lpHndl
,
DWORD
dwPmt
,
DWORD
dwFlags
)
{
HANDLE16
hndl
;
LRESULT
ret
;
...
...
@@ -1912,7 +1916,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD d
CloseHandle
(
lpMMThd
->
hEvent
);
ret
=
2
;
}
else
{
TRACE
(
"Got a nice thread hndl=
0x%04x
id=0x%08lx
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
dwThreadID
);
TRACE
(
"Got a nice thread hndl=
%p
id=0x%08lx
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
dwThreadID
);
ret
=
0
;
}
}
else
{
...
...
@@ -2103,21 +2107,21 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD _pmt)
TRACE
(
"(%04x %p)
\n
"
,
hndl
,
lpMMThd
);
lpMMThd
->
hTask
=
LOWORD
(
GetCurrentTask
());
TRACE
(
"[10-%
08x
] setting hTask to 0x%08x
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
hTask
);
TRACE
(
"[10-%
p
] setting hTask to 0x%08x
\n
"
,
lpMMThd
->
hThread
,
lpMMThd
->
hTask
);
lpMMThd
->
dwStatus
=
0x10
;
MMSYSTEM_ThreadBlock
(
lpMMThd
);
TRACE
(
"[20-%
08x
]
\n
"
,
lpMMThd
->
hThread
);
TRACE
(
"[20-%
p
]
\n
"
,
lpMMThd
->
hThread
);
lpMMThd
->
dwStatus
=
0x20
;
if
(
lpMMThd
->
fpThread
)
{
MMSYSTEM_CallTo16_long_l
(
lpMMThd
->
fpThread
,
lpMMThd
->
dwThreadPmt
);
}
lpMMThd
->
dwStatus
=
0x30
;
TRACE
(
"[30-%
08x
]
\n
"
,
lpMMThd
->
hThread
);
TRACE
(
"[30-%
p
]
\n
"
,
lpMMThd
->
hThread
);
while
(
lpMMThd
->
dwCounter
)
{
Sleep
(
1
);
/* K32WOWYield16();*/
}
TRACE
(
"[XX-%
08x
]
\n
"
,
lpMMThd
->
hThread
);
TRACE
(
"[XX-%
p
]
\n
"
,
lpMMThd
->
hThread
);
/* paranoia */
lpMMThd
->
dwSignature
=
WINE_MMTHREAD_DELETED
;
/* close lpMMThread->hVxD directIO */
...
...
@@ -2138,7 +2142,7 @@ BOOL16 WINAPI mmShowMMCPLPropertySheet16(HWND hWnd, LPCSTR lpStrDevice,
HANDLE
hndl
;
BOOL16
ret
=
FALSE
;
TRACE
(
"(%
04x
\"
%s
\"
\"
%s
\"
\"
%s
\"
)
\n
"
,
hWnd
,
lpStrDevice
,
lpStrTab
,
lpStrTitle
);
TRACE
(
"(%
p
\"
%s
\"
\"
%s
\"
\"
%s
\"
)
\n
"
,
hWnd
,
lpStrDevice
,
lpStrTab
,
lpStrTitle
);
hndl
=
LoadLibraryA
(
"MMSYS.CPL"
);
if
(
hndl
!=
0
)
{
...
...
@@ -2546,10 +2550,10 @@ DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrRet,
/**************************************************************************
* mciLoadCommandResource [MMSYSTEM.705]
*/
UINT16
WINAPI
mciLoadCommandResource16
(
H
ANDL
E16
hInst
,
LPCSTR
resname
,
UINT16
type
)
UINT16
WINAPI
mciLoadCommandResource16
(
H
INSTANC
E16
hInst
,
LPCSTR
resname
,
UINT16
type
)
{
LPCWSTR
ptr
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
resname
);
UINT
ret
=
mciLoadCommandResource
(
hInst
,
ptr
,
type
);
UINT
ret
=
mciLoadCommandResource
(
HINSTANCE_32
(
hInst
)
,
ptr
,
type
);
HeapFree
(
GetProcessHeap
(),
0
,
(
LPWSTR
)
ptr
);
return
ret
;
}
...
...
@@ -2697,7 +2701,7 @@ HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16,
mmioinfo
.
adwInfo
[
0
]
=
lpmmioinfo16
->
adwInfo
[
0
];
/* if we don't have a file name, it's likely a passed open file descriptor */
if
(
!
szFileName
)
mmioinfo
.
adwInfo
[
0
]
=
DosFileHandleToWin32Handle
(
mmioinfo
.
adwInfo
[
0
]);
mmioinfo
.
adwInfo
[
0
]
=
(
DWORD
)
DosFileHandleToWin32Handle
(
mmioinfo
.
adwInfo
[
0
]);
mmioinfo
.
adwInfo
[
1
]
=
lpmmioinfo16
->
adwInfo
[
1
];
mmioinfo
.
adwInfo
[
2
]
=
lpmmioinfo16
->
adwInfo
[
2
];
mmioinfo
.
adwInfo
[
3
]
=
lpmmioinfo16
->
adwInfo
[
3
];
...
...
@@ -2756,7 +2760,7 @@ MMRESULT16 WINAPI mmioGetInfo16(HMMIO16 hmmio, MMIOINFO16* lpmmioinfo, UINT16 uF
TRACE
(
"(0x%04x,%p,0x%08x)
\n
"
,
hmmio
,
lpmmioinfo
,
uFlags
);
if
((
wm
=
MMIO_Get
(
hmmio
))
==
NULL
)
if
((
wm
=
MMIO_Get
(
HMMIO_32
(
hmmio
)
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
ret
=
mmioGetInfo
(
HMMIO_32
(
hmmio
),
&
mmioinfo
,
uFlags
);
...
...
@@ -2767,7 +2771,7 @@ MMRESULT16 WINAPI mmioGetInfo16(HMMIO16 hmmio, MMIOINFO16* lpmmioinfo, UINT16 uF
lpmmioinfo
->
pIOProc
=
(
wm
->
ioProc
->
type
==
MMIO_PROC_16
)
?
(
LPMMIOPROC16
)
wm
->
ioProc
->
pIOProc
:
NULL
;
lpmmioinfo
->
wErrorRet
=
mmioinfo
.
wErrorRet
;
lpmmioinfo
->
hTask
=
mmioinfo
.
hTask
;
lpmmioinfo
->
hTask
=
HTASK_16
(
mmioinfo
.
hTask
)
;
lpmmioinfo
->
cchBuffer
=
mmioinfo
.
cchBuffer
;
lpmmioinfo
->
pchBuffer
=
(
void
*
)
wm
->
segBuffer16
;
lpmmioinfo
->
pchNext
=
(
void
*
)(
wm
->
segBuffer16
+
(
mmioinfo
.
pchNext
-
mmioinfo
.
pchBuffer
));
...
...
dlls/winmm/playsound.c
View file @
ac5de27d
...
...
@@ -409,7 +409,7 @@ BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSound, BO
{
WINE_PLAYSOUND
*
wps
=
NULL
;
TRACE
(
"pszSound='%p' hmod=%
04X
fdwSound=%08lX
\n
"
,
TRACE
(
"pszSound='%p' hmod=%
p
fdwSound=%08lX
\n
"
,
pszSound
,
hmod
,
fdwSound
);
/* FIXME? I see no difference between SND_NOWAIT and SND_NOSTOP !
...
...
dlls/winmm/winemm.h
View file @
ac5de27d
...
...
@@ -200,7 +200,6 @@ typedef struct tagWINE_MM_IDATA {
/* winmm part */
HANDLE
hWinMM32Instance
;
HANDLE
hWinMM16Instance
;
HANDLE
h16Module32
;
CRITICAL_SECTION
cs
;
/* mm timer part */
HANDLE
hMMTimer
;
...
...
dlls/winmm/winmm.c
View file @
ac5de27d
This diff is collapsed.
Click to expand it.
include/mmddk.h
View file @
ac5de27d
...
...
@@ -497,7 +497,7 @@ void WINAPI mmTaskBlock16(HINSTANCE16 hInst);
LRESULT
WINAPI
mmTaskSignal16
(
HTASK16
ht
);
void
WINAPI
mmTaskYield16
(
void
);
LRESULT
WINAPI
mmThreadCreate16
(
FARPROC16
fpThreadAddr
,
LPHANDLE
lpHndl
,
LRESULT
WINAPI
mmThreadCreate16
(
FARPROC16
fpThreadAddr
,
LPHANDLE
16
lpHndl
,
DWORD
dwPmt
,
DWORD
dwFlags
);
void
WINAPI
mmThreadSignal16
(
HANDLE16
hndl
);
void
WINAPI
mmThreadBlock16
(
HANDLE16
hndl
);
...
...
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