https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b25254dcdaf00316b9afb…
commit b25254dcdaf00316b9afb6c4b994270c4c1b9eb4
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Oct 26 13:06:37 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Oct 26 13:06:37 2019 +0100
[MSDMO] Sync with Wine Staging 4.18. CORE-16441
---
dll/directx/wine/msdmo/dmoreg.c | 20 +++++++++++---------
media/doc/README.WINE | 2 +-
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/dll/directx/wine/msdmo/dmoreg.c b/dll/directx/wine/msdmo/dmoreg.c
index 864cb859e60..34532f58cff 100644
--- a/dll/directx/wine/msdmo/dmoreg.c
+++ b/dll/directx/wine/msdmo/dmoreg.c
@@ -27,7 +27,6 @@
#include "winerror.h"
#include "winreg.h"
#include "objbase.h"
-#include "wine/unicode.h"
#include "wine/debug.h"
#include "dmo.h"
@@ -121,7 +120,7 @@ static HRESULT string_to_guid(const WCHAR *string, GUID *guid)
{
WCHAR buffer[39];
buffer[0] = '{';
- strcpyW(buffer + 1, string);
+ lstrcpyW(buffer + 1, string);
buffer[37] = '}';
buffer[38] = 0;
return CLSIDFromString(buffer, guid);
@@ -218,7 +217,7 @@ HRESULT WINAPI DMORegister(
/* Set default Name value */
ret = RegSetValueExW(hkey, NULL, 0, REG_SZ, (const BYTE*) szName,
- (strlenW(szName) + 1) * sizeof(WCHAR));
+ (lstrlenW(szName) + 1) * sizeof(WCHAR));
/* Set InputTypes */
hres = write_types(hkey, szDMOInputType, pInTypes, cInTypes);
@@ -530,7 +529,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
TRACE("(%p)->(%d %p %p %p)\n", This, cItemsToFetch, pCLSID, Names,
pcItemsFetched);
- if (!pCLSID || !Names)
+ if (!pCLSID)
return E_POINTER;
if (!pcItemsFetched && cItemsToFetch > 1)
@@ -656,14 +655,17 @@ static HRESULT WINAPI IEnumDMO_fnNext(
}
/* Media object wasn't filtered so add it to return list */
- Names[count] = NULL;
len = MAX_PATH * sizeof(WCHAR);
ret = RegQueryValueExW(hkey, NULL, NULL, NULL, (LPBYTE)szValue, &len);
- if (ERROR_SUCCESS == ret)
+ if (Names)
{
- Names[count] = CoTaskMemAlloc((strlenW(szValue) + 1) * sizeof(WCHAR));
- if (Names[count])
- strcpyW(Names[count], szValue);
+ Names[count] = NULL;
+ if (ret == ERROR_SUCCESS)
+ {
+ Names[count] = CoTaskMemAlloc((lstrlenW(szValue) + 1) * sizeof(WCHAR));
+ if (Names[count])
+ lstrcpyW(Names[count], szValue);
+ }
}
wsprintfW(szGuidKey,szToGuidFmt,szNextKey);
CLSIDFromString(szGuidKey, &pCLSID[count]);
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index c61431446bb..a2ab499a1bb 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -38,7 +38,7 @@ dll/directx/wine/dplayx # Synced to WineStaging-4.18
dll/directx/wine/dpnhpast # Synced to WineStaging-4.18
dll/directx/wine/dsound # Synced to Wine-1.3.29
dll/directx/wine/dxdiagn # Synced to WineStaging-4.18
-dll/directx/wine/msdmo # Synced to WineStaging-3.17
+dll/directx/wine/msdmo # Synced to WineStaging-4.18
dll/directx/wine/qedit # Synced to WineStaging-3.17
dll/directx/wine/quartz # Synced to WineStaging-3.9
dll/directx/wine/wined3d # Synced to WineStaging-3.3