Nikolay Sivov : mfplat: Use wide strings for registry paths.
Alexandre Julliard
julliard at winehq.org
Fri Oct 22 14:46:10 CDT 2021
Module: wine
Branch: master
Commit: 7d43ac947412c7981539a34a557d7b310e084163
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7d43ac947412c7981539a34a557d7b310e084163
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Oct 22 08:24:22 2021 +0300
mfplat: Use wide strings for registry paths.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mfplat/main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 5bd19190ed5..37a66798b2f 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -5944,7 +5944,6 @@ static HRESULT resolver_create_registered_handler(HKEY hkey, REFIID riid, void *
static HRESULT resolver_get_bytestream_handler(IMFByteStream *stream, const WCHAR *url, DWORD flags,
IMFByteStreamHandler **handler)
{
- static const char streamhandlerspath[] = "Software\\Microsoft\\Windows Media Foundation\\ByteStreamHandlers";
static const HKEY hkey_roots[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
WCHAR *mimeW = NULL, *urlW = NULL;
IMFAttributes *attributes;
@@ -6008,7 +6007,7 @@ static HRESULT resolver_get_bytestream_handler(IMFByteStream *stream, const WCHA
const WCHAR *namesW[2] = { mimeW, url_ext };
HKEY hkey, hkey_handler;
- if (RegOpenKeyA(hkey_roots[i], streamhandlerspath, &hkey))
+ if (RegOpenKeyW(hkey_roots[i], L"Software\\Microsoft\\Windows Media Foundation\\ByteStreamHandlers", &hkey))
continue;
for (j = 0; j < ARRAY_SIZE(namesW); ++j)
@@ -6045,7 +6044,6 @@ static HRESULT resolver_get_bytestream_handler(IMFByteStream *stream, const WCHA
static HRESULT resolver_create_scheme_handler(const WCHAR *scheme, DWORD flags, IMFSchemeHandler **handler)
{
- static const char schemehandlerspath[] = "Software\\Microsoft\\Windows Media Foundation\\SchemeHandlers";
static const HKEY hkey_roots[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
HRESULT hr = MF_E_UNSUPPORTED_SCHEME;
unsigned int i;
@@ -6082,7 +6080,7 @@ static HRESULT resolver_create_scheme_handler(const WCHAR *scheme, DWORD flags,
hr = MF_E_UNSUPPORTED_SCHEME;
- if (RegOpenKeyA(hkey_roots[i], schemehandlerspath, &hkey))
+ if (RegOpenKeyW(hkey_roots[i], L"Software\\Microsoft\\Windows Media Foundation\\SchemeHandlers", &hkey))
continue;
if (!RegOpenKeyW(hkey, scheme, &hkey_handler))
More information about the wine-cvs
mailing list