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
4633822c
Commit
4633822c
authored
Oct 17, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmsystem: Move the 16-bit MCI functions to a new mci16.c file.
parent
4587a322
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
197 additions
and
156 deletions
+197
-156
Makefile.in
dlls/winmm/Makefile.in
+1
-0
mci16.c
dlls/winmm/mci16.c
+196
-0
mmsystem.c
dlls/winmm/mmsystem.c
+0
-156
No files found.
dlls/winmm/Makefile.in
View file @
4633822c
...
...
@@ -18,6 +18,7 @@ C_SRCS = \
winmm.c
C_SRCS16
=
\
mci16.c
\
message16.c
\
mmio16.c
\
mmsystem.c
...
...
dlls/winmm/mci16.c
0 → 100644
View file @
4633822c
/*
* MMSYSTEM functions
*
* Copyright 1993 Martin Ayotte
* 1998-2003,2009 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "mmsystem.h"
#include "winternl.h"
#include "wownt32.h"
#include "winnls.h"
#include "wine/winuser16.h"
#include "winemm16.h"
#include "winemm.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mmsys
);
/* ###################################################
* # MCI #
* ###################################################
*/
/**************************************************************************
* mciSetYieldProc [MMSYSTEM.714]
*/
BOOL16
WINAPI
mciSetYieldProc16
(
UINT16
uDeviceID
,
YIELDPROC16
fpYieldProc
,
DWORD
dwYieldData
)
{
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%u, %p, %08x)
\n
"
,
uDeviceID
,
fpYieldProc
,
dwYieldData
);
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
)))
{
WARN
(
"Bad uDeviceID
\n
"
);
return
FALSE
;
}
wmd
->
lpfnYieldProc
=
(
YIELDPROC
)
fpYieldProc
;
wmd
->
dwYieldData
=
dwYieldData
;
wmd
->
bIs32
=
FALSE
;
return
TRUE
;
}
/**************************************************************************
* mciGetYieldProc [MMSYSTEM.716]
*/
YIELDPROC16
WINAPI
mciGetYieldProc16
(
UINT16
uDeviceID
,
DWORD
*
lpdwYieldData
)
{
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%u, %p)
\n
"
,
uDeviceID
,
lpdwYieldData
);
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
)))
{
WARN
(
"Bad uDeviceID
\n
"
);
return
NULL
;
}
if
(
!
wmd
->
lpfnYieldProc
)
{
WARN
(
"No proc set
\n
"
);
return
NULL
;
}
if
(
wmd
->
bIs32
)
{
WARN
(
"Proc is 32 bit
\n
"
);
return
NULL
;
}
if
(
lpdwYieldData
)
*
lpdwYieldData
=
wmd
->
dwYieldData
;
return
(
YIELDPROC16
)
wmd
->
lpfnYieldProc
;
}
/**************************************************************************
* mciGetErrorString [MMSYSTEM.706]
*/
BOOL16
WINAPI
mciGetErrorString16
(
DWORD
wError
,
LPSTR
lpstrBuffer
,
UINT16
uLength
)
{
return
mciGetErrorStringA
(
wError
,
lpstrBuffer
,
uLength
);
}
/**************************************************************************
* mciDriverNotify [MMSYSTEM.711]
*/
BOOL16
WINAPI
mciDriverNotify16
(
HWND16
hWndCallBack
,
UINT16
wDevID
,
UINT16
wStatus
)
{
TRACE
(
"(%04X, %04x, %04X)
\n
"
,
hWndCallBack
,
wDevID
,
wStatus
);
return
PostMessageA
(
HWND_32
(
hWndCallBack
),
MM_MCINOTIFY
,
wStatus
,
wDevID
);
}
/**************************************************************************
* mciGetDriverData [MMSYSTEM.708]
*/
DWORD
WINAPI
mciGetDriverData16
(
UINT16
uDeviceID
)
{
return
mciGetDriverData
(
uDeviceID
);
}
/**************************************************************************
* mciSetDriverData [MMSYSTEM.707]
*/
BOOL16
WINAPI
mciSetDriverData16
(
UINT16
uDeviceID
,
DWORD
data
)
{
return
mciSetDriverData
(
uDeviceID
,
data
);
}
/**************************************************************************
* mciSendCommand [MMSYSTEM.701]
*/
DWORD
WINAPI
mciSendCommand16
(
UINT16
wDevID
,
UINT16
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
DWORD
dwRet
;
TRACE
(
"(%04X, %s, %08X, %08X)
\n
"
,
wDevID
,
MCI_MessageToString
(
wMsg
),
dwParam1
,
dwParam2
);
dwRet
=
MCI_SendCommand
(
wDevID
,
wMsg
,
dwParam1
,
dwParam2
,
FALSE
);
dwRet
=
MCI_CleanUp
(
dwRet
,
wMsg
,
(
DWORD
)
MapSL
(
dwParam2
));
TRACE
(
"=> %d
\n
"
,
dwRet
);
return
dwRet
;
}
/**************************************************************************
* mciGetDeviceID [MMSYSTEM.703]
*/
UINT16
WINAPI
mciGetDeviceID16
(
LPCSTR
lpstrName
)
{
TRACE
(
"(
\"
%s
\"
)
\n
"
,
lpstrName
);
return
mciGetDeviceIDA
(
lpstrName
);
}
/**************************************************************************
* mciGetDeviceIDFromElementID [MMSYSTEM.715]
*/
UINT16
WINAPI
mciGetDeviceIDFromElementID16
(
DWORD
dwElementID
,
LPCSTR
lpstrType
)
{
FIXME
(
"(%u, %s) stub
\n
"
,
dwElementID
,
lpstrType
);
return
0
;
}
/**************************************************************************
* mciGetCreatorTask [MMSYSTEM.717]
*/
HTASK16
WINAPI
mciGetCreatorTask16
(
UINT16
uDeviceID
)
{
return
HTASK_16
(
mciGetCreatorTask
(
uDeviceID
));
}
/**************************************************************************
* mciDriverYield [MMSYSTEM.710]
*/
UINT16
WINAPI
mciDriverYield16
(
UINT16
uDeviceID
)
{
LPWINE_MCIDRIVER
wmd
;
UINT16
ret
=
0
;
/* TRACE("(%04x)\n", uDeviceID); */
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
))
||
!
wmd
->
lpfnYieldProc
||
wmd
->
bIs32
)
{
UserYield16
();
}
else
{
ret
=
wmd
->
lpfnYieldProc
(
uDeviceID
,
wmd
->
dwYieldData
);
}
return
ret
;
}
/**************************************************************************
* mciSendString [MMSYSTEM.702]
*/
DWORD
WINAPI
mciSendString16
(
LPCSTR
lpstrCommand
,
LPSTR
lpstrRet
,
UINT16
uRetLen
,
HWND16
hwndCallback
)
{
return
mciSendStringA
(
lpstrCommand
,
lpstrRet
,
uRetLen
,
HWND_32
(
hwndCallback
));
}
dlls/winmm/mmsystem.c
View file @
4633822c
...
...
@@ -513,153 +513,6 @@ DWORD WINAPI auxOutMessage16(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD
}
/* ###################################################
* # MCI #
* ###################################################
*/
/**************************************************************************
* mciGetErrorString [MMSYSTEM.706]
*/
BOOL16
WINAPI
mciGetErrorString16
(
DWORD
wError
,
LPSTR
lpstrBuffer
,
UINT16
uLength
)
{
return
mciGetErrorStringA
(
wError
,
lpstrBuffer
,
uLength
);
}
/**************************************************************************
* mciDriverNotify [MMSYSTEM.711]
*/
BOOL16
WINAPI
mciDriverNotify16
(
HWND16
hWndCallBack
,
UINT16
wDevID
,
UINT16
wStatus
)
{
TRACE
(
"(%04X, %04x, %04X)
\n
"
,
hWndCallBack
,
wDevID
,
wStatus
);
return
PostMessageA
(
HWND_32
(
hWndCallBack
),
MM_MCINOTIFY
,
wStatus
,
wDevID
);
}
/**************************************************************************
* mciGetDriverData [MMSYSTEM.708]
*/
DWORD
WINAPI
mciGetDriverData16
(
UINT16
uDeviceID
)
{
return
mciGetDriverData
(
uDeviceID
);
}
/**************************************************************************
* mciSetDriverData [MMSYSTEM.707]
*/
BOOL16
WINAPI
mciSetDriverData16
(
UINT16
uDeviceID
,
DWORD
data
)
{
return
mciSetDriverData
(
uDeviceID
,
data
);
}
/**************************************************************************
* mciSendCommand [MMSYSTEM.701]
*/
DWORD
WINAPI
mciSendCommand16
(
UINT16
wDevID
,
UINT16
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
DWORD
dwRet
;
TRACE
(
"(%04X, %s, %08X, %08X)
\n
"
,
wDevID
,
MCI_MessageToString
(
wMsg
),
dwParam1
,
dwParam2
);
dwRet
=
MCI_SendCommand
(
wDevID
,
wMsg
,
dwParam1
,
dwParam2
,
FALSE
);
dwRet
=
MCI_CleanUp
(
dwRet
,
wMsg
,
(
DWORD
)
MapSL
(
dwParam2
));
TRACE
(
"=> %d
\n
"
,
dwRet
);
return
dwRet
;
}
/**************************************************************************
* mciGetDeviceID [MMSYSTEM.703]
*/
UINT16
WINAPI
mciGetDeviceID16
(
LPCSTR
lpstrName
)
{
TRACE
(
"(
\"
%s
\"
)
\n
"
,
lpstrName
);
return
mciGetDeviceIDA
(
lpstrName
);
}
/**************************************************************************
* mciSetYieldProc [MMSYSTEM.714]
*/
BOOL16
WINAPI
mciSetYieldProc16
(
UINT16
uDeviceID
,
YIELDPROC16
fpYieldProc
,
DWORD
dwYieldData
)
{
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%u, %p, %08x)
\n
"
,
uDeviceID
,
fpYieldProc
,
dwYieldData
);
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
)))
{
WARN
(
"Bad uDeviceID
\n
"
);
return
FALSE
;
}
wmd
->
lpfnYieldProc
=
(
YIELDPROC
)
fpYieldProc
;
wmd
->
dwYieldData
=
dwYieldData
;
wmd
->
bIs32
=
FALSE
;
return
TRUE
;
}
/**************************************************************************
* mciGetDeviceIDFromElementID [MMSYSTEM.715]
*/
UINT16
WINAPI
mciGetDeviceIDFromElementID16
(
DWORD
dwElementID
,
LPCSTR
lpstrType
)
{
FIXME
(
"(%u, %s) stub
\n
"
,
dwElementID
,
lpstrType
);
return
0
;
}
/**************************************************************************
* mciGetYieldProc [MMSYSTEM.716]
*/
YIELDPROC16
WINAPI
mciGetYieldProc16
(
UINT16
uDeviceID
,
DWORD
*
lpdwYieldData
)
{
LPWINE_MCIDRIVER
wmd
;
TRACE
(
"(%u, %p)
\n
"
,
uDeviceID
,
lpdwYieldData
);
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
)))
{
WARN
(
"Bad uDeviceID
\n
"
);
return
NULL
;
}
if
(
!
wmd
->
lpfnYieldProc
)
{
WARN
(
"No proc set
\n
"
);
return
NULL
;
}
if
(
wmd
->
bIs32
)
{
WARN
(
"Proc is 32 bit
\n
"
);
return
NULL
;
}
if
(
lpdwYieldData
)
*
lpdwYieldData
=
wmd
->
dwYieldData
;
return
(
YIELDPROC16
)
wmd
->
lpfnYieldProc
;
}
/**************************************************************************
* mciGetCreatorTask [MMSYSTEM.717]
*/
HTASK16
WINAPI
mciGetCreatorTask16
(
UINT16
uDeviceID
)
{
return
HTASK_16
(
mciGetCreatorTask
(
uDeviceID
));
}
/**************************************************************************
* mciDriverYield [MMSYSTEM.710]
*/
UINT16
WINAPI
mciDriverYield16
(
UINT16
uDeviceID
)
{
LPWINE_MCIDRIVER
wmd
;
UINT16
ret
=
0
;
/* TRACE("(%04x)\n", uDeviceID); */
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
))
||
!
wmd
->
lpfnYieldProc
||
wmd
->
bIs32
)
{
UserYield16
();
}
else
{
ret
=
wmd
->
lpfnYieldProc
(
uDeviceID
,
wmd
->
dwYieldData
);
}
return
ret
;
}
/* ###################################################
* # MIDI #
* ###################################################
*/
...
...
@@ -2581,15 +2434,6 @@ MMRESULT16 WINAPI timeEndPeriod16(UINT16 wPeriod)
}
/**************************************************************************
* mciSendString [MMSYSTEM.702]
*/
DWORD
WINAPI
mciSendString16
(
LPCSTR
lpstrCommand
,
LPSTR
lpstrRet
,
UINT16
uRetLen
,
HWND16
hwndCallback
)
{
return
mciSendStringA
(
lpstrCommand
,
lpstrRet
,
uRetLen
,
HWND_32
(
hwndCallback
));
}
/**************************************************************************
* mciLoadCommandResource [MMSYSTEM.705]
*/
UINT16
WINAPI
mciLoadCommandResource16
(
HINSTANCE16
hInst
,
LPCSTR
resname
,
UINT16
type
)
...
...
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