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
d34abdd1
Commit
d34abdd1
authored
Apr 29, 2000
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 29, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug when file doesn't exist in MCI_OPEN handling.
Reduced time spent with crit sect locked.
parent
ec4f57be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
mci.c
dlls/winmm/mci.c
+23
-8
No files found.
dlls/winmm/mci.c
View file @
d34abdd1
...
...
@@ -427,6 +427,10 @@ static DWORD MCI_LoadMciDriver(LPWINE_MM_IDATA iData, LPCSTR _strDevTyp,
dwRet
=
MCIERR_OUT_OF_MEMORY
;
goto
errCleanUp
;
}
wmd
->
lpfnYieldProc
=
MCI_DefYieldProc
;
wmd
->
dwYieldData
=
VK_CANCEL
;
wmd
->
hCreatorTask
=
GetCurrentTask
();
EnterCriticalSection
(
&
iData
->
cs
);
/* wmd must be inserted in list before sending opening the driver, coz' it
...
...
@@ -440,9 +444,6 @@ static DWORD MCI_LoadMciDriver(LPWINE_MM_IDATA iData, LPCSTR _strDevTyp,
modp
.
wDeviceID
++
);
wmd
->
wDeviceID
=
modp
.
wDeviceID
;
wmd
->
lpfnYieldProc
=
MCI_DefYieldProc
;
wmd
->
dwYieldData
=
VK_CANCEL
;
wmd
->
hCreatorTask
=
GetCurrentTask
();
LeaveCriticalSection
(
&
iData
->
cs
);
...
...
@@ -800,6 +801,7 @@ DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet,
DWORD
data
[
MCI_DATA_SIZE
];
LPCSTR
lpCmd
=
0
;
LPWINE_MM_IDATA
iData
=
MULTIMEDIA_GetIData
();
BOOL
bAutoOpen
=
FALSE
;
TRACE
(
"('%s', %p, %d, %X)
\n
"
,
lpstrCommand
,
lpstrRet
,
uRetLen
,
hwndCallback
);
...
...
@@ -860,11 +862,17 @@ DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet,
MCI_UnLoadMciDriver
(
iData
,
wmd
);
goto
errCleanUp
;
}
}
else
{
}
else
if
(
!
(
wmd
=
MCI_GetDriver
(
mciGetDeviceIDA
(
dev
))))
{
/* auto open */
char
buf
[
128
];
sprintf
(
buf
,
"open %s wait"
,
dev
);
if
((
dwRet
=
mciSendStringA
(
buf
,
NULL
,
0
,
0
))
!=
0
)
goto
errCleanUp
;
wmd
=
MCI_GetDriver
(
mciGetDeviceIDA
(
dev
));
if
(
!
wmd
)
{
FIXME
(
"Oooch: couldn't find driver for '%s' in '%s'; automatic open is NIY
\n
"
,
dev
,
lpstrCommand
);
/* FIXME: memory leak, MCI driver is not closed */
dwRet
=
MCIERR_INVALID_DEVICE_ID
;
goto
errCleanUp
;
}
...
...
@@ -909,6 +917,13 @@ DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet,
if
((
dwRet
=
MCI_ParseOptArgs
(
data
,
offset
,
lpCmd
,
args
,
&
dwFlags
)))
goto
errCleanUp
;
if
(
bAutoOpen
&&
(
dwFlags
&
MCI_NOTIFY
))
{
dwRet
=
MCIERR_NOTIFY_ON_AUTO_OPEN
;
goto
errCleanUp
;
}
/* FIXME: the command should get it's own notification window set up and
* ask for device closing while processing the notification mechanism
*/
if
(
lpstrRet
&&
uRetLen
)
*
lpstrRet
=
'\0'
;
#define STR_OF(_x) (IsBadReadPtr((char*)_x,1)?"?":(char*)(_x))
...
...
@@ -2012,7 +2027,7 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms)
{
char
strDevTyp
[
128
];
DWORD
dwRet
;
LPWINE_MCIDRIVER
wmd
;
LPWINE_MCIDRIVER
wmd
=
NULL
;
LPWINE_MM_IDATA
iData
=
MULTIMEDIA_GetIData
();
TRACE
(
"(%08lX, %p)
\n
"
,
dwParam
,
lpParms
);
...
...
@@ -2127,7 +2142,7 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms)
return
0
;
errCleanUp:
MCI_UnLoadMciDriver
(
iData
,
wmd
);
if
(
wmd
)
MCI_UnLoadMciDriver
(
iData
,
wmd
);
if
(
dwParam
&
MCI_NOTIFY
)
mciDriverNotify16
(
lpParms
->
dwCallback
,
0
,
MCI_NOTIFY_FAILURE
);
...
...
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