Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
e0574936
Commit
e0574936
authored
16 years ago
by
Christian Costa
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mciqtz32: Implement driver messages.
parent
59501e03
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/mciqtz32/Makefile.in
+1
-1
1 addition, 1 deletion
dlls/mciqtz32/Makefile.in
dlls/mciqtz32/mciqtz.c
+140
-2
140 additions, 2 deletions
dlls/mciqtz32/mciqtz.c
dlls/mciqtz32/mciqtz_private.h
+28
-0
28 additions, 0 deletions
dlls/mciqtz32/mciqtz_private.h
with
169 additions
and
3 deletions
dlls/mciqtz32/Makefile.in
+
1
−
1
View file @
e0574936
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
mciqtz32.dll
IMPORTS
=
kernel32
IMPORTS
=
winmm user32
kernel32
C_SRCS
=
\
mciqtz.c
...
...
This diff is collapsed.
Click to expand it.
dlls/mciqtz32/mciqtz.c
+
140
−
2
View file @
e0574936
...
...
@@ -21,11 +21,16 @@
#include
<stdarg.h>
#include
"windef.h"
#include
"winbase.h"
#include
"winuser.h"
#include
"mmddk.h"
#include
"wine/debug.h"
#include
"mciqtz_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mciqtz
);
static
DWORD
MCIQTZ_mciClose
(
UINT
,
DWORD
,
LPMCI_GENERIC_PARMS
);
static
DWORD
MCIQTZ_mciStop
(
UINT
,
DWORD
,
LPMCI_GENERIC_PARMS
);
/*======================================================================*
* MCI QTZ implementation *
*======================================================================*/
...
...
@@ -46,6 +51,120 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
return
TRUE
;
}
/**************************************************************************
* MCIQTZ_drvOpen [internal]
*/
static
DWORD
MCIQTZ_drvOpen
(
LPCWSTR
str
,
LPMCI_OPEN_DRIVER_PARMSW
modp
)
{
WINE_MCIQTZ
*
wma
;
TRACE
(
"%s, %p
\n
"
,
debugstr_w
(
str
),
modp
);
/* session instance */
if
(
!
modp
)
return
0xFFFFFFFF
;
wma
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
WINE_MCIQTZ
));
if
(
!
wma
)
return
0
;
wma
->
wDevID
=
modp
->
wDeviceID
;
mciSetDriverData
(
wma
->
wDevID
,
(
DWORD_PTR
)
wma
);
return
modp
->
wDeviceID
;
}
/**************************************************************************
* MCIQTZ_drvClose [internal]
*/
static
DWORD
MCIQTZ_drvClose
(
DWORD
dwDevID
)
{
WINE_MCIQTZ
*
wma
;
TRACE
(
"%04x
\n
"
,
dwDevID
);
/* finish all outstanding things */
MCIQTZ_mciClose
(
dwDevID
,
MCI_WAIT
,
NULL
);
wma
=
(
WINE_MCIQTZ
*
)
mciGetDriverData
(
dwDevID
);
if
(
wma
)
{
HeapFree
(
GetProcessHeap
(),
0
,
wma
);
return
1
;
}
return
(
dwDevID
==
0xFFFFFFFF
)
?
1
:
0
;
}
/**************************************************************************
* MCIQTZ_drvConfigure [internal]
*/
static
DWORD
MCIQTZ_drvConfigure
(
DWORD
dwDevID
)
{
WINE_MCIQTZ
*
wma
;
TRACE
(
"%04x
\n
"
,
dwDevID
);
MCIQTZ_mciStop
(
dwDevID
,
MCI_WAIT
,
NULL
);
wma
=
(
WINE_MCIQTZ
*
)
mciGetDriverData
(
dwDevID
);
if
(
wma
)
{
MessageBoxA
(
0
,
"Sample QTZ Wine Driver !"
,
"MM-Wine Driver"
,
MB_OK
);
return
1
;
}
return
0
;
}
/**************************************************************************
* MCIQTZ_mciGetOpenDev [internal]
*/
static
WINE_MCIQTZ
*
MCIQTZ_mciGetOpenDev
(
UINT
wDevID
)
{
WINE_MCIQTZ
*
wma
=
(
WINE_MCIQTZ
*
)
mciGetDriverData
(
wDevID
);
if
(
!
wma
)
{
WARN
(
"Invalid wDevID=%u
\n
"
,
wDevID
);
return
0
;
}
return
wma
;
}
/***************************************************************************
* MCIQTZ_mciClose [internal]
*/
static
DWORD
MCIQTZ_mciClose
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_GENERIC_PARMS
lpParms
)
{
WINE_MCIQTZ
*
wma
;
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwFlags
,
lpParms
);
MCIQTZ_mciStop
(
wDevID
,
MCI_WAIT
,
NULL
);
wma
=
MCIQTZ_mciGetOpenDev
(
wDevID
);
if
(
!
wma
)
return
MCIERR_INVALID_DEVICE_ID
;
return
0
;
}
/***************************************************************************
* MCIQTZ_mciStop [internal]
*/
static
DWORD
MCIQTZ_mciStop
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_GENERIC_PARMS
lpParms
)
{
WINE_MCIQTZ
*
wma
;
TRACE
(
"(%04x, %08X, %p)
\n
"
,
wDevID
,
dwFlags
,
lpParms
);
wma
=
MCIQTZ_mciGetOpenDev
(
wDevID
);
if
(
!
wma
)
return
MCIERR_INVALID_DEVICE_ID
;
return
0
;
}
/*======================================================================*
* MCI QTZ entry points *
*======================================================================*/
...
...
@@ -56,8 +175,27 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
LRESULT
CALLBACK
MCIQTZ_DriverProc
(
DWORD_PTR
dwDevID
,
HDRVR
hDriv
,
UINT
wMsg
,
LPARAM
dwParam1
,
LPARAM
dwParam2
)
{
FIXME
(
"(%08lX, %p, %08X, %08lX, %08lX): Stub!
\n
"
,
dwDevID
,
hDriv
,
wMsg
,
dwParam1
,
dwParam2
);
TRACE
(
"(%08lX, %p, %08X, %08lX, %08lX)
\n
"
,
dwDevID
,
hDriv
,
wMsg
,
dwParam1
,
dwParam2
);
switch
(
wMsg
)
{
case
DRV_LOAD
:
return
1
;
case
DRV_FREE
:
return
1
;
case
DRV_OPEN
:
return
MCIQTZ_drvOpen
((
LPCWSTR
)
dwParam1
,
(
LPMCI_OPEN_DRIVER_PARMSW
)
dwParam2
);
case
DRV_CLOSE
:
return
MCIQTZ_drvClose
(
dwDevID
);
case
DRV_ENABLE
:
return
1
;
case
DRV_DISABLE
:
return
1
;
case
DRV_QUERYCONFIGURE
:
return
1
;
case
DRV_CONFIGURE
:
return
MCIQTZ_drvConfigure
(
dwDevID
);
case
DRV_INSTALL
:
return
DRVCNF_RESTART
;
case
DRV_REMOVE
:
return
DRVCNF_RESTART
;
}
/* session instance */
if
(
dwDevID
==
0xFFFFFFFF
)
return
1
;
FIXME
(
"Unsupported command [%u]
\n
"
,
wMsg
);
return
MCIERR_UNRECOGNIZED_COMMAND
;
}
This diff is collapsed.
Click to expand it.
dlls/mciqtz32/mciqtz_private.h
0 → 100644
+
28
−
0
View file @
e0574936
/*
* DirectShow MCI Driver
*
* Copyright 2009 Christian Costa
*
* 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
*/
#ifndef __WINE_PRIVATE_MCIQTZ_H
#define __WINE_PRIVATE_MCIQTZ_H
typedef
struct
{
MCIDEVICEID
wDevID
;
}
WINE_MCIQTZ
;
#endif
/* __WINE_PRIVATE_MCIQTZ_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment