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
2585e1a6
Commit
2585e1a6
authored
Jun 12, 2006
by
Peter Åstrand
Committed by
Alexandre Julliard
Jun 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Add support for "open new" commands.
parent
94dc36e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
mci.c
dlls/winmm/mci.c
+22
-10
No files found.
dlls/winmm/mci.c
View file @
2585e1a6
...
...
@@ -1260,6 +1260,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
BOOL
bAutoOpen
=
FALSE
;
static
const
WCHAR
wszNew
[]
=
{
'n'
,
'e'
,
'w'
,
0
};
static
const
WCHAR
wszSAliasS
[]
=
{
' '
,
'a'
,
'l'
,
'i'
,
'a'
,
's'
,
' '
,
0
};
static
const
WCHAR
wszTypeS
[]
=
{
't'
,
'y'
,
'p'
,
'e'
,
' '
,
0
};
TRACE
(
"(%s, %p, %d, %p)
\n
"
,
debugstr_w
(
lpstrCommand
),
lpstrRet
,
uRetLen
,
hwndCallback
);
...
...
@@ -1281,18 +1282,26 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
goto
errCleanUp
;
}
/* case dev == 'new' has to be handled */
if
(
!
strcmpW
(
dev
,
wszNew
))
{
FIXME
(
"'new': NIY as device name
\n
"
);
dwRet
=
MCIERR_MISSING_DEVICE_NAME
;
goto
errCleanUp
;
}
/* otherwise, try to grab devType from open */
/* Determine devType from open */
if
(
!
strcmpW
(
verb
,
wszOpen
))
{
LPWSTR
devType
,
tmp
;
if
((
devType
=
strchrW
(
dev
,
'!'
))
!=
NULL
)
{
/* case dev == 'new' has to be handled */
if
(
!
strcmpW
(
dev
,
wszNew
))
{
dev
=
0
;
if
((
devType
=
strstrW
(
args
,
wszTypeS
))
!=
NULL
)
{
devType
+=
5
;
tmp
=
strchrW
(
devType
,
' '
);
if
(
tmp
)
*
tmp
=
'\0'
;
devType
=
str_dup_upper
(
devType
);
if
(
tmp
)
*
tmp
=
' '
;
/* dwFlags and data[2] will be correctly set in ParseOpt loop */
}
else
{
WARN
(
"open new requires device type
\n
"
);
dwRet
=
MCIERR_MISSING_DEVICE_NAME
;
goto
errCleanUp
;
}
}
else
if
((
devType
=
strchrW
(
dev
,
'!'
))
!=
NULL
)
{
*
devType
++
=
'\0'
;
tmp
=
devType
;
devType
=
dev
;
dev
=
tmp
;
...
...
@@ -1309,7 +1318,6 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
if
(
tmp
)
*
tmp
=
' '
;
dwFlags
|=
MCI_OPEN_TYPE
;
}
else
{
static
const
WCHAR
wszTypeS
[]
=
{
't'
,
'y'
,
'p'
,
'e'
,
' '
,
0
};
if
((
devType
=
strstrW
(
args
,
wszTypeS
))
!=
NULL
)
{
devType
+=
5
;
tmp
=
strchrW
(
devType
,
' '
);
...
...
@@ -1338,6 +1346,10 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
data
[
4
]
=
(
DWORD
)
tmp2
;
/* should be done in regular options parsing */
/* dwFlags |= MCI_OPEN_ALIAS; */
}
else
if
(
dev
==
0
)
{
/* "open new" requires alias */
dwRet
=
MCIERR_NEW_REQUIRES_ALIAS
;
goto
errCleanUp
;
}
dwRet
=
MCI_LoadMciDriver
(
devType
,
&
wmd
);
...
...
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