Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6b22861b
Commit
6b22861b
authored
Oct 19, 2009
by
Jörg Höhle
Committed by
Alexandre Julliard
Nov 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: MCI Close all causes one notification per open driver.
parent
c4b5bd44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
mci.c
dlls/winmm/mci.c
+1
-9
mci.c
dlls/winmm/tests/mci.c
+8
-5
No files found.
dlls/winmm/mci.c
View file @
6b22861b
...
...
@@ -1676,11 +1676,8 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwParam
,
lpParms
);
/* Every device must handle MCI_NOTIFY on its own. */
if
(
wDevID
==
MCI_ALL_DEVICE_ID
)
{
/* FIXME: shall I notify once after all is done, or for
* each of the open drivers ? if the latest, which notif
* to return when only one fails ?
*/
while
(
MciDrivers
)
{
/* Retrieve the device ID under lock, but send the message without,
* the driver might be calling some winmm functions from another
...
...
@@ -1707,11 +1704,6 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
MCI_UnLoadMciDriver
(
wmd
);
if
(
dwParam
&
MCI_NOTIFY
)
mciDriverNotify
(
lpParms
?
(
HWND
)
lpParms
->
dwCallback
:
0
,
wDevID
,
dwRet
?
MCI_NOTIFY_FAILURE
:
MCI_NOTIFY_SUCCESSFUL
);
return
dwRet
;
}
...
...
dlls/winmm/tests/mci.c
View file @
6b22861b
...
...
@@ -152,6 +152,7 @@ static void test_notification1(HWND hwnd, const char* command, WPARAM type)
static
void
test_openCloseWAVE
(
HWND
hwnd
)
{
MCIERROR
err
;
MCI_GENERIC_PARMS
parm
;
const
char
command_open
[]
=
"open new type waveaudio alias mysound"
;
const
char
command_close_my
[]
=
"close mysound notify"
;
const
char
command_close_all
[]
=
"close all notify"
;
...
...
@@ -179,7 +180,7 @@ static void test_openCloseWAVE(HWND hwnd)
ok
(
!
err
,
"mci %s returned error: %d
\n
"
,
command_close_my
,
err
);
test_notification
(
hwnd
,
command_close_my
,
MCI_NOTIFY_SUCCESSFUL
);
Sleep
(
5
);
t
odo_wine
test_notification1
(
hwnd
,
command_close_my
,
0
);
t
est_notification
(
hwnd
,
command_close_my
,
0
);
err
=
mciSendString
(
command_close_all
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
err
,
"mci %s (without buffer) returned error: %d
\n
"
,
command_close_all
,
err
);
...
...
@@ -198,10 +199,12 @@ static void test_openCloseWAVE(HWND hwnd)
todo_wine
ok
(
buf
[
0
]
==
'0'
&&
buf
[
1
]
==
0
,
"mci %s, expected output buffer '0', got: '%s'
\n
"
,
command_sysinfo
,
buf
);
err
=
mciSendCommand
(
MCI_ALL_DEVICE_ID
,
MCI_CLOSE
,
MCI_NOTIFY
,
0
);
todo_wine
ok
(
err
==
MCIERR_INVALID_DEVICE_ID
||
broken
(
!
err
),
/* Win9x and WinMe */
"mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, 0) returned %s instead of MCIERR_INVALID_DEVICE_ID
\n
"
,
dbg_mcierr
(
err
));
ok
(
!
err
,
"mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, 0) returned %s
\n
"
,
dbg_mcierr
(
err
));
parm
.
dwCallback
=
(
DWORD_PTR
)
hwnd
;
err
=
mciSendCommand
(
MCI_ALL_DEVICE_ID
,
MCI_CLOSE
,
MCI_NOTIFY
,
(
DWORD_PTR
)
&
parm
);
ok
(
!
err
,
"mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, hwnd) returned %s
\n
"
,
dbg_mcierr
(
err
));
test_notification
(
hwnd
,
command_close_all
,
0
);
/* None left */
}
static
void
test_recordWAVE
(
HWND
hwnd
)
...
...
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