devenum: Make some variables static.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
47921c19e0
commit
3670d59409
|
@ -41,8 +41,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(devenum);
|
||||
|
||||
extern HINSTANCE DEVENUM_hInstance;
|
||||
|
||||
static const WCHAR wszFilterKeyName[] = {'F','i','l','t','e','r',0};
|
||||
static const WCHAR wszMeritName[] = {'M','e','r','i','t',0};
|
||||
static const WCHAR wszPins[] = {'P','i','n','s',0};
|
||||
|
@ -424,6 +422,7 @@ static void register_legacy_filters(void)
|
|||
TRACE("Registering %s\n", debugstr_w(wszFilterSubkeyName));
|
||||
|
||||
strcpyW(wszRegKey, clsidW);
|
||||
strcatW(wszRegKey, backslashW);
|
||||
strcatW(wszRegKey, wszFilterSubkeyName);
|
||||
|
||||
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, wszRegKey, 0, KEY_READ, &classkey) != ERROR_SUCCESS)
|
||||
|
@ -460,7 +459,7 @@ static void register_legacy_filters(void)
|
|||
V_VT(&var) = VT_BSTR;
|
||||
if (!(V_BSTR(&var) = SysAllocString(wszFilterSubkeyName)))
|
||||
goto cleanup;
|
||||
hr = IPropertyBag_Write(prop_bag, clsid_keyname, &var);
|
||||
hr = IPropertyBag_Write(prop_bag, clsidW, &var);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
VariantClear(&var);
|
||||
|
||||
|
@ -537,7 +536,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons
|
|||
StringFromGUID2(&CLSID_DSoundRender, clsid, CHARS_IN_GUID);
|
||||
if (!(V_BSTR(&var) = SysAllocString(clsid)))
|
||||
goto cleanup;
|
||||
hr = IPropertyBag_Write(prop_bag, clsid_keyname, &var);
|
||||
hr = IPropertyBag_Write(prop_bag, clsidW, &var);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
VariantClear(&var);
|
||||
|
||||
|
@ -620,7 +619,7 @@ static void register_waveout_devices(void)
|
|||
StringFromGUID2(&CLSID_AudioRender, clsid, CHARS_IN_GUID);
|
||||
if (!(V_BSTR(&var) = SysAllocString(clsid)))
|
||||
goto cleanup;
|
||||
hr = IPropertyBag_Write(prop_bag, clsid_keyname, &var);
|
||||
hr = IPropertyBag_Write(prop_bag, clsidW, &var);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
VariantClear(&var);
|
||||
|
||||
|
@ -693,7 +692,7 @@ static void register_wavein_devices(void)
|
|||
StringFromGUID2(&CLSID_AudioRecord, clsid, CHARS_IN_GUID);
|
||||
if (!(V_BSTR(&var) = SysAllocString(clsid)))
|
||||
goto cleanup;
|
||||
hr = IPropertyBag_Write(prop_bag, clsid_keyname, &var);
|
||||
hr = IPropertyBag_Write(prop_bag, clsidW, &var);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
VariantClear(&var);
|
||||
|
||||
|
@ -765,7 +764,7 @@ static void register_midiout_devices(void)
|
|||
StringFromGUID2(&CLSID_AVIMIDIRender, clsid, CHARS_IN_GUID);
|
||||
if (!(V_BSTR(&var) = SysAllocString(clsid)))
|
||||
goto cleanup;
|
||||
hr = IPropertyBag_Write(prop_bag, clsid_keyname, &var);
|
||||
hr = IPropertyBag_Write(prop_bag, clsidW, &var);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
VariantClear(&var);
|
||||
|
||||
|
@ -854,7 +853,7 @@ static void register_vfw_codecs(void)
|
|||
StringFromGUID2(&CLSID_AVICo, clsid, CHARS_IN_GUID);
|
||||
if (!(V_BSTR(&var) = SysAllocString(clsid)))
|
||||
goto cleanup;
|
||||
hr = IPropertyBag_Write(prop_bag, clsid_keyname, &var);
|
||||
hr = IPropertyBag_Write(prop_bag, clsidW, &var);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
VariantClear(&var);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(devenum);
|
||||
|
||||
DECLSPEC_HIDDEN LONG dll_refs;
|
||||
DECLSPEC_HIDDEN HINSTANCE DEVENUM_hInstance;
|
||||
static HINSTANCE devenum_instance;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -35,11 +35,6 @@ typedef struct
|
|||
BOOL instance;
|
||||
} register_info;
|
||||
|
||||
/***********************************************************************
|
||||
* Global string constant definitions
|
||||
*/
|
||||
const WCHAR clsid_keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 };
|
||||
|
||||
/***********************************************************************
|
||||
* DllEntryPoint
|
||||
*/
|
||||
|
@ -49,7 +44,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
|||
|
||||
switch(fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DEVENUM_hInstance = hinstDLL;
|
||||
devenum_instance = hinstDLL;
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
break;
|
||||
}
|
||||
|
@ -166,7 +161,7 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
|
||||
TRACE("\n");
|
||||
|
||||
res = __wine_register_resources( DEVENUM_hInstance );
|
||||
res = __wine_register_resources( devenum_instance );
|
||||
if (FAILED(res))
|
||||
return res;
|
||||
|
||||
|
@ -214,5 +209,5 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
FIXME("stub!\n");
|
||||
return __wine_unregister_resources( DEVENUM_hInstance );
|
||||
return __wine_unregister_resources( devenum_instance );
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ extern IParseDisplayName DEVENUM_ParseDisplayName DECLSPEC_HIDDEN;
|
|||
*/
|
||||
|
||||
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 wszActiveMovieKey[] = {'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\',
|
||||
|
@ -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 swW[] = {'s','w',':',0};
|
||||
static const WCHAR cmW[] = {'c','m',':',0};
|
||||
|
||||
extern const WCHAR clsid_keyname[6] DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -347,6 +347,7 @@ static HRESULT create_PropertyBag(MediaCatMoniker *mon, IPropertyBag **ppBag)
|
|||
else if (rpb->type == DEVICE_FILTER)
|
||||
{
|
||||
strcpyW(rpb->path, clsidW);
|
||||
strcatW(rpb->path, backslashW);
|
||||
if (mon->has_class)
|
||||
{
|
||||
StringFromGUID2(&mon->class, rpb->path + strlenW(rpb->path), CHARS_IN_GUID);
|
||||
|
@ -496,7 +497,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(IMoniker *iface, IBi
|
|||
if (SUCCEEDED(res))
|
||||
{
|
||||
V_VT(&var) = VT_LPWSTR;
|
||||
res = IPropertyBag_Read(pProp, clsid_keyname, &var, NULL);
|
||||
res = IPropertyBag_Read(pProp, clsidW, &var, NULL);
|
||||
}
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
|
@ -1027,6 +1028,7 @@ HRESULT create_EnumMoniker(REFCLSID class, IEnumMoniker **ppEnumMoniker)
|
|||
pEnumMoniker->class = *class;
|
||||
|
||||
strcpyW(buffer, clsidW);
|
||||
strcatW(buffer, backslashW);
|
||||
StringFromGUID2(class, buffer + strlenW(buffer), CHARS_IN_GUID);
|
||||
strcatW(buffer, instanceW);
|
||||
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, buffer, 0, KEY_ENUMERATE_SUB_KEYS, &pEnumMoniker->sw_key))
|
||||
|
|
Loading…
Reference in New Issue