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
db3be155
Commit
db3be155
authored
May 18, 2005
by
Maarten Lankhorst
Committed by
Alexandre Julliard
May 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add vfwindex when enumerating devices, and make sure every device has
a unique registry key, so multiple devices with same name are allowed.
parent
67204137
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
Makefile.in
dlls/devenum/Makefile.in
+1
-1
createdevenum.c
dlls/devenum/createdevenum.c
+18
-5
No files found.
dlls/devenum/Makefile.in
View file @
db3be155
...
...
@@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE
=
devenum.dll
IMPORTLIB
=
libdevenum.
$(IMPLIBEXT)
IMPORTS
=
ole32 oleaut32 avicap32 winmm user32 advapi32 kernel32
EXTRALIBS
=
-lstrmiids
-luuid
EXTRALIBS
=
-lstrmiids
-luuid
$(LIBUNICODE)
C_SRCS
=
\
createdevenum.c
\
...
...
dlls/devenum/createdevenum.c
View file @
db3be155
...
...
@@ -30,6 +30,7 @@
#include "vfw.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "mmddk.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
devenum
);
...
...
@@ -420,13 +421,17 @@ static HRESULT DEVENUM_CreateSpecialCategories()
if
(
SUCCEEDED
(
res
))
for
(
i
=
0
;
i
<
10
;
i
++
)
{
WCHAR
szDeviceName
[
80
],
szDeviceVersion
[
8
0
];
WCHAR
szDeviceName
[
32
],
szDeviceVersion
[
32
],
szDevicePath
[
1
0
];
if
(
capGetDriverDescriptionW
((
WORD
)
i
,
szDeviceName
,
sizeof
(
szDeviceName
)
/
sizeof
(
WCHAR
),
szDeviceVersion
,
sizeof
(
szDeviceVersion
)
/
sizeof
(
WCHAR
)))
{
IMoniker
*
pMoniker
=
NULL
;
IPropertyBag
*
pPropBag
=
NULL
;
WCHAR
dprintf
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'%'
,
'd'
,
0
};
snprintfW
(
szDevicePath
,
sizeof
(
szDevicePath
)
/
sizeof
(
WCHAR
),
dprintf
,
i
);
/* The above code prevents 1 device with a different ID overwriting another */
rfp2
.
nMediaTypes
=
1
;
pTypes
=
CoTaskMemAlloc
(
rfp2
.
nMediaTypes
*
sizeof
(
REGPINTYPES
));
...
...
@@ -436,7 +441,7 @@ static HRESULT DEVENUM_CreateSpecialCategories()
}
pTypes
[
0
].
clsMajorType
=
&
MEDIATYPE_Video
;
pTypes
[
0
].
clsMinorType
=
&
MEDIASUBTYPE_
RGB24
;
pTypes
[
0
].
clsMinorType
=
&
MEDIASUBTYPE_
None
;
rfp2
.
lpMediaType
=
pTypes
;
...
...
@@ -445,11 +450,19 @@ static HRESULT DEVENUM_CreateSpecialCategories()
szDeviceName
,
&
pMoniker
,
&
CLSID_VideoInputDeviceCategory
,
szDevice
Name
,
szDevice
Path
,
&
rf2
);
/* FIXME: do additional stuff with IMoniker here, depending on what RegisterFilter does */
if
(
pMoniker
)
IMoniker_Release
(
pMoniker
);
if
(
pMoniker
)
{
OLECHAR
wszVfwIndex
[]
=
{
'V'
,
'F'
,
'W'
,
'I'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
VARIANT
var
;
V_VT
(
&
var
)
=
VT_I4
;
V_UNION
(
&
var
,
ulVal
)
=
(
ULONG
)
i
;
res
=
IMoniker_BindToStorage
(
pMoniker
,
NULL
,
NULL
,
&
IID_IPropertyBag
,
(
LPVOID
)
&
pPropBag
);
if
(
SUCCEEDED
(
res
))
res
=
IPropertyBag_Write
(
pPropBag
,
wszVfwIndex
,
&
var
);
IMoniker_Release
(
pMoniker
);
}
if
(
i
==
iDefaultDevice
)
FIXME
(
"Default device
\n
"
);
CoTaskMemFree
(
pTypes
);
...
...
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