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
ef372e25
Commit
ef372e25
authored
Sep 01, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Sep 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: MCI open always creates an alias for subsequent commands.
parent
dd1a4709
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
mci.c
dlls/winmm/mci.c
+17
-14
mci.c
dlls/winmm/tests/mci.c
+1
-1
winemm.h
dlls/winmm/winemm.h
+0
-1
No files found.
dlls/winmm/mci.c
View file @
ef372e25
...
...
@@ -123,7 +123,7 @@ static UINT MCI_GetDriverFromString(LPCWSTR lpstrName)
EnterCriticalSection
(
&
WINMM_cs
);
for
(
wmd
=
MciDrivers
;
wmd
;
wmd
=
wmd
->
lpNext
)
{
if
(
wmd
->
lpstr
ElementName
&&
strcmpW
(
wmd
->
lpstrElementName
,
lpstrName
)
==
0
)
{
if
(
wmd
->
lpstr
Alias
&&
strcmpiW
(
wmd
->
lpstrAlias
,
lpstrName
)
==
0
)
{
ret
=
wmd
->
wDeviceID
;
break
;
}
...
...
@@ -131,10 +131,6 @@ static UINT MCI_GetDriverFromString(LPCWSTR lpstrName)
ret
=
wmd
->
wDeviceID
;
break
;
}
if
(
wmd
->
lpstrAlias
&&
strcmpiW
(
wmd
->
lpstrAlias
,
lpstrName
)
==
0
)
{
ret
=
wmd
->
wDeviceID
;
break
;
}
}
LeaveCriticalSection
(
&
WINMM_cs
);
...
...
@@ -770,7 +766,6 @@ static BOOL MCI_UnLoadMciDriver(LPWINE_MCIDRIVER wmd)
HeapFree
(
GetProcessHeap
(),
0
,
wmd
->
lpstrDeviceType
);
HeapFree
(
GetProcessHeap
(),
0
,
wmd
->
lpstrAlias
);
HeapFree
(
GetProcessHeap
(),
0
,
wmd
->
lpstrElementName
);
HeapFree
(
GetProcessHeap
(),
0
,
wmd
);
return
TRUE
;
...
...
@@ -888,15 +883,23 @@ static DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dw
static
DWORD
MCI_FinishOpen
(
LPWINE_MCIDRIVER
wmd
,
LPMCI_OPEN_PARMSW
lpParms
,
DWORD
dwParam
)
{
if
(
dwParam
&
MCI_OPEN_ELEMENT
)
{
wmd
->
lpstrElementName
=
HeapAlloc
(
GetProcessHeap
(),
0
,(
strlenW
(
lpParms
->
lpstrElementName
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
wmd
->
lpstrElementName
,
lpParms
->
lpstrElementName
);
LPCWSTR
alias
=
NULL
;
/* Open always defines an alias for further reference */
if
(
dwParam
&
MCI_OPEN_ALIAS
)
/* open ... alias */
alias
=
lpParms
->
lpstrAlias
;
else
{
if
((
dwParam
&
MCI_OPEN_ELEMENT
)
/* open file.wav */
&&
!
(
dwParam
&
MCI_OPEN_ELEMENT_ID
))
alias
=
lpParms
->
lpstrElementName
;
else
if
(
dwParam
&
MCI_OPEN_TYPE
)
/* open cdaudio */
alias
=
wmd
->
lpstrDeviceType
;
}
if
(
dwParam
&
MCI_OPEN_ALIAS
)
{
wmd
->
lpstrAlias
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
lpParms
->
lpstrAlias
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
wmd
->
lpstrAlias
,
lpParms
->
lpstrAlias
);
if
(
alias
)
{
wmd
->
lpstrAlias
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
alias
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
wmd
->
lpstrAlias
)
return
MCIERR_OUT_OF_MEMORY
;
strcpyW
(
wmd
->
lpstrAlias
,
alias
);
/* In most cases, natives adds MCI_OPEN_ALIAS to the flags passed to the driver.
* Don't. The drivers don't care about the winmm alias. */
}
lpParms
->
wDeviceID
=
wmd
->
wDeviceID
;
...
...
dlls/winmm/tests/mci.c
View file @
ef372e25
...
...
@@ -644,7 +644,7 @@ static void test_asyncWAVE(HWND hwnd)
/* Only the alias is looked up. */
err
=
mciGetDeviceID
(
"tempfile.wav"
);
todo_wine
ok
(
err
==
0
,
"mciGetDeviceID element returned %u, expected 0
\n
"
,
err
);
ok
(
err
==
0
,
"mciGetDeviceID element returned %u, expected 0
\n
"
,
err
);
err
=
mciGetDeviceID
(
"waveaudio"
);
todo_wine
ok
(
err
==
0
,
"mciGetDeviceID waveaudio returned %u, expected 0
\n
"
,
err
);
...
...
dlls/winmm/winemm.h
View file @
ef372e25
...
...
@@ -95,7 +95,6 @@ typedef struct {
typedef
struct
tagWINE_MCIDRIVER
{
UINT
wDeviceID
;
UINT
wType
;
LPWSTR
lpstrElementName
;
LPWSTR
lpstrDeviceType
;
LPWSTR
lpstrAlias
;
HDRVR
hDriver
;
...
...
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