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
e8946873
Commit
e8946873
authored
Mar 31, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Apr 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Support MCI "close all" command.
This is not yet generalized to "pause all" or "stop all".
parent
7d1199de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
mci.c
dlls/winmm/mci.c
+9
-3
mci.c
dlls/winmm/tests/mci.c
+3
-3
No files found.
dlls/winmm/mci.c
View file @
e8946873
...
...
@@ -1224,6 +1224,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
{
LPWSTR
verb
,
dev
,
args
;
LPWINE_MCIDRIVER
wmd
=
0
;
MCIDEVICEID
uDevID
;
DWORD
dwFlags
=
0
,
dwRet
=
0
;
int
offset
=
0
;
DWORD_PTR
data
[
MCI_DATA_SIZE
];
...
...
@@ -1252,6 +1253,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
if
((
dwRet
=
MCI_GetString
(
&
dev
,
&
args
)))
{
goto
errCleanUp
;
}
uDevID
=
strcmpiW
(
dev
,
wszAll
)
?
0
:
MCI_ALL_DEVICE_ID
;
/* Determine devType from open */
if
(
!
strcmpW
(
verb
,
wszOpen
))
{
...
...
@@ -1307,6 +1309,10 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
dwFlags
|=
MCI_OPEN_ELEMENT
;
data
[
3
]
=
(
DWORD_PTR
)
dev
;
}
if
(
MCI_ALL_DEVICE_ID
==
uDevID
)
{
dwRet
=
MCIERR_CANNOT_USE_ALL
;
goto
errCleanUp
;
}
if
(
!
strstrW
(
args
,
wszSAliasS
)
&&
!
dev
)
{
dwRet
=
MCIERR_NEW_REQUIRES_ALIAS
;
goto
errCleanUp
;
...
...
@@ -1320,7 +1326,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
MCI_UnLoadMciDriver
(
wmd
);
goto
errCleanUp
;
}
}
else
if
(
!
(
wmd
=
MCI_GetDriver
(
mciGetDeviceIDW
(
dev
))))
{
}
else
if
(
(
MCI_ALL_DEVICE_ID
!=
uDevID
)
&&
!
(
wmd
=
MCI_GetDriver
(
mciGetDeviceIDW
(
dev
))))
{
/* auto open */
static
const
WCHAR
wszOpenWait
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
' '
,
'%'
,
's'
,
' '
,
'w'
,
'a'
,
'i'
,
't'
,
0
};
WCHAR
buf
[
128
];
...
...
@@ -1384,7 +1390,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
if
(
lpstrRet
&&
uRetLen
)
*
lpstrRet
=
'\0'
;
TRACE
(
"[%d, %s, %08x, %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08lx/%s]
\n
"
,
wmd
->
wDevice
ID
,
MCI_MessageToString
(
MCI_GetMessage
(
lpCmd
)),
dwFlags
,
wmd
?
wmd
->
wDeviceID
:
uDev
ID
,
MCI_MessageToString
(
MCI_GetMessage
(
lpCmd
)),
dwFlags
,
data
[
0
],
debugstr_w
((
WCHAR
*
)
data
[
0
]),
data
[
1
],
debugstr_w
((
WCHAR
*
)
data
[
1
]),
data
[
2
],
debugstr_w
((
WCHAR
*
)
data
[
2
]),
data
[
3
],
debugstr_w
((
WCHAR
*
)
data
[
3
]),
data
[
4
],
debugstr_w
((
WCHAR
*
)
data
[
4
]),
data
[
5
],
debugstr_w
((
WCHAR
*
)
data
[
5
]));
...
...
@@ -1394,7 +1400,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
MCI_UnLoadMciDriver
(
wmd
);
/* FIXME: notification is not properly shared across two opens */
}
else
{
dwRet
=
MCI_SendCommand
(
wmd
->
wDevice
ID
,
MCI_GetMessage
(
lpCmd
),
dwFlags
,
(
DWORD_PTR
)
data
);
dwRet
=
MCI_SendCommand
(
wmd
?
wmd
->
wDeviceID
:
uDev
ID
,
MCI_GetMessage
(
lpCmd
),
dwFlags
,
(
DWORD_PTR
)
data
);
}
TRACE
(
"=> 1/ %x (%s)
\n
"
,
dwRet
,
debugstr_w
(
lpstrRet
));
dwRet
=
MCI_HandleReturnValues
(
dwRet
,
wmd
,
retType
,
data
,
lpstrRet
,
uRetLen
);
...
...
dlls/winmm/tests/mci.c
View file @
e8946873
...
...
@@ -217,11 +217,11 @@ static void test_openCloseWAVE(HWND hwnd)
}
err
=
mciSendString
(
command_close_all
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
!
err
,
"mci %s (without buffer) returned %s
\n
"
,
command_close_all
,
dbg_mcierr
(
err
));
ok
(
!
err
,
"mci %s (without buffer) returned %s
\n
"
,
command_close_all
,
dbg_mcierr
(
err
));
memset
(
buf
,
0
,
sizeof
(
buf
));
err
=
mciSendString
(
command_close_all
,
buf
,
sizeof
(
buf
),
hwnd
);
todo_wine
ok
(
!
err
,
"mci %s (with output buffer) returned %s
\n
"
,
command_close_all
,
dbg_mcierr
(
err
));
ok
(
!
err
,
"mci %s (with output buffer) returned %s
\n
"
,
command_close_all
,
dbg_mcierr
(
err
));
ok
(
buf
[
0
]
==
0
,
"mci %s changed output buffer: %s
\n
"
,
command_close_all
,
buf
);
/* No notification left, everything closed already */
test_notification
(
hwnd
,
command_close_all
,
0
);
...
...
@@ -864,7 +864,7 @@ START_TEST(mci)
test_AutoOpenWAVE
(
hwnd
);
/* Win9X hangs when exiting with something still open. */
err
=
mciSendString
(
"close all"
,
NULL
,
0
,
hwnd
);
todo_wine
ok
(
!
err
,
"final close all returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
!
err
,
"final close all returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
DeleteFile
(
"tempfile.wav"
)
||
ok_saved
,
"Delete tempfile.wav (cause auto-open?)
\n
"
);
DestroyWindow
(
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