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
ec7aef83
Commit
ec7aef83
authored
Aug 30, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Sep 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Always unload the MCI driver when Open fails.
parent
e1fe9e4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
mci.c
dlls/winmm/mci.c
+12
-5
No files found.
dlls/winmm/mci.c
View file @
ec7aef83
...
...
@@ -1317,10 +1317,8 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
if
(
dwRet
==
MCIERR_DEVICE_NOT_INSTALLED
)
dwRet
=
MCIERR_INVALID_DEVICE_NAME
;
HeapFree
(
GetProcessHeap
(),
0
,
devType
);
if
(
dwRet
)
{
MCI_UnLoadMciDriver
(
wmd
);
if
(
dwRet
)
goto
errCleanUp
;
}
}
else
if
(
!
strcmpW
(
verb
,
wszSysinfo
))
{
/* System commands are not subject to auto-open. */
/* It's too early to handle Sysinfo here because the
...
...
@@ -1411,14 +1409,21 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
data
[
0
]
=
(
DWORD_PTR
)
hwndCallback
;
}
if
(
wMsg
==
MCI_OPEN
&&
strcmpW
(
verb
,
wszOpen
))
{
ERR
(
"Cannot open with command %s
\n
"
,
debugstr_w
(
verb
));
dwRet
=
MCIERR_INTERNAL
;
wMsg
=
0
;
goto
errCleanUp
;
}
TRACE
(
"[%d, %s, %08x, %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx]
\n
"
,
wmd
?
wmd
->
wDeviceID
:
uDevID
,
MCI_MessageToString
(
wMsg
),
dwFlags
,
data
[
0
],
data
[
1
],
data
[
2
],
data
[
3
],
data
[
4
],
data
[
5
],
data
[
6
],
data
[
7
],
data
[
8
],
data
[
9
]);
if
(
strcmpW
(
verb
,
wszOpen
)
==
0
)
{
if
(
wMsg
==
MCI_OPEN
)
{
if
((
dwRet
=
MCI_FinishOpen
(
wmd
,
(
LPMCI_OPEN_PARMSW
)
data
,
dwFlags
)))
MCI_UnLoadMciDriver
(
wmd
)
;
goto
errCleanUp
;
/* FIXME: notification is not properly shared across two opens */
}
else
{
dwRet
=
MCI_SendCommand
(
wmd
?
wmd
->
wDeviceID
:
uDevID
,
wMsg
,
dwFlags
,
(
DWORD_PTR
)
data
);
...
...
@@ -1435,6 +1440,8 @@ errCleanUp:
else
FIXME
(
"leaking auto-open device %u
\n
"
,
auto_open
);
}
if
(
wMsg
==
MCI_OPEN
&&
LOWORD
(
dwRet
)
&&
wmd
)
MCI_UnLoadMciDriver
(
wmd
);
HeapFree
(
GetProcessHeap
(),
0
,
verb
);
return
dwRet
;
}
...
...
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