mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch for implementation of mfplat.MFTRegister.
This commit is contained in:
parent
a2dd6b6ede
commit
f2ecb762ea
@ -39,8 +39,9 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [8]:**
|
||||
**Bug fixes and features included in the next upcoming release [9]:**
|
||||
|
||||
* Add implementation for mfplat.MFTRegister ([Wine Bug #37811](https://bugs.winehq.org/show_bug.cgi?id=37811))
|
||||
* Add support for process specific debug channels
|
||||
* Add support for wbemprox Win32_SystemEnclosure table ([Wine Bug #34517](https://bugs.winehq.org/show_bug.cgi?id=34517))
|
||||
* Calculate msvcrt exponential math operations with higher precision ([Wine Bug #37149](https://bugs.winehq.org/show_bug.cgi?id=37149))
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -13,6 +13,7 @@ wine-staging (1.7.41) UNRELEASED; urgency=low
|
||||
* Added patch to recognize localhost as local machine in wbemprox.
|
||||
* Added patch to implement support for wbemprox Win32_SystemEnclosure table.
|
||||
* Added patch to fix handling of opening read-only files for FILE_DELETE_ON_CLOSE.
|
||||
* Added patch for implementation of mfplat.MFTRegister.
|
||||
* Added tests for RtlIpv6AddressToString and RtlIpv6AddressToStringEx.
|
||||
* Removed patches to fix invalid memory access in get_registry_locale_info (accepted upstream).
|
||||
* Removed patches to avoid repeated FIXMEs in PsLookupProcessByProcessId stub (accepted upstream).
|
||||
|
@ -0,0 +1,239 @@
|
||||
From b761ffadb87d3464eefaba9cfc9f15c0297c22b5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 17 Apr 2015 14:39:17 +0200
|
||||
Subject: mfplat: Implement MFTRegister.
|
||||
|
||||
---
|
||||
dlls/mfplat/Makefile.in | 1 +
|
||||
dlls/mfplat/main.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/mfplat/mfplat.spec | 3 +-
|
||||
include/mfapi.h | 4 +-
|
||||
loader/wine.inf.in | 4 ++
|
||||
5 files changed, 153 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/mfplat/Makefile.in b/dlls/mfplat/Makefile.in
|
||||
index 2b5bd24..9679f53 100644
|
||||
--- a/dlls/mfplat/Makefile.in
|
||||
+++ b/dlls/mfplat/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
MODULE = mfplat.dll
|
||||
+IMPORTS = user32 advapi32
|
||||
|
||||
C_SRCS = \
|
||||
main.c
|
||||
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
|
||||
index 3376a2c..34f17ee 100644
|
||||
--- a/dlls/mfplat/main.c
|
||||
+++ b/dlls/mfplat/main.c
|
||||
@@ -22,13 +22,42 @@
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
+#include "winuser.h"
|
||||
+#include "winreg.h"
|
||||
#include "mfapi.h"
|
||||
#include "mferror.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
|
||||
|
||||
+static WCHAR transform_keyW[] = {'S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s',
|
||||
+ '\\','M','e','d','i','a','F','o','u','n','d','a','t','i','o','n','\\',
|
||||
+ 'T','r','a','n','s','f','o','r','m','s',0};
|
||||
+static WCHAR categories_keyW[] = {'S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s',
|
||||
+ '\\','M','e','d','i','a','F','o','u','n','d','a','t','i','o','n','\\',
|
||||
+ 'T','r','a','n','s','f','o','r','m','s','\\',
|
||||
+ 'C','a','t','e','g','o','r','i','e','s',0};
|
||||
+static WCHAR inputtypesW[] = {'I','n','p','u','t','T','y','p','e','s',0};
|
||||
+static WCHAR outputtypesW[] = {'O','u','t','p','u','t','T','y','p','e','s',0};
|
||||
+static const WCHAR szGUIDFmt[] =
|
||||
+{
|
||||
+ '%','0','8','x','-','%','0','4','x','-','%','0','4','x','-','%','0',
|
||||
+ '2','x','%','0','2','x','-','%','0','2','x','%','0','2','x','%','0','2',
|
||||
+ 'x','%','0','2','x','%','0','2','x','%','0','2','x',0
|
||||
+};
|
||||
+
|
||||
+static LPWSTR GUIDToString(LPWSTR lpwstr, REFGUID lpcguid)
|
||||
+{
|
||||
+ wsprintfW(lpwstr, szGUIDFmt, lpcguid->Data1, lpcguid->Data2,
|
||||
+ lpcguid->Data3, lpcguid->Data4[0], lpcguid->Data4[1],
|
||||
+ lpcguid->Data4[2], lpcguid->Data4[3], lpcguid->Data4[4],
|
||||
+ lpcguid->Data4[5], lpcguid->Data4[6], lpcguid->Data4[7]);
|
||||
+
|
||||
+ return lpwstr;
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
switch (reason)
|
||||
@@ -43,6 +72,121 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static HRESULT register_transform(CLSID *clsid, WCHAR *name,
|
||||
+ UINT32 cinput, MFT_REGISTER_TYPE_INFO *inputTypes,
|
||||
+ UINT32 coutput, MFT_REGISTER_TYPE_INFO *outputTypes)
|
||||
+{
|
||||
+ HKEY htransform, hclsid = 0;
|
||||
+ WCHAR buffer[64];
|
||||
+ GUID *types;
|
||||
+ DWORD size;
|
||||
+ LONG ret;
|
||||
+ UINT32 i;
|
||||
+
|
||||
+ if (RegOpenKeyW(HKEY_LOCAL_MACHINE, transform_keyW, &htransform))
|
||||
+ return E_FAIL;
|
||||
+
|
||||
+ GUIDToString(buffer, clsid);
|
||||
+ ret = RegCreateKeyW(htransform, buffer, &hclsid);
|
||||
+ RegCloseKey(htransform);
|
||||
+ if (ret) return E_FAIL;
|
||||
+
|
||||
+ size = (strlenW(name) + 1) * sizeof(WCHAR);
|
||||
+ if (RegSetValueExW(hclsid, NULL, 0, REG_SZ, (BYTE *)name, size))
|
||||
+ goto err;
|
||||
+
|
||||
+ if (cinput)
|
||||
+ {
|
||||
+ size = 2 * cinput * sizeof(GUID);
|
||||
+ types = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ if (!types) goto err;
|
||||
+
|
||||
+ for (i = 0; i < cinput; i++)
|
||||
+ {
|
||||
+ memcpy(&types[2 * i], &inputTypes[i].guidMajorType, sizeof(GUID));
|
||||
+ memcpy(&types[2 * i + 1], &inputTypes[i].guidSubtype, sizeof(GUID));
|
||||
+ }
|
||||
+
|
||||
+ ret = RegSetValueExW(hclsid, inputtypesW, 0, REG_BINARY, (BYTE *)types, size);
|
||||
+ HeapFree(GetProcessHeap(), 0, types);
|
||||
+ if (ret) goto err;
|
||||
+ }
|
||||
+
|
||||
+ if (coutput)
|
||||
+ {
|
||||
+ size = 2 * coutput * sizeof(GUID);
|
||||
+ types = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ if (!types) goto err;
|
||||
+
|
||||
+ for (i = 0; i < coutput; i++)
|
||||
+ {
|
||||
+ memcpy(&types[2 * i], &outputTypes[i].guidMajorType, sizeof(GUID));
|
||||
+ memcpy(&types[2 * i + 1], &outputTypes[i].guidSubtype, sizeof(GUID));
|
||||
+ }
|
||||
+
|
||||
+ ret = RegSetValueExW(hclsid, outputtypesW, 0, REG_BINARY, (BYTE *)types, size);
|
||||
+ HeapFree(GetProcessHeap(), 0, types);
|
||||
+ if (ret) goto err;
|
||||
+ }
|
||||
+
|
||||
+ RegCloseKey(hclsid);
|
||||
+ return S_OK;
|
||||
+
|
||||
+err:
|
||||
+ RegCloseKey(hclsid);
|
||||
+ return E_FAIL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT register_category(CLSID *clsid, GUID *category)
|
||||
+{
|
||||
+ HKEY hcategory, htmp1, htmp2;
|
||||
+ WCHAR buffer[64];
|
||||
+ DWORD ret;
|
||||
+
|
||||
+ if (RegOpenKeyW(HKEY_LOCAL_MACHINE, categories_keyW, &hcategory))
|
||||
+ return E_FAIL;
|
||||
+
|
||||
+ GUIDToString(buffer, category);
|
||||
+ ret = RegCreateKeyW(hcategory, buffer, &htmp1);
|
||||
+ RegCloseKey(hcategory);
|
||||
+ if (ret) return E_FAIL;
|
||||
+
|
||||
+ GUIDToString(buffer, clsid);
|
||||
+ ret = RegCreateKeyW(htmp1, buffer, &htmp2);
|
||||
+ RegCloseKey(htmp1);
|
||||
+ if (ret) return E_FAIL;
|
||||
+
|
||||
+ RegCloseKey(htmp2);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * MFTRegister (mfplat.@)
|
||||
+ */
|
||||
+HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags, UINT32 cinput,
|
||||
+ MFT_REGISTER_TYPE_INFO *inputTypes, UINT32 coutput,
|
||||
+ MFT_REGISTER_TYPE_INFO *outputTypes, void *attributes)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ FIXME("(%s, %s, %s, %x, %u, %p, %u, %p, %p)\n", debugstr_guid(&clsid), debugstr_guid(&category),
|
||||
+ debugstr_w(name), flags, cinput, inputTypes,
|
||||
+ coutput, outputTypes, attributes);
|
||||
+
|
||||
+ if (attributes)
|
||||
+ FIXME("attributes not yet supported.\n");
|
||||
+
|
||||
+ if (flags)
|
||||
+ FIXME("flags not yet supported.\n");
|
||||
+
|
||||
+ hr = register_transform(&clsid, name, cinput, inputTypes, coutput, outputTypes);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ hr = register_category(&clsid, &category);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* MFStartup (mfplat.@)
|
||||
*/
|
||||
diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec
|
||||
index 7100dfd..5b24aa9 100644
|
||||
--- a/dlls/mfplat/mfplat.spec
|
||||
+++ b/dlls/mfplat/mfplat.spec
|
||||
@@ -137,7 +137,8 @@
|
||||
@ stub MFTEnum
|
||||
@ stub MFTEnumEx
|
||||
@ stub MFTGetInfo
|
||||
-@ stub MFTRegister
|
||||
+# Structures are directly pushed on the stack
|
||||
+@ stdcall -norelay MFTRegister()
|
||||
@ stub MFTRegisterLocal
|
||||
@ stub MFTRegisterLocalByCLSID
|
||||
@ stub MFTUnregister
|
||||
diff --git a/include/mfapi.h b/include/mfapi.h
|
||||
index 929a36d..49a86ac 100644
|
||||
--- a/include/mfapi.h
|
||||
+++ b/include/mfapi.h
|
||||
@@ -24,8 +24,8 @@
|
||||
#define MFSTARTUP_FULL 0
|
||||
|
||||
typedef struct _MFT_REGISTER_TYPE_INFO {
|
||||
- GUID major_type;
|
||||
- GUID sub_type;
|
||||
+ GUID guidMajorType;
|
||||
+ GUID guidSubtype;
|
||||
} MFT_REGISTER_TYPE_INFO;
|
||||
|
||||
typedef unsigned __int64 MFWORKITEM_KEY;
|
||||
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
|
||||
index d901251..b6a45e7 100644
|
||||
--- a/loader/wine.inf.in
|
||||
+++ b/loader/wine.inf.in
|
||||
@@ -620,6 +620,10 @@ HKLM,Software\Borland\Database Engine\Settings\SYSTEM\INIT,SHAREDMEMLOCATION,,90
|
||||
HKLM,Software\Clients\Mail,,2,"Native Mail Client"
|
||||
HKLM,Software\Clients\Mail\Native Mail Client,,2,"Native Mail Client"
|
||||
HKLM,Software\Clients\Mail\Native Mail Client,"DLLPath",2,"%11%\winemapi.dll"
|
||||
+HKLM,Software\Classes\MediaFoundation,,16
|
||||
+HKLM,Software\Classes\MediaFoundation\MediaSources,,16
|
||||
+HKLM,Software\Classes\MediaFoundation\Transforms,,16
|
||||
+HKLM,Software\Classes\MediaFoundation\Transforms\Categories,,16
|
||||
HKLM,Software\Microsoft\Advanced INF Setup,,16
|
||||
HKLM,Software\Microsoft\Clients,,16
|
||||
HKLM,Software\Microsoft\Cryptography\Calais\Current,,16
|
||||
--
|
||||
2.3.5
|
||||
|
1
patches/mfplat-MFTRegister/definition
Normal file
1
patches/mfplat-MFTRegister/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [37811] Add implementation for mfplat.MFTRegister
|
@ -126,6 +126,7 @@ patch_enable_all ()
|
||||
enable_libs_Debug_Channel="$1"
|
||||
enable_libs_Unicode_Collation="$1"
|
||||
enable_makedep_PARENTSPEC="$1"
|
||||
enable_mfplat_MFTRegister="$1"
|
||||
enable_mmdevapi_AEV_Stubs="$1"
|
||||
enable_mountmgr_DosDevices="$1"
|
||||
enable_mscoree_CorValidateImage="$1"
|
||||
@ -450,6 +451,9 @@ patch_enable ()
|
||||
makedep-PARENTSPEC)
|
||||
enable_makedep_PARENTSPEC="$2"
|
||||
;;
|
||||
mfplat-MFTRegister)
|
||||
enable_mfplat_MFTRegister="$2"
|
||||
;;
|
||||
mmdevapi-AEV_Stubs)
|
||||
enable_mmdevapi_AEV_Stubs="$2"
|
||||
;;
|
||||
@ -1956,6 +1960,18 @@ if test "$enable_dxgi_GetDesc" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset makedep-PARENTSPEC
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * tools/makedep.c
|
||||
# |
|
||||
if test "$enable_makedep_PARENTSPEC" -eq 1; then
|
||||
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-DllRedirects
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -1976,18 +1992,6 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset makedep-PARENTSPEC
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * tools/makedep.c
|
||||
# |
|
||||
if test "$enable_makedep_PARENTSPEC" -eq 1; then
|
||||
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Helper
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -2971,6 +2975,21 @@ if test "$enable_libs_Unicode_Collation" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset mfplat-MFTRegister
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#37811] Add implementation for mfplat.MFTRegister
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/mfplat/Makefile.in, dlls/mfplat/main.c, dlls/mfplat/mfplat.spec, include/mfapi.h, loader/wine.inf.in
|
||||
# |
|
||||
if test "$enable_mfplat_MFTRegister" -eq 1; then
|
||||
patch_apply mfplat-MFTRegister/0001-mfplat-Implement-MFTRegister.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "mfplat: Implement MFTRegister.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset mmdevapi-AEV_Stubs
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user