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
3670d594
Commit
3670d594
authored
Jun 26, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenum: Make some variables static.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
47921c19
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
21 deletions
+15
-21
createdevenum.c
dlls/devenum/createdevenum.c
+7
-8
devenum_main.c
dlls/devenum/devenum_main.c
+4
-9
devenum_private.h
dlls/devenum/devenum_private.h
+1
-3
mediacatenum.c
dlls/devenum/mediacatenum.c
+3
-1
No files found.
dlls/devenum/createdevenum.c
View file @
3670d594
...
@@ -41,8 +41,6 @@
...
@@ -41,8 +41,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
devenum
);
WINE_DEFAULT_DEBUG_CHANNEL
(
devenum
);
extern
HINSTANCE
DEVENUM_hInstance
;
static
const
WCHAR
wszFilterKeyName
[]
=
{
'F'
,
'i'
,
'l'
,
't'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
wszFilterKeyName
[]
=
{
'F'
,
'i'
,
'l'
,
't'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
wszMeritName
[]
=
{
'M'
,
'e'
,
'r'
,
'i'
,
't'
,
0
};
static
const
WCHAR
wszMeritName
[]
=
{
'M'
,
'e'
,
'r'
,
'i'
,
't'
,
0
};
static
const
WCHAR
wszPins
[]
=
{
'P'
,
'i'
,
'n'
,
's'
,
0
};
static
const
WCHAR
wszPins
[]
=
{
'P'
,
'i'
,
'n'
,
's'
,
0
};
...
@@ -424,6 +422,7 @@ static void register_legacy_filters(void)
...
@@ -424,6 +422,7 @@ static void register_legacy_filters(void)
TRACE
(
"Registering %s
\n
"
,
debugstr_w
(
wszFilterSubkeyName
));
TRACE
(
"Registering %s
\n
"
,
debugstr_w
(
wszFilterSubkeyName
));
strcpyW
(
wszRegKey
,
clsidW
);
strcpyW
(
wszRegKey
,
clsidW
);
strcatW
(
wszRegKey
,
backslashW
);
strcatW
(
wszRegKey
,
wszFilterSubkeyName
);
strcatW
(
wszRegKey
,
wszFilterSubkeyName
);
if
(
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
wszRegKey
,
0
,
KEY_READ
,
&
classkey
)
!=
ERROR_SUCCESS
)
if
(
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
wszRegKey
,
0
,
KEY_READ
,
&
classkey
)
!=
ERROR_SUCCESS
)
...
@@ -460,7 +459,7 @@ static void register_legacy_filters(void)
...
@@ -460,7 +459,7 @@ static void register_legacy_filters(void)
V_VT
(
&
var
)
=
VT_BSTR
;
V_VT
(
&
var
)
=
VT_BSTR
;
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
wszFilterSubkeyName
)))
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
wszFilterSubkeyName
)))
goto
cleanup
;
goto
cleanup
;
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
_keyname
,
&
var
);
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
W
,
&
var
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
VariantClear
(
&
var
);
VariantClear
(
&
var
);
...
@@ -537,7 +536,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
...
@@ -537,7 +536,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
StringFromGUID2
(
&
CLSID_DSoundRender
,
clsid
,
CHARS_IN_GUID
);
StringFromGUID2
(
&
CLSID_DSoundRender
,
clsid
,
CHARS_IN_GUID
);
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
goto
cleanup
;
goto
cleanup
;
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
_keyname
,
&
var
);
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
W
,
&
var
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
VariantClear
(
&
var
);
VariantClear
(
&
var
);
...
@@ -620,7 +619,7 @@ static void register_waveout_devices(void)
...
@@ -620,7 +619,7 @@ static void register_waveout_devices(void)
StringFromGUID2
(
&
CLSID_AudioRender
,
clsid
,
CHARS_IN_GUID
);
StringFromGUID2
(
&
CLSID_AudioRender
,
clsid
,
CHARS_IN_GUID
);
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
goto
cleanup
;
goto
cleanup
;
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
_keyname
,
&
var
);
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
W
,
&
var
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
VariantClear
(
&
var
);
VariantClear
(
&
var
);
...
@@ -693,7 +692,7 @@ static void register_wavein_devices(void)
...
@@ -693,7 +692,7 @@ static void register_wavein_devices(void)
StringFromGUID2
(
&
CLSID_AudioRecord
,
clsid
,
CHARS_IN_GUID
);
StringFromGUID2
(
&
CLSID_AudioRecord
,
clsid
,
CHARS_IN_GUID
);
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
goto
cleanup
;
goto
cleanup
;
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
_keyname
,
&
var
);
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
W
,
&
var
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
VariantClear
(
&
var
);
VariantClear
(
&
var
);
...
@@ -765,7 +764,7 @@ static void register_midiout_devices(void)
...
@@ -765,7 +764,7 @@ static void register_midiout_devices(void)
StringFromGUID2
(
&
CLSID_AVIMIDIRender
,
clsid
,
CHARS_IN_GUID
);
StringFromGUID2
(
&
CLSID_AVIMIDIRender
,
clsid
,
CHARS_IN_GUID
);
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
goto
cleanup
;
goto
cleanup
;
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
_keyname
,
&
var
);
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
W
,
&
var
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
VariantClear
(
&
var
);
VariantClear
(
&
var
);
...
@@ -854,7 +853,7 @@ static void register_vfw_codecs(void)
...
@@ -854,7 +853,7 @@ static void register_vfw_codecs(void)
StringFromGUID2
(
&
CLSID_AVICo
,
clsid
,
CHARS_IN_GUID
);
StringFromGUID2
(
&
CLSID_AVICo
,
clsid
,
CHARS_IN_GUID
);
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
if
(
!
(
V_BSTR
(
&
var
)
=
SysAllocString
(
clsid
)))
goto
cleanup
;
goto
cleanup
;
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
_keyname
,
&
var
);
hr
=
IPropertyBag_Write
(
prop_bag
,
clsid
W
,
&
var
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
VariantClear
(
&
var
);
VariantClear
(
&
var
);
...
...
dlls/devenum/devenum_main.c
View file @
3670d594
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
devenum
);
WINE_DEFAULT_DEBUG_CHANNEL
(
devenum
);
DECLSPEC_HIDDEN
LONG
dll_refs
;
DECLSPEC_HIDDEN
LONG
dll_refs
;
DECLSPEC_HIDDEN
HINSTANCE
DEVENUM_hI
nstance
;
static
HINSTANCE
devenum_i
nstance
;
typedef
struct
typedef
struct
{
{
...
@@ -36,11 +36,6 @@ typedef struct
...
@@ -36,11 +36,6 @@ typedef struct
}
register_info
;
}
register_info
;
/***********************************************************************
/***********************************************************************
* Global string constant definitions
*/
const
WCHAR
clsid_keyname
[
6
]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
/***********************************************************************
* DllEntryPoint
* DllEntryPoint
*/
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
fImpLoad
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
fImpLoad
)
...
@@ -49,7 +44,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
...
@@ -49,7 +44,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
switch
(
fdwReason
)
{
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
DEVENUM_hI
nstance
=
hinstDLL
;
devenum_i
nstance
=
hinstDLL
;
DisableThreadLibraryCalls
(
hinstDLL
);
DisableThreadLibraryCalls
(
hinstDLL
);
break
;
break
;
}
}
...
@@ -166,7 +161,7 @@ HRESULT WINAPI DllRegisterServer(void)
...
@@ -166,7 +161,7 @@ HRESULT WINAPI DllRegisterServer(void)
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
res
=
__wine_register_resources
(
DEVENUM_hI
nstance
);
res
=
__wine_register_resources
(
devenum_i
nstance
);
if
(
FAILED
(
res
))
if
(
FAILED
(
res
))
return
res
;
return
res
;
...
@@ -214,5 +209,5 @@ HRESULT WINAPI DllRegisterServer(void)
...
@@ -214,5 +209,5 @@ HRESULT WINAPI DllRegisterServer(void)
HRESULT
WINAPI
DllUnregisterServer
(
void
)
HRESULT
WINAPI
DllUnregisterServer
(
void
)
{
{
FIXME
(
"stub!
\n
"
);
FIXME
(
"stub!
\n
"
);
return
__wine_unregister_resources
(
DEVENUM_hI
nstance
);
return
__wine_unregister_resources
(
devenum_i
nstance
);
}
}
dlls/devenum/devenum_private.h
View file @
3670d594
...
@@ -83,7 +83,7 @@ extern IParseDisplayName DEVENUM_ParseDisplayName DECLSPEC_HIDDEN;
...
@@ -83,7 +83,7 @@ extern IParseDisplayName DEVENUM_ParseDisplayName DECLSPEC_HIDDEN;
*/
*/
static
const
WCHAR
backslashW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
backslashW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
clsidW
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
'\\'
,
0
};
static
const
WCHAR
clsidW
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
instanceW
[]
=
{
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'n'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
instanceW
[]
=
{
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'n'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
wszActiveMovieKey
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
static
const
WCHAR
wszActiveMovieKey
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
...
@@ -93,5 +93,3 @@ static const WCHAR deviceW[] = {'@','d','e','v','i','c','e',':',0};
...
@@ -93,5 +93,3 @@ static const WCHAR deviceW[] = {'@','d','e','v','i','c','e',':',0};
static
const
WCHAR
dmoW
[]
=
{
'd'
,
'm'
,
'o'
,
':'
,
0
};
static
const
WCHAR
dmoW
[]
=
{
'd'
,
'm'
,
'o'
,
':'
,
0
};
static
const
WCHAR
swW
[]
=
{
's'
,
'w'
,
':'
,
0
};
static
const
WCHAR
swW
[]
=
{
's'
,
'w'
,
':'
,
0
};
static
const
WCHAR
cmW
[]
=
{
'c'
,
'm'
,
':'
,
0
};
static
const
WCHAR
cmW
[]
=
{
'c'
,
'm'
,
':'
,
0
};
extern
const
WCHAR
clsid_keyname
[
6
]
DECLSPEC_HIDDEN
;
dlls/devenum/mediacatenum.c
View file @
3670d594
...
@@ -347,6 +347,7 @@ static HRESULT create_PropertyBag(MediaCatMoniker *mon, IPropertyBag **ppBag)
...
@@ -347,6 +347,7 @@ static HRESULT create_PropertyBag(MediaCatMoniker *mon, IPropertyBag **ppBag)
else
if
(
rpb
->
type
==
DEVICE_FILTER
)
else
if
(
rpb
->
type
==
DEVICE_FILTER
)
{
{
strcpyW
(
rpb
->
path
,
clsidW
);
strcpyW
(
rpb
->
path
,
clsidW
);
strcatW
(
rpb
->
path
,
backslashW
);
if
(
mon
->
has_class
)
if
(
mon
->
has_class
)
{
{
StringFromGUID2
(
&
mon
->
class
,
rpb
->
path
+
strlenW
(
rpb
->
path
),
CHARS_IN_GUID
);
StringFromGUID2
(
&
mon
->
class
,
rpb
->
path
+
strlenW
(
rpb
->
path
),
CHARS_IN_GUID
);
...
@@ -496,7 +497,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(IMoniker *iface, IBi
...
@@ -496,7 +497,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(IMoniker *iface, IBi
if
(
SUCCEEDED
(
res
))
if
(
SUCCEEDED
(
res
))
{
{
V_VT
(
&
var
)
=
VT_LPWSTR
;
V_VT
(
&
var
)
=
VT_LPWSTR
;
res
=
IPropertyBag_Read
(
pProp
,
clsid
_keyname
,
&
var
,
NULL
);
res
=
IPropertyBag_Read
(
pProp
,
clsid
W
,
&
var
,
NULL
);
}
}
if
(
SUCCEEDED
(
res
))
if
(
SUCCEEDED
(
res
))
{
{
...
@@ -1027,6 +1028,7 @@ HRESULT create_EnumMoniker(REFCLSID class, IEnumMoniker **ppEnumMoniker)
...
@@ -1027,6 +1028,7 @@ HRESULT create_EnumMoniker(REFCLSID class, IEnumMoniker **ppEnumMoniker)
pEnumMoniker
->
class
=
*
class
;
pEnumMoniker
->
class
=
*
class
;
strcpyW
(
buffer
,
clsidW
);
strcpyW
(
buffer
,
clsidW
);
strcatW
(
buffer
,
backslashW
);
StringFromGUID2
(
class
,
buffer
+
strlenW
(
buffer
),
CHARS_IN_GUID
);
StringFromGUID2
(
class
,
buffer
+
strlenW
(
buffer
),
CHARS_IN_GUID
);
strcatW
(
buffer
,
instanceW
);
strcatW
(
buffer
,
instanceW
);
if
(
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
buffer
,
0
,
KEY_ENUMERATE_SUB_KEYS
,
&
pEnumMoniker
->
sw_key
))
if
(
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
buffer
,
0
,
KEY_ENUMERATE_SUB_KEYS
,
&
pEnumMoniker
->
sw_key
))
...
...
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