Compare commits

..

17 Commits
v5.1 ... v5.2

Author SHA1 Message Date
Alistair Leslie-Hughes
ede44e4e8f Release v5.2 2020-02-17 10:31:59 +11:00
Alistair Leslie-Hughes
aca614eb8b Rebase against 85bd94f8705115ac0c35eac6ff7e2f3e59be924e 2020-02-17 09:47:53 +11:00
Alistair Leslie-Hughes
49d52336e1 Rebase against 7332de64a5a204cc285bdc1f8768d3217103b7dd 2020-02-14 09:03:50 +11:00
Zebediah Figura
17fdb93f55 Rebase against 3d57cc2863f2f9a5ace40d29317b3ff4357fd119. 2020-02-12 17:33:55 -06:00
Paul Gofman
3f43238b01 Restore d3dx9_36-BumpLuminance patch 0002. 2020-02-12 11:49:28 +03:00
Paul Gofman
59d19c8963 Rebase against d1373e8aae1b15b96e847488e4b6617789f8fb62. 2020-02-12 02:38:19 +03:00
Paul Gofman
d3ad4e1115 Updated ntdll-User_shared_data_fields patchset. 2020-02-11 16:33:47 +03:00
Zebediah Figura
b3f1e5566f Rebase against 0df9cce29d0d32d3f1f13c4ec4eabc81675a17ed. 2020-02-10 17:40:48 -06:00
Zebediah Figura
c26be86c42 Rebase against f909d18baf1d97831c55a1d47610427ac2084ca3. 2020-02-07 16:49:59 -06:00
Zebediah Figura
14a3242b92 winebuild-Fake_Dlls: Fix the fake DLL function dispatcher offset.
Fixes: ff10ae6e74

Spotted by Ken Thomases.
2020-02-06 11:37:07 -06:00
Zebediah Figura
991bebfee7 Rebase against 9642f35922b79cebacdc774eb54619e389ccd531. 2020-02-05 17:42:46 -06:00
Zebediah Figura
0d7a4f0c73 newupdate.py: Bail immediately on a bad dependency graph. 2020-02-05 17:42:42 -06:00
Alistair Leslie-Hughes
30c1e2757a Updated ntdll-RtlIpv4StringToAddress patchset 2020-02-05 15:21:09 +11:00
Zebediah Figura
e55a3a3f43 ntdll-Signal_Handler: Remove.
As of 684c272aa794 we disable the stack protector for all (non-PE) code.
2020-02-04 15:12:34 -06:00
Alistair Leslie-Hughes
ca1047528f Rebase against 87875e12bcdca659e578849fa62585b1b5316a50 2020-02-04 08:36:15 +11:00
Zebediah Figura
d53a1b4a17 d3d9-Tests: Remove patch set.
No information is provided as to what cards or driver trigger the failures;
assume they are not relevant any longer until proven otherwise.
2020-02-02 16:05:38 -06:00
Zebediah Figura
47facf2571 d3dx9-32bpp_Alpha_Channel: Add reference to bug report. 2020-02-02 16:03:49 -06:00
58 changed files with 607 additions and 3841 deletions

View File

@@ -1,4 +1,4 @@
From fa73044dd60bae90b9a5ec850205a07579d4db17 Mon Sep 17 00:00:00 2001
From d216f85a593a09e7983d9178fb3e1f20bfcf08cc Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 29 May 2014 23:43:45 +0200
Subject: [PATCH] loader: Add commandline option --patches to show the patch
@@ -14,13 +14,14 @@ Subject: [PATCH] loader: Add commandline option --patches to show the patch
6 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index bb75d9c..21e2db6 100644
index c29a1c26c..8906e1942 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -61,6 +61,14 @@ const char * CDECL NTDLL_wine_get_version(void)
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
return wine_get_version();
}
/*********************************************************************
+/*********************************************************************
+ * wine_get_patches (NTDLL.@)
+ */
+const void * CDECL NTDLL_wine_get_patches(void)
@@ -28,15 +29,14 @@ index bb75d9c..21e2db6 100644
+ return wine_get_patches();
+}
+
+/*********************************************************************
/*********************************************************************
* wine_get_build_id (NTDLL.@)
*/
const char * CDECL NTDLL_wine_get_build_id(void)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 292b0f6..fb45a94 100644
index 7aa953ca6..cf7d5b6f9 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1516,6 +1516,7 @@
@@ -1566,6 +1566,7 @@
# Version
@ cdecl wine_get_version() NTDLL_wine_get_version
@@ -45,10 +45,10 @@ index 292b0f6..fb45a94 100644
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
diff --git a/include/wine/library.h b/include/wine/library.h
index 242bb69..fae73fe 100644
index a6fe28059..511bf4722 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -43,6 +43,7 @@ extern const char *wine_get_data_dir(void);
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
extern const char *wine_get_server_dir(void);
extern const char *wine_get_user_name(void);
extern const char *wine_get_version(void);
@@ -57,10 +57,10 @@ index 242bb69..fae73fe 100644
extern void wine_init_argv0_path( const char *argv0 );
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
diff --git a/libs/wine/config.c b/libs/wine/config.c
index 3c9110b..5da6263 100644
index 2a3314cbf..5b66c063d 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -522,6 +522,12 @@ const char *wine_get_version(void)
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
return PACKAGE_VERSION;
}
@@ -74,19 +74,19 @@ index 3c9110b..5da6263 100644
const char *wine_get_build_id(void)
{
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 2159fac..7cb2918 100644
index 3f2c430fa..ca46979f5 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -90,6 +90,7 @@ WINE_1.0
@@ -28,6 +28,7 @@ WINE_1.0
wine_get_ss;
wine_get_user_name;
wine_get_version;
+ wine_get_patches;
wine_init;
wine_init_argv0_path;
wine_is_dbcs_leadbyte;
wine_ldt_alloc_entries;
diff --git a/loader/main.c b/loader/main.c
index f197cf8..f662912 100644
index f197cf802..f6629128d 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -54,7 +54,8 @@ static void check_command_line( int argc, char *argv[] )
@@ -146,5 +146,5 @@ index f197cf8..f662912 100644
--
1.9.1
2.25.0

View File

@@ -1,4 +1,4 @@
From 540ee9ebdee96f7c67224bfae699375c8cb4c90c Mon Sep 17 00:00:00 2001
From c07a490a6950f4efe563e38ca78b1aa459dfad86 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 28 May 2014 19:50:51 +0200
Subject: [PATCH] loader: Add commandline option --check-libs.
@@ -12,7 +12,7 @@ Subject: [PATCH] loader: Add commandline option --check-libs.
5 files changed, 213 insertions(+), 1 deletion(-)
diff --git a/include/wine/library.h b/include/wine/library.h
index 511bf4722a0..557cec20cf8 100644
index 511bf4722..557cec20c 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -44,6 +44,7 @@ extern "C" {
@@ -32,7 +32,7 @@ index 511bf4722a0..557cec20cf8 100644
extern void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize );
extern int wine_dlclose( void *handle, char *error, size_t errorsize );
diff --git a/libs/wine/config.c b/libs/wine/config.c
index 5b66c063db6..e0988513e14 100644
index 5b66c063d..e0988513e 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -470,6 +470,130 @@ const char *wine_get_build_dir(void)
@@ -167,7 +167,7 @@ index 5b66c063db6..e0988513e14 100644
const char *wine_get_server_dir(void)
{
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index 2a569f5b739..5f10c3f9d3e 100644
index 2a569f5b7..5f10c3f9d 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -1072,6 +1072,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
@@ -214,27 +214,27 @@ index 2a569f5b739..5f10c3f9d3e 100644
* wine_dlsym
*/
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 5edee0d9235..8e3382168d5 100644
index ca46979f5..22a4e73b0 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -16,6 +16,7 @@ WINE_1.0
wine_cp_wcstombs;
wine_cpsymbol_mbstowcs;
wine_cpsymbol_wcstombs;
@@ -9,6 +9,7 @@ WINE_1.0
wine_anon_mmap;
wine_casemap_lower;
wine_casemap_upper;
+ wine_dladdr;
wine_dlclose;
wine_dll_enum_load_path;
wine_dll_set_callback;
@@ -32,6 +33,7 @@ WINE_1.0
@@ -24,6 +25,7 @@ WINE_1.0
wine_get_es;
wine_get_fs;
wine_get_gs;
+ wine_get_libs;
wine_get_server_dir;
wine_get_sortkey;
wine_get_ss;
wine_get_user_name;
diff --git a/loader/main.c b/loader/main.c
index f6629128de1..a2dc40c51cc 100644
index f6629128d..a2dc40c51 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -36,6 +36,12 @@
@@ -309,5 +309,5 @@ index f6629128de1..a2dc40c51cc 100644
--
2.17.1
2.25.0

View File

@@ -1,83 +0,0 @@
From e5500b9a3c7d36563725dc7975c2436a02165906 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 15 Nov 2019 15:46:23 +0800
Subject: [PATCH] include: Add adserr.h.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
include/Makefile.in | 1 +
include/adserr.h | 50 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 include/adserr.h
diff --git a/include/Makefile.in b/include/Makefile.in
index cbad4d604f..2e0a10d650 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -7,6 +7,7 @@ SOURCES = \
activaut.idl \
activdbg.idl \
activscp.idl \
+ adserr.h \
adshlp.h \
advpub.h \
af_irda.h \
diff --git a/include/adserr.h b/include/adserr.h
new file mode 100644
index 0000000000..83da568763
--- /dev/null
+++ b/include/adserr.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2019 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __ADSERR_H
+#define __ADSERR_H
+
+#ifdef RC_INVOKED
+#define _HRESULT_TYPEDEF_(x) (x)
+#else
+#define _HRESULT_TYPEDEF_(x) ((HRESULT)x)
+#endif
+
+#define E_ADS_BAD_PATHNAME _HRESULT_TYPEDEF_(0x80005000)
+#define E_ADS_INVALID_DOMAIN_OBJECT _HRESULT_TYPEDEF_(0x80005001)
+#define E_ADS_INVALID_USER_OBJECT _HRESULT_TYPEDEF_(0x80005002)
+#define E_ADS_INVALID_COMPUTER_OBJECT _HRESULT_TYPEDEF_(0x80005003)
+#define E_ADS_UNKNOWN_OBJECT _HRESULT_TYPEDEF_(0x80005004)
+#define E_ADS_PROPERTY_NOT_SET _HRESULT_TYPEDEF_(0x80005005)
+#define E_ADS_PROPERTY_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x80005006)
+#define E_ADS_PROPERTY_INVALID _HRESULT_TYPEDEF_(0x80005007)
+#define E_ADS_BAD_PARAMETER _HRESULT_TYPEDEF_(0x80005008)
+#define E_ADS_OBJECT_UNBOUND _HRESULT_TYPEDEF_(0x80005009)
+#define E_ADS_PROPERTY_NOT_MODIFIED _HRESULT_TYPEDEF_(0x8000500A)
+#define E_ADS_PROPERTY_MODIFIED _HRESULT_TYPEDEF_(0x8000500B)
+#define E_ADS_CANT_CONVERT_DATATYPE _HRESULT_TYPEDEF_(0x8000500C)
+#define E_ADS_PROPERTY_NOT_FOUND _HRESULT_TYPEDEF_(0x8000500D)
+#define E_ADS_OBJECT_EXISTS _HRESULT_TYPEDEF_(0x8000500E)
+#define E_ADS_SCHEMA_VIOLATION _HRESULT_TYPEDEF_(0x8000500F)
+#define E_ADS_COLUMN_NOT_SET _HRESULT_TYPEDEF_(0x80005010)
+#define S_ADS_ERRORSOCCURRED _HRESULT_TYPEDEF_(0x00005011)
+#define S_ADS_NOMORE_ROWS _HRESULT_TYPEDEF_(0x00005012)
+#define S_ADS_NOMORE_COLUMNS _HRESULT_TYPEDEF_(0x00005013)
+#define E_ADS_INVALID_FILTER _HRESULT_TYPEDEF_(0x80005014)
+
+#endif /* __ADSERR_H */
--
2.17.1

View File

@@ -1,161 +0,0 @@
From c12e335b0df736fe2a2f2447d0d751de7cc21d37 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 15 Nov 2019 17:37:11 +0800
Subject: [PATCH 2/5] activeds: Implement ADsOpenObject.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/activeds/Makefile.in | 1 +
dlls/activeds/activeds_main.c | 80 +++++++++++++++++++++++++++++++++--
include/iads.idl | 14 ++++++
3 files changed, 91 insertions(+), 4 deletions(-)
diff --git a/dlls/activeds/Makefile.in b/dlls/activeds/Makefile.in
index 20578a93bc..54f86d661e 100644
--- a/dlls/activeds/Makefile.in
+++ b/dlls/activeds/Makefile.in
@@ -1,5 +1,6 @@
MODULE = activeds.dll
IMPORTLIB = activeds
+IMPORTS = advapi32 ole32 oleaut32
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c
index 69c5c447dc..8ff587e332 100644
--- a/dlls/activeds/activeds_main.c
+++ b/dlls/activeds/activeds_main.c
@@ -2,6 +2,7 @@
* Implementation of the Active Directory Service Interface
*
* Copyright 2005 Detlef Riekenberg
+ * Copyright 2019 Dmitry Timoshkov
*
* This file contains only stubs to get the printui.dll up and running
* activeds.dll is much much more than this
@@ -30,8 +31,10 @@
#include "winuser.h"
#include "objbase.h"
+#include "initguid.h"
#include "iads.h"
#include "adshlp.h"
+#include "adserr.h"
#include "wine/debug.h"
@@ -112,11 +115,80 @@ HRESULT WINAPI ADsBuildVarArrayInt(LPDWORD lpdwObjectTypes, DWORD dwObjectTypes,
/*****************************************************
* ADsOpenObject [ACTIVEDS.9]
*/
-HRESULT WINAPI ADsOpenObject(LPCWSTR lpszPathName, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwReserved, REFIID riid, VOID** ppObject)
+HRESULT WINAPI ADsOpenObject(LPCWSTR path, LPCWSTR user, LPCWSTR password, DWORD reserved, REFIID riid, void **obj)
{
- FIXME("(%s,%s,%u,%s,%p)!stub\n", debugstr_w(lpszPathName),
- debugstr_w(lpszUserName), dwReserved, debugstr_guid(riid), ppObject);
- return E_NOTIMPL;
+ HRESULT hr;
+ HKEY hkey, hprov;
+ WCHAR provider[MAX_PATH], progid[MAX_PATH];
+ DWORD idx = 0;
+
+ TRACE("(%s,%s,%u,%s,%p)\n", debugstr_w(path), debugstr_w(user), reserved, debugstr_guid(riid), obj);
+
+ if (!path || !riid || !obj)
+ return E_INVALIDARG;
+
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey))
+ return E_ADS_BAD_PATHNAME;
+
+ hr = E_ADS_BAD_PATHNAME;
+
+ for (;;)
+ {
+ if (RegEnumKeyW(hkey, idx++, provider, ARRAY_SIZE(provider)))
+ break;
+
+ TRACE("provider %s\n", debugstr_w(provider));
+
+ if (!wcsnicmp(path, provider, wcslen(provider)) && path[wcslen(provider)] == ':')
+ {
+ LONG size;
+
+ if (RegOpenKeyExW(hkey, provider, 0, KEY_READ, &hprov))
+ break;
+
+ size = ARRAY_SIZE(progid);
+ if (!RegQueryValueW(hprov, NULL, progid, &size))
+ {
+ CLSID clsid;
+
+ if (CLSIDFromProgID(progid, &clsid) == S_OK)
+ {
+ IADsOpenDSObject *adsopen;
+ IDispatch *disp;
+
+ TRACE("ns %s => clsid %s\n", debugstr_w(progid), wine_dbgstr_guid(&clsid));
+ if (CoCreateInstance(&clsid, 0, CLSCTX_INPROC_SERVER, &IID_IADsOpenDSObject, (void **)&adsopen) == S_OK)
+ {
+ BSTR bpath, buser, bpassword;
+
+ bpath = SysAllocString(path);
+ buser = SysAllocString(user);
+ bpassword = SysAllocString(password);
+
+ hr = IADsOpenDSObject_OpenDSObject(adsopen, bpath, buser, bpassword, reserved, &disp);
+ if (hr == S_OK)
+ {
+ hr = IDispatch_QueryInterface(disp, riid, obj);
+ IDispatch_Release(disp);
+ }
+
+ SysFreeString(bpath);
+ SysFreeString(buser);
+ SysFreeString(bpassword);
+
+ IADsOpenDSObject_Release(adsopen);
+ }
+ }
+ }
+
+ RegCloseKey(hprov);
+ break;
+ }
+ }
+
+ RegCloseKey(hkey);
+
+ return hr;
}
/*****************************************************
diff --git a/include/iads.idl b/include/iads.idl
index 6931b6f734..add52571c7 100644
--- a/include/iads.idl
+++ b/include/iads.idl
@@ -794,6 +794,20 @@ interface IDirectorySearch : IUnknown
HRESULT CloseSearchHandle([in] ADS_SEARCH_HANDLE hSearchResult);
}
+/*****************************************************************************
+ * IID_IADsOpenDSObject interface
+ */
+[
+ odl,
+ uuid(ddf2891e-0f9c-11d0-8ad4-00c04fd8d503),
+ dual,
+ oleautomation
+]
+interface IADsOpenDSObject : IDispatch
+{
+ HRESULT OpenDSObject([in] BSTR path, [in] BSTR user, [in] BSTR password, [in] long reserved, [out,retval] IDispatch **obj);
+}
+
/*****************************************************************************
* IADsADSystemInfo interface
*/
--
2.20.1

View File

@@ -1,483 +0,0 @@
From ba1eb1310db57db3820a3886e374afc507c2b507 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 19 Nov 2019 11:34:13 +0800
Subject: [PATCH 3/5] adsldp: Add LDAPNamespace stubs.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/adsldp/Makefile.in | 5 +-
dlls/adsldp/adsldp.c | 295 ++++++++++++++++++++++++++++++++++++----
dlls/adsldp/adsldp.idl | 9 ++
dlls/adsldp/adsldp.rgs | 16 +++
dlls/adsldp/rsrc.rc | 20 +++
5 files changed, 319 insertions(+), 26 deletions(-)
create mode 100644 dlls/adsldp/adsldp.rgs
create mode 100644 dlls/adsldp/rsrc.rc
diff --git a/dlls/adsldp/Makefile.in b/dlls/adsldp/Makefile.in
index 4dce14fd0d..7bf07fce2c 100644
--- a/dlls/adsldp/Makefile.in
+++ b/dlls/adsldp/Makefile.in
@@ -1,10 +1,13 @@
MODULE = adsldp.dll
-IMPORTS = oleaut32 secur32
+IMPORTS = oleaut32 secur32 rpcrt4
EXTRADLLFLAGS = -mno-cygwin
+dlldata_EXTRADEFS = -DENTRY_PREFIX=ADSLDP_
C_SRCS = \
adsldp.c
IDL_SRCS = \
adsldp.idl
+
+RC_SRCS = rsrc.rc
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
index 4fc0de41eb..ef62aad279 100644
--- a/dlls/adsldp/adsldp.c
+++ b/dlls/adsldp/adsldp.c
@@ -31,10 +31,15 @@
#define SECURITY_WIN32
#include "security.h"
+#include "wine/heap.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(adsldp);
+DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
+
+extern HRESULT WINAPI ADSLDP_DllGetClassObject(REFCLSID,REFIID,void **) DECLSPEC_HIDDEN;
+
static HMODULE adsldp_hinst;
typedef struct
@@ -235,31 +240,239 @@ static const IADsADSystemInfoVtbl IADsADSystemInfo_vtbl =
sysinfo_GetTrees
};
-static HRESULT ADSystemInfo_create(void **obj)
+static HRESULT ADSystemInfo_create(REFIID riid, void **obj)
{
AD_sysinfo *sysinfo;
+ HRESULT hr;
sysinfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*sysinfo));
if (!sysinfo) return E_OUTOFMEMORY;
sysinfo->IADsADSystemInfo_iface.lpVtbl = &IADsADSystemInfo_vtbl;
sysinfo->ref = 1;
- *obj = &sysinfo->IADsADSystemInfo_iface;
- TRACE("created %p\n", *obj);
+ hr = IADsADSystemInfo_QueryInterface(&sysinfo->IADsADSystemInfo_iface, riid, obj);
+ IADsADSystemInfo_Release(&sysinfo->IADsADSystemInfo_iface);
- return S_OK;
+ return hr;
}
+typedef struct
+{
+ IADs IADs_iface;
+ LONG ref;
+} LDAP_namespace;
+
+static inline LDAP_namespace *impl_from_IADs(IADs *iface)
+{
+ return CONTAINING_RECORD(iface, LDAP_namespace, IADs_iface);
+}
+
+static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj)
+{
+ TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
+
+ if (!riid || !obj) return E_INVALIDARG;
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IDispatch) ||
+ IsEqualGUID(riid, &IID_IADs))
+ {
+ IADs_AddRef(iface);
+ *obj = iface;
+ return S_OK;
+ }
+
+ FIXME("interface %s is not implemented\n", debugstr_guid(riid));
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ldapns_AddRef(IADs *iface)
+{
+ LDAP_namespace *ldap = impl_from_IADs(iface);
+ return InterlockedIncrement(&ldap->ref);
+}
+
+static ULONG WINAPI ldapns_Release(IADs *iface)
+{
+ LDAP_namespace *ldap = impl_from_IADs(iface);
+ LONG ref = InterlockedDecrement(&ldap->ref);
+
+ if (!ref)
+ {
+ TRACE("destroying %p\n", iface);
+ HeapFree(GetProcessHeap(), 0, ldap);
+ }
+
+ return ref;
+}
+
+static HRESULT WINAPI ldapns_GetTypeInfoCount(IADs *iface, UINT *count)
+{
+ FIXME("%p,%p: stub\n", iface, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_GetTypeInfo(IADs *iface, UINT index, LCID lcid, ITypeInfo **info)
+{
+ FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_GetIDsOfNames(IADs *iface, REFIID riid, LPOLESTR *names,
+ UINT count, LCID lcid, DISPID *dispid)
+{
+ FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_Invoke(IADs *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
+{
+ FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
+ params, result, excepinfo, argerr);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_get_Name(IADs *iface, BSTR *retval)
+{
+ FIXME("%p,%p: stub\n", iface, retval);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_get_Class(IADs *iface, BSTR *retval)
+{
+ FIXME("%p,%p: stub\n", iface, retval);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_get_GUID(IADs *iface, BSTR *retval)
+{
+ FIXME("%p,%p: stub\n", iface, retval);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_get_ADsPath(IADs *iface, BSTR *retval)
+{
+ FIXME("%p,%p: stub\n", iface, retval);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_get_Parent(IADs *iface, BSTR *retval)
+{
+ FIXME("%p,%p: stub\n", iface, retval);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_get_Schema(IADs *iface, BSTR *retval)
+{
+ FIXME("%p,%p: stub\n", iface, retval);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_GetInfo(IADs *iface)
+{
+ FIXME("%p: stub\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_SetInfo(IADs *iface)
+{
+ FIXME("%p: stub\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_Get(IADs *iface, BSTR name, VARIANT *prop)
+{
+ FIXME("%p,%s,%p: stub\n", iface, debugstr_w(name), prop);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_Put(IADs *iface, BSTR name, VARIANT prop)
+{
+ FIXME("%p,%s,%s: stub\n", iface, debugstr_w(name), wine_dbgstr_variant(&prop));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_GetEx(IADs *iface, BSTR name, VARIANT *prop)
+{
+ FIXME("%p,%s,%p: stub\n", iface, debugstr_w(name), prop);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_PutEx(IADs *iface, LONG code, BSTR name, VARIANT prop)
+{
+ FIXME("%p,%d,%s,%s: stub\n", iface, code, debugstr_w(name), wine_dbgstr_variant(&prop));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ldapns_GetInfoEx(IADs *iface, VARIANT prop, LONG reserved)
+{
+ FIXME("%p,%s,%d: stub\n", iface, wine_dbgstr_variant(&prop), reserved);
+ return E_NOTIMPL;
+}
+
+static const IADsVtbl IADs_vtbl =
+{
+ ldapns_QueryInterface,
+ ldapns_AddRef,
+ ldapns_Release,
+ ldapns_GetTypeInfoCount,
+ ldapns_GetTypeInfo,
+ ldapns_GetIDsOfNames,
+ ldapns_Invoke,
+ ldapns_get_Name,
+ ldapns_get_Class,
+ ldapns_get_GUID,
+ ldapns_get_ADsPath,
+ ldapns_get_Parent,
+ ldapns_get_Schema,
+ ldapns_GetInfo,
+ ldapns_SetInfo,
+ ldapns_Get,
+ ldapns_Put,
+ ldapns_GetEx,
+ ldapns_PutEx,
+ ldapns_GetInfoEx
+};
+
+static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
+{
+ LDAP_namespace *ldap;
+ HRESULT hr;
+
+ ldap = heap_alloc(sizeof(*ldap));
+ if (!ldap) return E_OUTOFMEMORY;
+
+ ldap->IADs_iface.lpVtbl = &IADs_vtbl;
+ ldap->ref = 1;
+
+ hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj);
+ IADs_Release(&ldap->IADs_iface);
+
+ return hr;
+}
+
+static const struct class_info
+{
+ const CLSID *clsid;
+ HRESULT (*constructor)(REFIID, void **);
+} class_info[] =
+{
+ { &CLSID_ADSystemInfo, ADSystemInfo_create },
+ { &CLSID_LDAPNamespace, LDAPNamespace_create },
+};
+
typedef struct
{
IClassFactory IClassFactory_iface;
- HRESULT (*constructor)(void **);
-} ADSystemInfo_factory;
+ LONG ref;
+ const struct class_info *info;
+} class_factory;
-static inline ADSystemInfo_factory *impl_from_IClassFactory(IClassFactory *iface)
+static inline class_factory *impl_from_IClassFactory(IClassFactory *iface)
{
- return CONTAINING_RECORD(iface, ADSystemInfo_factory, IClassFactory_iface);
+ return CONTAINING_RECORD(iface, class_factory, IClassFactory_iface);
}
static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *obj)
@@ -283,19 +496,30 @@ static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid,
static ULONG WINAPI factory_AddRef(IClassFactory *iface)
{
- return 2;
+ class_factory *factory = impl_from_IClassFactory(iface);
+ ULONG ref = InterlockedIncrement(&factory->ref);
+
+ TRACE("(%p) ref %u\n", iface, ref);
+
+ return ref;
}
static ULONG WINAPI factory_Release(IClassFactory *iface)
{
- return 1;
+ class_factory *factory = impl_from_IClassFactory(iface);
+ ULONG ref = InterlockedDecrement(&factory->ref);
+
+ TRACE("(%p) ref %u\n", iface, ref);
+
+ if (!ref)
+ heap_free(factory);
+
+ return ref;
}
static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
{
- ADSystemInfo_factory *factory = impl_from_IClassFactory(iface);
- IUnknown *unknown;
- HRESULT hr;
+ class_factory *factory = impl_from_IClassFactory(iface);
TRACE("%p,%s,%p\n", outer, debugstr_guid(riid), obj);
@@ -304,13 +528,7 @@ static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *out
*obj = NULL;
if (outer) return CLASS_E_NOAGGREGATION;
- hr = factory->constructor((void **)&unknown);
- if (hr == S_OK)
- {
- hr = IUnknown_QueryInterface(unknown, riid, obj);
- IUnknown_Release(unknown);
- }
- return hr;
+ return factory->info->constructor(riid, obj);
}
static HRESULT WINAPI factory_LockServer(IClassFactory *iface, BOOL lock)
@@ -328,21 +546,48 @@ static const struct IClassFactoryVtbl factory_vtbl =
factory_LockServer
};
-static ADSystemInfo_factory ADSystemInfo_cf = { { &factory_vtbl }, ADSystemInfo_create };
+static HRESULT factory_constructor(const struct class_info *info, REFIID riid, void **obj)
+{
+ class_factory *factory;
+ HRESULT hr;
+
+ factory = heap_alloc(sizeof(*factory));
+ if (!factory) return E_OUTOFMEMORY;
+
+ factory->IClassFactory_iface.lpVtbl = &factory_vtbl;
+ factory->ref = 1;
+ factory->info = info;
+
+ hr = IClassFactory_QueryInterface(&factory->IClassFactory_iface, riid, obj);
+ IClassFactory_Release(&factory->IClassFactory_iface);
+
+ return hr;
+}
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *obj)
{
+ const struct class_info *info = NULL;
+ int i;
+
TRACE("%s,%s,%p\n", debugstr_guid(clsid), debugstr_guid(iid), obj);
if (!clsid || !iid || !obj) return E_INVALIDARG;
*obj = NULL;
- if (IsEqualGUID(clsid, &CLSID_ADSystemInfo))
- return IClassFactory_QueryInterface(&ADSystemInfo_cf.IClassFactory_iface, iid, obj);
+ for (i = 0; i < ARRAY_SIZE(class_info); i++)
+ {
+ if (IsEqualCLSID(class_info[i].clsid, clsid))
+ {
+ info = &class_info[i];
+ break;
+ }
+ }
+
+ if (info)
+ return factory_constructor(info, iid, obj);
- FIXME("class %s/%s is not implemented\n", debugstr_guid(clsid), debugstr_guid(iid));
- return CLASS_E_CLASSNOTAVAILABLE;
+ return ADSLDP_DllGetClassObject(clsid, iid, obj);
}
HRESULT WINAPI DllCanUnloadNow(void)
diff --git a/dlls/adsldp/adsldp.idl b/dlls/adsldp/adsldp.idl
index c2f7504d0c..634aa36327 100644
--- a/dlls/adsldp/adsldp.idl
+++ b/dlls/adsldp/adsldp.idl
@@ -18,8 +18,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#pragma makedep proxy
#pragma makedep register
+[
+ helpstring("LDAP Namespace Object"),
+ progid("LDAPNamespace"),
+ uuid(228d9a82-c302-11cf-9aa4-00aa004a5691),
+ threading(both)
+]
+coclass ADs { }
+
[
helpstring("AD System Info Object"),
uuid(50b6327f-afd1-11d2-9cb9-0000f87a369e),
diff --git a/dlls/adsldp/adsldp.rgs b/dlls/adsldp/adsldp.rgs
new file mode 100644
index 0000000000..0da0946832
--- /dev/null
+++ b/dlls/adsldp/adsldp.rgs
@@ -0,0 +1,16 @@
+HKLM
+{
+ NoRemove Software
+ {
+ NoRemove Microsoft
+ {
+ NoRemove ADs
+ {
+ NoRemove Providers
+ {
+ ForceRemove 'LDAP' = s 'LDAPNamespace'
+ }
+ }
+ }
+ }
+}
diff --git a/dlls/adsldp/rsrc.rc b/dlls/adsldp/rsrc.rc
new file mode 100644
index 0000000000..914fe0b2f3
--- /dev/null
+++ b/dlls/adsldp/rsrc.rc
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/* @makedep: adsldp.rgs */
+1 WINE_REGISTRY adsldp.rgs
--
2.20.1

View File

@@ -1,156 +0,0 @@
From 73b97a7095f833e5323117c1acbb8a64c5e3afcb Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 19 Nov 2019 11:46:50 +0800
Subject: [PATCH 4/5] adsldp: Add IADsOpenDSObject stubs.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/adsldp/adsldp.c | 102 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 102 insertions(+)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
index ef62aad279..bdce30c143 100644
--- a/dlls/adsldp/adsldp.c
+++ b/dlls/adsldp/adsldp.c
@@ -260,6 +260,7 @@ static HRESULT ADSystemInfo_create(REFIID riid, void **obj)
typedef struct
{
IADs IADs_iface;
+ IADsOpenDSObject IADsOpenDSObject_iface;
LONG ref;
} LDAP_namespace;
@@ -270,6 +271,8 @@ static inline LDAP_namespace *impl_from_IADs(IADs *iface)
static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj)
{
+ LDAP_namespace *ldap = impl_from_IADs(iface);
+
TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
if (!riid || !obj) return E_INVALIDARG;
@@ -283,6 +286,13 @@ static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj
return S_OK;
}
+ if (IsEqualGUID(riid, &IID_IADsOpenDSObject))
+ {
+ IADs_AddRef(iface);
+ *obj = &ldap->IADsOpenDSObject_iface;
+ return S_OK;
+ }
+
FIXME("interface %s is not implemented\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
@@ -436,6 +446,97 @@ static const IADsVtbl IADs_vtbl =
ldapns_GetInfoEx
};
+static inline LDAP_namespace *impl_from_IADsOpenDSObject(IADsOpenDSObject *iface)
+{
+ return CONTAINING_RECORD(iface, LDAP_namespace, IADsOpenDSObject_iface);
+}
+
+static HRESULT WINAPI openobj_QueryInterface(IADsOpenDSObject *iface, REFIID riid, void **obj)
+{
+ TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
+
+ if (!riid || !obj) return E_INVALIDARG;
+
+ if (IsEqualGUID(riid, &IID_IADsOpenDSObject) ||
+ IsEqualGUID(riid, &IID_IDispatch) ||
+ IsEqualGUID(riid, &IID_IUnknown))
+ {
+ IADsOpenDSObject_AddRef(iface);
+ *obj = iface;
+ return S_OK;
+ }
+
+ FIXME("interface %s is not implemented\n", debugstr_guid(riid));
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI openobj_AddRef(IADsOpenDSObject *iface)
+{
+ LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface);
+ return InterlockedIncrement(&ldap->ref);
+}
+
+static ULONG WINAPI openobj_Release(IADsOpenDSObject *iface)
+{
+ LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface);
+ LONG ref = InterlockedDecrement(&ldap->ref);
+
+ if (!ref)
+ {
+ TRACE("destroying %p\n", iface);
+ HeapFree(GetProcessHeap(), 0, ldap);
+ }
+
+ return ref;
+}
+
+static HRESULT WINAPI openobj_GetTypeInfoCount(IADsOpenDSObject *iface, UINT *count)
+{
+ FIXME("%p,%p: stub\n", iface, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI openobj_GetTypeInfo(IADsOpenDSObject *iface, UINT index, LCID lcid, ITypeInfo **info)
+{
+ FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI openobj_GetIDsOfNames(IADsOpenDSObject *iface, REFIID riid, LPOLESTR *names,
+ UINT count, LCID lcid, DISPID *dispid)
+{
+ FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI openobj_Invoke(IADsOpenDSObject *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
+{
+ FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
+ params, result, excepinfo, argerr);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, BSTR user, BSTR password,
+ LONG reserved, IDispatch **obj)
+{
+ FIXME("%p,%s,%s,%s,%d,%p: stub\n", iface, debugstr_w(path), debugstr_w(user), debugstr_w(password),
+ reserved, obj);
+ return E_NOTIMPL;
+}
+
+static const IADsOpenDSObjectVtbl IADsOpenDSObject_vtbl =
+{
+ openobj_QueryInterface,
+ openobj_AddRef,
+ openobj_Release,
+ openobj_GetTypeInfoCount,
+ openobj_GetTypeInfo,
+ openobj_GetIDsOfNames,
+ openobj_Invoke,
+ openobj_OpenDSObject
+};
+
static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
{
LDAP_namespace *ldap;
@@ -445,6 +546,7 @@ static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
if (!ldap) return E_OUTOFMEMORY;
ldap->IADs_iface.lpVtbl = &IADs_vtbl;
+ ldap->IADsOpenDSObject_iface.lpVtbl = &IADsOpenDSObject_vtbl;
ldap->ref = 1;
hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj);
--
2.20.1

View File

@@ -1,123 +0,0 @@
From 488afac28472b0563c67cfad8c02a82f489c2c04 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 19 Nov 2019 12:12:27 +0800
Subject: [PATCH 5/5] adsldp/tests: Add some tests for LDAPNamespace.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/adsldp/tests/Makefile.in | 1 +
dlls/adsldp/tests/ldap.c | 78 +++++++++++++++++++++++++++++++++++
dlls/adsldp/tests/sysinfo.c | 2 +
3 files changed, 81 insertions(+)
create mode 100644 dlls/adsldp/tests/ldap.c
diff --git a/dlls/adsldp/tests/Makefile.in b/dlls/adsldp/tests/Makefile.in
index 777d2aa9de..52141139d5 100644
--- a/dlls/adsldp/tests/Makefile.in
+++ b/dlls/adsldp/tests/Makefile.in
@@ -2,4 +2,5 @@ TESTDLL = adsldp.dll
IMPORTS = ole32 oleaut32 secur32 advapi32 uuid
C_SRCS = \
+ ldap.c \
sysinfo.c
diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c
new file mode 100644
index 0000000000..36b128da20
--- /dev/null
+++ b/dlls/adsldp/tests/ldap.c
@@ -0,0 +1,78 @@
+/*
+ * LDAPNamespace Tests
+ *
+ * Copyright 2019 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "iads.h"
+
+#include "wine/test.h"
+
+#include "initguid.h"
+DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
+
+static void test_LDAP(void)
+{
+ HRESULT hr;
+ IUnknown *unk;
+ IADs *ads;
+ IADsOpenDSObject *ads_open;
+ IDispatch *disp;
+
+ hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IADs, (void **)&ads);
+ ok(hr == S_OK, "got %#x\n", hr);
+ IADs_Release(ads);
+
+ hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ hr = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **)&disp);
+ ok(hr == S_OK, "got %#x\n", hr);
+ IDispatch_Release(disp);
+
+ hr = IUnknown_QueryInterface(unk, &IID_IADsOpenDSObject, (void **)&ads_open);
+ ok(hr == S_OK, "got %#x\n", hr);
+ IADsOpenDSObject_Release(ads_open);
+
+ hr = IADsOpenDSObject_OpenDSObject(ads_open, (BSTR)L"LDAP:", NULL, NULL, ADS_SECURE_AUTHENTICATION, &disp);
+todo_wine
+ ok(hr == S_OK, "got %#x\n", hr);
+if (hr == S_OK)
+ IDispatch_Release(disp);
+
+ IUnknown_Release(unk);
+}
+
+START_TEST(ldap)
+{
+ HRESULT hr;
+
+ hr = CoInitialize(NULL);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ test_LDAP();
+
+ CoUninitialize();
+}
diff --git a/dlls/adsldp/tests/sysinfo.c b/dlls/adsldp/tests/sysinfo.c
index db982aa82f..cb250190f1 100644
--- a/dlls/adsldp/tests/sysinfo.c
+++ b/dlls/adsldp/tests/sysinfo.c
@@ -216,4 +216,6 @@ START_TEST(sysinfo)
test_ComputerName();
test_UserName();
test_sysinfo();
+
+ CoUninitialize();
}
--
2.20.1

View File

@@ -1,2 +0,0 @@
Fixes: [40649] activeds: Implement ADsOpenObject.
#Fixes: [42885] ADsOpenObject to bind to user's account/computer. (related)

View File

@@ -1,251 +0,0 @@
From ebbaf56bdb75f853dafdbbffba81233784ecb618 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 4 May 2019 18:21:05 +0800
Subject: [PATCH 1/2] comctl32: Switch to using a structure for extra storage.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
These patches aim to fix the bug 47018.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/comctl32/static.c | 92 ++++++++++++++++++++++++++++++++++--------
1 file changed, 76 insertions(+), 16 deletions(-)
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
index 5cc02ced97..d08710c06f 100644
--- a/dlls/comctl32/static.c
+++ b/dlls/comctl32/static.c
@@ -36,6 +36,7 @@
#include "winuser.h"
#include "commctrl.h"
+#include "wine/heap.h"
#include "wine/debug.h"
#include "comctl32.h"
@@ -50,10 +51,16 @@ static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style );
static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style );
static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style );
-/* offsets for GetWindowLong for static private information */
-#define HFONT_GWL_OFFSET 0
-#define HICON_GWL_OFFSET (sizeof(HFONT))
-#define STATIC_EXTRA_BYTES (HICON_GWL_OFFSET + sizeof(HICON))
+struct static_extra_info
+{
+ HFONT hfont;
+ union
+ {
+ HICON hicon;
+ HBITMAP hbitmap;
+ HENHMETAFILE hemf;
+ } image;
+};
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
@@ -80,6 +87,18 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] =
STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */
};
+static struct static_extra_info *get_extra_ptr( HWND hwnd, BOOL force )
+{
+ struct static_extra_info *extra = (struct static_extra_info *)GetWindowLongPtrW( hwnd, 0 );
+ if (!extra && force)
+ {
+ extra = heap_alloc_zero( sizeof(*extra) );
+ if (extra)
+ SetWindowLongPtrW( hwnd, 0, (ULONG_PTR)extra );
+ }
+ return extra;
+}
+
static BOOL get_icon_size( HICON handle, SIZE *size )
{
ICONINFO info;
@@ -111,6 +130,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
{
HICON prevIcon;
SIZE size;
+ struct static_extra_info *extra;
if ((style & SS_TYPEMASK) != SS_ICON) return 0;
if (hicon && !get_icon_size( hicon, &size ))
@@ -118,7 +138,12 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
WARN("hicon != 0, but invalid\n");
return 0;
}
- prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon );
+
+ extra = get_extra_ptr( hwnd, TRUE );
+ if (!extra) return 0;
+
+ prevIcon = extra->image.hicon;
+ extra->image.hicon = hicon;
if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
{
/* Windows currently doesn't implement SS_RIGHTJUST */
@@ -146,6 +171,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
{
HBITMAP hOldBitmap;
+ struct static_extra_info *extra;
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP)
@@ -153,7 +179,12 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
WARN("hBitmap != 0, but it's not a bitmap\n");
return 0;
}
- hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
+
+ extra = get_extra_ptr( hwnd, TRUE );
+ if (!extra) return 0;
+
+ hOldBitmap = extra->image.hbitmap;
+ extra->image.hbitmap = hBitmap;
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
{
BITMAP bm;
@@ -183,13 +214,23 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
*/
static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style )
{
+ HENHMETAFILE old_hemf;
+ struct static_extra_info *extra;
+
if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0;
if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE)
{
WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n");
return 0;
}
- return (HENHMETAFILE)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hEnhMetaFile );
+
+ extra = get_extra_ptr( hwnd, TRUE );
+ if (!extra) return 0;
+
+ old_hemf = extra->image.hemf;
+ extra->image.hemf = hEnhMetaFile;
+
+ return old_hemf;
}
/***********************************************************************
@@ -200,6 +241,8 @@ static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile,
*/
static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
{
+ struct static_extra_info *extra;
+
switch (style & SS_TYPEMASK)
{
case SS_ICON:
@@ -215,7 +258,22 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
default:
return NULL;
}
- return (HANDLE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
+
+ extra = get_extra_ptr( hwnd, FALSE );
+ return extra ? extra->image.hbitmap : 0;
+}
+
+static void STATIC_SetFont( HWND hwnd, HFONT hfont )
+{
+ struct static_extra_info *extra = get_extra_ptr( hwnd, TRUE );
+ if (extra)
+ extra->hfont = hfont;
+}
+
+static HFONT STATIC_GetFont( HWND hwnd )
+{
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
+ return extra ? extra->hfont : 0;
}
/***********************************************************************
@@ -327,6 +385,8 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
case WM_NCDESTROY:
if (style == SS_ICON)
{
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
+ heap_free( extra );
/*
* FIXME
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
@@ -423,14 +483,14 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
case WM_SETFONT:
if (hasTextStyle( full_style ))
{
- SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
+ STATIC_SetFont( hwnd, (HFONT)wParam );
if (LOWORD(lParam))
RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
}
break;
case WM_GETFONT:
- return GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
+ return (LRESULT)STATIC_GetFont( hwnd );
case WM_NCHITTEST:
if (full_style & SS_NOTIFY)
@@ -508,7 +568,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
dis.itemData = 0;
GetClientRect( hwnd, &dis.rcItem );
- font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
+ font = STATIC_GetFont( hwnd );
if (font) oldFont = SelectObject( hdc, font );
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
@@ -572,7 +632,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
format |= DT_SINGLELINE | DT_WORD_ELLIPSIS;
}
- if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET )))
+ if ((hFont = STATIC_GetFont( hwnd )))
hOldFont = SelectObject( hdc, hFont );
/* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned
@@ -668,7 +728,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
GetClientRect( hwnd, &rc );
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
- hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
+ hIcon = STATIC_GetImage( hwnd, IMAGE_ICON, style );
if (!hIcon || !get_icon_size( hIcon, &size ))
{
FillRect(hdc, &rc, hbrush);
@@ -698,7 +758,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
- if ((hBitmap = (HBITMAP)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ))
+ if ((hBitmap = STATIC_GetImage( hwnd, IMAGE_BITMAP, style ))
&& (GetObjectType(hBitmap) == OBJ_BITMAP)
&& (hMemDC = CreateCompatibleDC( hdc )))
{
@@ -742,7 +802,7 @@ static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style )
GetClientRect(hwnd, &rc);
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
FillRect(hdc, &rc, hbrush);
- if ((hEnhMetaFile = (HENHMETAFILE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )))
+ if ((hEnhMetaFile = STATIC_GetImage( hwnd, IMAGE_ENHMETAFILE, style )))
{
/* The control's current font is not selected into the
device context! */
@@ -779,7 +839,7 @@ void STATIC_Register(void)
wndClass.style = CS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS;
wndClass.lpfnWndProc = STATIC_WindowProc;
wndClass.cbClsExtra = 0;
- wndClass.cbWndExtra = STATIC_EXTRA_BYTES;
+ wndClass.cbWndExtra = sizeof(struct static_extra_info *);
wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
wndClass.hbrBackground = NULL;
wndClass.lpszClassName = WC_STATICW;
--
2.20.1

View File

@@ -1,152 +0,0 @@
From 334262255a66b05a852c90ebc722815b8a0eb7e9 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 4 May 2019 19:46:35 +0800
Subject: [PATCH 2/2] comctl32: Paint 32-bpp bitmaps with an alpha channel
using GdiAlphaBlend.
Content-Type: text/plain; charset=UTF-8
To: wine-devel@winehq.org
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/comctl32/static.c | 83 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 79 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
index d08710c06f..fe566645d3 100644
--- a/dlls/comctl32/static.c
+++ b/dlls/comctl32/static.c
@@ -60,6 +60,7 @@ struct static_extra_info
HBITMAP hbitmap;
HENHMETAFILE hemf;
} image;
+ BOOL image_has_alpha;
};
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
@@ -163,6 +164,56 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
return prevIcon;
}
+static HBITMAP create_alpha_bitmap( HBITMAP hbitmap )
+{
+ HBITMAP alpha = 0;
+ BITMAPINFO *info = NULL;
+ BITMAP bm;
+ HDC src, dst;
+ void *bits;
+ DWORD i;
+ const unsigned char *ptr;
+ BOOL has_alpha = FALSE;
+
+ if (!GetObjectW( hbitmap, sizeof(bm), &bm )) return 0;
+ if (bm.bmBitsPixel != 32) return 0;
+
+ if (!(src = CreateCompatibleDC( 0 ))) return 0;
+ if (!(dst = CreateCompatibleDC( src ))) goto done;
+ if (!(info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )))) goto done;
+ info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ info->bmiHeader.biWidth = bm.bmWidth;
+ info->bmiHeader.biHeight = -bm.bmHeight;
+ info->bmiHeader.biPlanes = 1;
+ info->bmiHeader.biBitCount = 32;
+ info->bmiHeader.biCompression = BI_RGB;
+ info->bmiHeader.biSizeImage = bm.bmWidth * bm.bmHeight * 4;
+ info->bmiHeader.biXPelsPerMeter = 0;
+ info->bmiHeader.biYPelsPerMeter = 0;
+ info->bmiHeader.biClrUsed = 0;
+ info->bmiHeader.biClrImportant = 0;
+ if (!(alpha = CreateDIBSection( dst, info, DIB_RGB_COLORS, &bits, NULL, 0 ))) goto done;
+
+ SelectObject( src, hbitmap );
+ SelectObject( dst, alpha );
+ BitBlt(dst, 0, 0, bm.bmWidth, bm.bmHeight, src, 0, 0, SRCCOPY);
+
+ for (i = 0, ptr = bits; i < bm.bmWidth * bm.bmHeight; i++, ptr += 4)
+ if ((has_alpha = (ptr[3] != 0))) break;
+
+done:
+ DeleteDC( src );
+ DeleteDC( dst );
+ HeapFree( GetProcessHeap(), 0, info );
+
+ if (!has_alpha)
+ {
+ DeleteObject( alpha );
+ alpha = 0;
+ }
+ return alpha;
+}
+
/***********************************************************************
* STATIC_SetBitmap
*
@@ -170,7 +221,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
*/
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
{
- HBITMAP hOldBitmap;
+ HBITMAP hOldBitmap, alpha;
struct static_extra_info *extra;
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
@@ -184,7 +235,18 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
if (!extra) return 0;
hOldBitmap = extra->image.hbitmap;
- extra->image.hbitmap = hBitmap;
+ alpha = create_alpha_bitmap( hBitmap );
+ if (alpha)
+ {
+ extra->image.hbitmap = alpha;
+ extra->image_has_alpha = TRUE;
+ }
+ else
+ {
+ extra->image.hbitmap = hBitmap;
+ extra->image_has_alpha = FALSE;
+ }
+
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
{
BITMAP bm;
@@ -386,7 +448,12 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
if (style == SS_ICON)
{
struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
- heap_free( extra );
+ if (extra)
+ {
+ if (extra->image_has_alpha)
+ DeleteObject( extra->image.hbitmap );
+ heap_free( extra );
+ }
/*
* FIXME
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
@@ -765,6 +832,8 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
BITMAP bm;
RECT rcClient;
LOGBRUSH brush;
+ BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
GetObjectW(hBitmap, sizeof(bm), &bm);
oldbitmap = SelectObject(hMemDC, hBitmap);
@@ -785,7 +854,13 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
rcClient.right = rcClient.left + bm.bmWidth;
rcClient.bottom = rcClient.top + bm.bmHeight;
}
- StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
+
+ if (extra->image_has_alpha)
+ GdiAlphaBlend(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
+ rcClient.bottom - rcClient.top, hMemDC,
+ 0, 0, bm.bmWidth, bm.bmHeight, blend);
+ else
+ StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
rcClient.bottom - rcClient.top, hMemDC,
0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
SelectObject(hMemDC, oldbitmap);
--
2.20.1

View File

@@ -1 +0,0 @@
Fixes: [47018] Paint 32-bpp bitmaps with an alpha channel using GdiAlphaBlend

View File

@@ -1,95 +0,0 @@
From f6f5f94053043d6d39767f0c7ac5cd0307019559 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Tue, 12 Nov 2019 21:13:22 -0600
Subject: [PATCH] d3d9: Return a stub interface from
Direct3DShaderValidatorCreate9().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46735
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/d3d9/d3d9_main.c | 61 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 57 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c
index 21df2a34c..aff43070a 100644
--- a/dlls/d3d9/d3d9_main.c
+++ b/dlls/d3d9/d3d9_main.c
@@ -75,18 +75,71 @@ HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9E
return D3D_OK;
}
+static HRESULT WINAPI shader_validator_QueryInterface(void *iface, REFIID iid, void **out)
+{
+ TRACE("iface %p, iid %p, out %p.\n", iface, iid, out);
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ *out = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI shader_validator_AddRef(void *iface)
+{
+ TRACE("iface %p.\n", iface);
+ return 2;
+}
+
+static ULONG WINAPI shader_validator_Release(void *iface)
+{
+ TRACE("iface %p.\n", iface);
+ return 1;
+}
+
+static HRESULT WINAPI shader_validator_stub1(void *arg1, void *arg2, void *arg3, void *arg4)
+{
+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, stub!\n", arg1, arg2, arg3, arg4);
+ return S_OK;
+}
+
+static HRESULT WINAPI shader_validator_stub2(void *arg1, void *arg2, void *arg3, DWORD *arg4, DWORD arg5)
+{
+ int i;
+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, arg5 %u, stub!\n", arg1, arg2, arg3, arg4, arg5);
+ for (i = 0; i < arg5; ++i)
+ FIXME(" %#x\n", arg4[i]);
+ return S_OK;
+}
+
+static HRESULT WINAPI shader_validator_stub3(void *arg1)
+{
+ FIXME("arg1 %p, stub!\n", arg1);
+ return S_OK;
+}
+
+static const void *shader_validator_vtbl[] =
+{
+ shader_validator_QueryInterface,
+ shader_validator_AddRef,
+ shader_validator_Release,
+ shader_validator_stub1,
+ shader_validator_stub2,
+ shader_validator_stub3,
+};
+
+static void *shader_validator = &shader_validator_vtbl;
+
/*******************************************************************
* Direct3DShaderValidatorCreate9 (D3D9.@)
*
* No documentation available for this function.
* SDK only says it is internal and shouldn't be used.
*/
-void* WINAPI Direct3DShaderValidatorCreate9(void)
+void * WINAPI Direct3DShaderValidatorCreate9(void)
{
- static int once;
+ TRACE("Returning validator %p.\n", &shader_validator);
- if (!once++) FIXME("stub\n");
- return NULL;
+ return &shader_validator;
}
/***********************************************************************
--
2.23.0

View File

@@ -1 +0,0 @@
Fixes: [46735] The Sims 2 demo needs Direct3DShaderValidatorCreate9() implementation

View File

@@ -1,61 +0,0 @@
From a568780e076f43ab5a7f07c4eb963e7777f84255 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 May 2016 17:05:15 +0200
Subject: d3d9/tests: Avoid test failures on specific Nvidia graphic cards.
---
dlls/d3d9/tests/visual.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index a308311..c3de15e 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -14923,6 +14923,7 @@ static void fp_special_test(void)
D3DCOLOR nv40;
D3DCOLOR nv50;
D3DCOLOR warp;
+ D3DCOLOR todo;
}
vs_body[] =
{
@@ -14939,17 +14940,17 @@ static void fp_special_test(void)
* There are considerable differences between graphics cards in how
* these are handled, but pow and nrm never generate INF or NAN on
* real hardware. */
- {"log", vs_log, sizeof(vs_log), 0x00000000, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000},
- {"pow", vs_pow, sizeof(vs_pow), 0x000000ff, 0x000000ff, 0x0000ff00, 0x000000ff, 0x00008000},
- {"nrm", vs_nrm, sizeof(vs_nrm), 0x00ff0000, 0x00ff0000, 0x0000ff00, 0x00ff0000, 0x00008000},
- {"rcp1", vs_rcp1, sizeof(vs_rcp1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000},
- {"rcp2", vs_rcp2, sizeof(vs_rcp2), 0x000000ff, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000},
- {"rsq1", vs_rsq1, sizeof(vs_rsq1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000},
- {"rsq2", vs_rsq2, sizeof(vs_rsq2), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000},
- {"lit", vs_lit, sizeof(vs_lit), 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000},
- {"def1", vs_def1, sizeof(vs_def1), 0x000000ff, 0x00007f00, 0x0000ff00, 0x00007f00, 0x00008000},
- {"def2", vs_def2, sizeof(vs_def2), 0x00ff0000, 0x00ff7f00, 0x00ff0000, 0x00ff7f00, 0x00ff8000},
- {"def3", vs_def3, sizeof(vs_def3), 0x00ff00ff, 0x00ff7f00, 0x00ff00ff, 0x00ff7f00, 0x00ff8000},
+ {"log", vs_log, sizeof(vs_log), 0x00000000, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000, ~0U},
+ {"pow", vs_pow, sizeof(vs_pow), 0x000000ff, 0x000000ff, 0x0000ff00, 0x000000ff, 0x00008000, ~0U},
+ {"nrm", vs_nrm, sizeof(vs_nrm), 0x00ff0000, 0x00ff0000, 0x0000ff00, 0x00ff0000, 0x00008000, ~0U},
+ {"rcp1", vs_rcp1, sizeof(vs_rcp1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000},
+ {"rcp2", vs_rcp2, sizeof(vs_rcp2), 0x000000ff, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000, ~0U},
+ {"rsq1", vs_rsq1, sizeof(vs_rsq1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000},
+ {"rsq2", vs_rsq2, sizeof(vs_rsq2), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000},
+ {"lit", vs_lit, sizeof(vs_lit), 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, ~0U},
+ {"def1", vs_def1, sizeof(vs_def1), 0x000000ff, 0x00007f00, 0x0000ff00, 0x00007f00, 0x00008000, 0x00000000},
+ {"def2", vs_def2, sizeof(vs_def2), 0x00ff0000, 0x00ff7f00, 0x00ff0000, 0x00ff7f00, 0x00ff8000, ~0U},
+ {"def3", vs_def3, sizeof(vs_def3), 0x00ff00ff, 0x00ff7f00, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000},
};
static const DWORD ps_code[] =
@@ -15068,6 +15069,7 @@ static void fp_special_test(void)
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
+ todo_wine_if(vs_body[i].todo != ~0U && color_match(color, vs_body[i].todo, 1))
ok(color_match(color, vs_body[i].r500, 1)
|| color_match(color, vs_body[i].r600, 1)
|| color_match(color, vs_body[i].nv40, 1)
--
2.8.0

View File

@@ -1,43 +0,0 @@
From 7d03c720e909d4b620bde26ebc78eb4d37557db5 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Fri, 13 Mar 2015 23:42:20 +0100
Subject: d3d9/tests: Avoid crash when surface and texture creation fails.
---
dlls/d3d9/tests/device.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 89ea7721bf1..8624ac3153c 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -8583,8 +8583,14 @@ static void test_surface_blocks(void)
break;
default:
+ hr = E_FAIL;
break;
}
+ if (FAILED(hr))
+ {
+ skip("Failed to create surface, skipping tests.\n");
+ continue;
+ }
if (formats[i].block_width > 1)
{
@@ -9534,6 +9540,11 @@ static void test_volume_blocks(void)
hr = IDirect3DDevice9_CreateVolumeTexture(device, 24, 8, 8, 1, 0,
formats[i].fmt, D3DPOOL_SCRATCH, &texture, NULL);
ok(SUCCEEDED(hr), "Failed to create volume texture, hr %#x.\n", hr);
+ if (FAILED(hr))
+ {
+ skip("Failed to create texture, skipping tests.\n");
+ continue;
+ }
/* Test lockrect offset */
for (j = 0; j < ARRAY_SIZE(offset_tests); j++)
--
2.12.2

View File

@@ -1 +1 @@
Fixes: Return D3DFMT_A8R8G8B8 in D3DXGetImageInfoFromFileInMemory for 32 bpp BMP with alpha
Fixes: [48563] Runaway: A Twist of Fate renders its cursor incorrectly

View File

@@ -1,51 +0,0 @@
From 5bd7e977e0145a8e222ab66676bed7c0ff4d5b44 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Mon, 16 May 2016 13:19:06 +0200
Subject: d3dx9_36: Recognize bump luminance X8L8V8U8 when loading dds file.
---
dlls/d3dx9_36/surface.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 1bfe75a..f670860 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -110,6 +110,7 @@ static const GUID *d3dformat_to_wic_guid(D3DFORMAT format)
#define DDS_PF_RGB 0x40
#define DDS_PF_YUV 0x200
#define DDS_PF_LUMINANCE 0x20000
+#define DDS_PF_BUMPLUMINANCE 0x40000
#define DDS_PF_BUMPDUDV 0x80000
struct dds_pixel_format
@@ -265,6 +266,17 @@ static D3DFORMAT dds_bump_to_d3dformat(const struct dds_pixel_format *pixel_form
return D3DFMT_UNKNOWN;
}
+static D3DFORMAT dds_bump_luminance_to_d3dformat(const struct dds_pixel_format *pixel_format)
+{
+ if (pixel_format->bpp == 32 && pixel_format->rmask == 0x000000ff && pixel_format->gmask == 0x0000ff00
+ && pixel_format->bmask == 0x00ff0000)
+ return D3DFMT_X8L8V8U8;
+
+ WARN("Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n", pixel_format->bpp,
+ pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask);
+ return D3DFMT_UNKNOWN;
+}
+
static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format)
{
TRACE("pixel_format: size %u, flags %#x, fourcc %#x, bpp %u.\n", pixel_format->size,
@@ -282,6 +294,8 @@ static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pi
return dds_alpha_to_d3dformat(pixel_format);
if (pixel_format->flags & DDS_PF_BUMPDUDV)
return dds_bump_to_d3dformat(pixel_format);
+ if (pixel_format->flags & DDS_PF_BUMPLUMINANCE)
+ return dds_bump_luminance_to_d3dformat(pixel_format);
WARN("Unknown pixel format (flags %#x, fourcc %#x, bpp %u, r %#x, g %#x, b %#x, a %#x)\n",
pixel_format->flags, pixel_format->fourcc, pixel_format->bpp,
--
2.8.0

View File

@@ -1,446 +0,0 @@
From a5e6898b23b0c163eebb4e88b48030fe19152116 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 1 Jul 2019 15:40:59 +1000
Subject: [PATCH] d3dx9_36: Implement D3DXCreateKeyframedAnimationSet
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45481
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/d3dx9_36/animation.c | 370 ++++++++++++++++++++++++++++++++++++-
dlls/d3dx9_36/tests/mesh.c | 27 +++
2 files changed, 394 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/animation.c b/dlls/d3dx9_36/animation.c
index de6d69d383..6b3a79b296 100644
--- a/dlls/d3dx9_36/animation.c
+++ b/dlls/d3dx9_36/animation.c
@@ -468,14 +468,378 @@ HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets,
return D3D_OK;
}
+struct d3dx9_animation_frame_set
+{
+ ID3DXKeyframedAnimationSet ID3DXKeyframedAnimationSet_iface;
+ LONG ref;
+
+ char *name;
+ double ticks_per_second;
+ D3DXPLAYBACK_TYPE playback_type;
+ UINT animation_count;
+ UINT callback_key_count;
+ const D3DXKEY_CALLBACK *callback_keys;
+};
+
+static inline struct d3dx9_animation_frame_set *impl_from_ID3DXKeyframedAnimationSet(ID3DXKeyframedAnimationSet *iface)
+{
+ return CONTAINING_RECORD(iface, struct d3dx9_animation_frame_set, ID3DXKeyframedAnimationSet_iface);
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_QueryInterface(ID3DXKeyframedAnimationSet *iface, REFIID riid, void **obj)
+{
+ TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), obj);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_ID3DXAnimationSet) ||
+ IsEqualGUID(riid, &IID_ID3DXKeyframedAnimationSet))
+ {
+ iface->lpVtbl->AddRef(iface);
+ *obj = iface;
+ return D3D_OK;
+ }
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
+ *obj = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI d3dx9_animation_framed_AddRef(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ ULONG refcount = InterlockedIncrement(&framed->ref);
+
+ TRACE("%p increasing refcount to %u.\n", framed, refcount);
+
+ return refcount;
+}
+
+static ULONG WINAPI d3dx9_animation_framed_Release(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ ULONG refcount = InterlockedDecrement(&framed->ref);
+
+ TRACE("%p decreasing refcount to %u.\n", framed, refcount);
+
+ if (!refcount)
+ {
+ heap_free(framed->name);
+ HeapFree(GetProcessHeap(), 0, framed);
+ }
+
+ return refcount;
+}
+
+static const char * WINAPI d3dx9_animation_framed_GetName(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ TRACE("framed %p.\n", framed);
+ return framed->name;
+}
+
+static DOUBLE WINAPI d3dx9_animation_framed_GetPeriod(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p stub.\n", framed);
+ return 0.0f;
+}
+
+static DOUBLE WINAPI d3dx9_animation_framed_GetPeriodicPosition(ID3DXKeyframedAnimationSet *iface, DOUBLE position)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p stub.\n", framed);
+ return 0.0f;
+}
+
+static UINT WINAPI d3dx9_animation_framed_GetNumAnimations(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p stub.\n", framed);
+ return 0;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetAnimationNameByIndex(ID3DXKeyframedAnimationSet *iface, UINT index, const char **name)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, name %p stub.\n", framed, name);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetAnimationIndexByName(ID3DXKeyframedAnimationSet *iface, const char *name, UINT *index)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, name %s, index %p stub.\n", framed, debugstr_a(name), index);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetSRT(ID3DXKeyframedAnimationSet *iface, DOUBLE periodic_position, UINT animation, D3DXVECTOR3 *scale,
+ D3DXQUATERNION *rotation, D3DXVECTOR3 *translation)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, periodic_position %f, animation %u, scale %p rotation %p translation %p stub.\n",
+ framed, periodic_position, animation, scale, rotation, translation);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetCallback(ID3DXKeyframedAnimationSet *iface, double position, DWORD flags, double *callback_position,
+ void **callback_data)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, position %f, flags 0x%08x, callback_position %p, callback_data %p stub.\n",
+ framed, position, flags, callback_position, callback_data);
+ return E_NOTIMPL;
+}
+
+static D3DXPLAYBACK_TYPE WINAPI d3dx9_animation_framed_GetPlaybackType(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ TRACE("framed %p.\n", framed);
+ return framed->playback_type;
+}
+
+static DOUBLE WINAPI d3dx9_animation_framed_GetSourceTicksPerSecond(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ TRACE("framed %p.\n", framed);
+ return framed->ticks_per_second;
+}
+
+static UINT WINAPI d3dx9_animation_framed_GetNumScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT keys)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, keys %u stub.\n", framed, keys);
+ return 0;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_VECTOR3 scale_keys)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, scale_keys %p stub.\n", framed, animation, scale_keys);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 scale_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u, scale_key %p stub.\n", framed, animation, key, scale_key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_SetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 scale_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u, scale_key %p stub.\n", framed, animation, key, scale_key);
+ return E_NOTIMPL;
+}
+
+static UINT WINAPI d3dx9_animation_framed_GetNumRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u stub.\n", framed, animation);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_QUATERNION rotation_keys)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, rotation_keys %p stub.\n", framed, animation, rotation_keys);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_QUATERNION rotation_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u, rotation_key %p stub.\n", framed, animation, key, rotation_key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_SetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_QUATERNION rotation_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u, rotation_key %p stub.\n", framed, animation, key, rotation_key);
+ return E_NOTIMPL;
+}
+
+static UINT WINAPI d3dx9_animation_framed_GetNumTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u stub.\n", framed, animation);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_VECTOR3 translation_keys)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, rotation_key %p stub.\n", framed, animation, translation_keys);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 translation_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u, translation_key %p stub.\n", framed, animation, key, translation_key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_SetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 translation_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u, translation_key %p stub.\n", framed, animation, key, translation_key);
+ return E_NOTIMPL;
+}
+
+static UINT WINAPI d3dx9_animation_framed_GetNumCallbackKeys(ID3DXKeyframedAnimationSet *iface)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p stub.\n", framed);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetCallbackKeys(ID3DXKeyframedAnimationSet *iface, LPD3DXKEY_CALLBACK callback_keys)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, callback_keys %p stub.\n", framed, callback_keys);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_GetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, LPD3DXKEY_CALLBACK callback_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, key %u, callback_key %p stub.\n", framed, key, callback_key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_SetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, LPD3DXKEY_CALLBACK callback_key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, key %u, callback_key %p stub.\n", framed, key, callback_key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_RegisterAnimationSRTKeys(ID3DXKeyframedAnimationSet *iface, const char *name, UINT num_scale_keys,
+ UINT num_rotation_keys, UINT num_translation_keys, const D3DXKEY_VECTOR3 *scale_keys,
+ const D3DXKEY_QUATERNION *rotation_keys, const D3DXKEY_VECTOR3 *translation_keys,
+ DWORD *animation_index)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, name %s, num_scale_keys %u, num_rotation_keys %u, rotation_keys %p, num_translation_keys %u, scale_keys %p, "
+ "rotation_keys %p, translation_keys %p, animation_index %p stub.\n",
+ framed, debugstr_a(name), num_scale_keys, num_rotation_keys, rotation_keys, num_translation_keys, scale_keys,
+ rotation_keys, translation_keys, animation_index);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_Compress(ID3DXKeyframedAnimationSet *iface, DWORD flags, float lossiness,
+ D3DXFRAME *hierarchy, ID3DXBuffer **compressed_data)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, flags 0x%08x, lossiness %f, hierarchy %p, compressed_data %p stub.\n", framed, flags, lossiness,
+ hierarchy, compressed_data);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d3dx9_animation_framed_UnregisterAnimation(ID3DXKeyframedAnimationSet *iface, UINT index)
+{
+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface);
+ FIXME("framed %p, index %u stub.\n", framed, index);
+ return E_NOTIMPL;
+}
+
+static const struct ID3DXKeyframedAnimationSetVtbl d3dx9_animation_framed_vtbl =
+{
+ d3dx9_animation_framed_QueryInterface,
+ d3dx9_animation_framed_AddRef,
+ d3dx9_animation_framed_Release,
+ d3dx9_animation_framed_GetName,
+ d3dx9_animation_framed_GetPeriod,
+ d3dx9_animation_framed_GetPeriodicPosition,
+ d3dx9_animation_framed_GetNumAnimations,
+ d3dx9_animation_framed_GetAnimationNameByIndex,
+ d3dx9_animation_framed_GetAnimationIndexByName,
+ d3dx9_animation_framed_GetSRT,
+ d3dx9_animation_framed_GetCallback,
+ d3dx9_animation_framed_GetPlaybackType,
+ d3dx9_animation_framed_GetSourceTicksPerSecond,
+ d3dx9_animation_framed_GetNumScaleKeys,
+ d3dx9_animation_framed_GetScaleKeys,
+ d3dx9_animation_framed_GetScaleKey,
+ d3dx9_animation_framed_SetScaleKey,
+ d3dx9_animation_framed_GetNumRotationKeys,
+ d3dx9_animation_framed_GetRotationKeys,
+ d3dx9_animation_framed_GetRotationKey,
+ d3dx9_animation_framed_SetRotationKey,
+ d3dx9_animation_framed_GetNumTranslationKeys,
+ d3dx9_animation_framed_GetTranslationKeys,
+ d3dx9_animation_framed_GetTranslationKey,
+ d3dx9_animation_framed_SetTranslationKey,
+ d3dx9_animation_framed_GetNumCallbackKeys,
+ d3dx9_animation_framed_GetCallbackKeys,
+ d3dx9_animation_framed_GetCallbackKey,
+ d3dx9_animation_framed_SetCallbackKey,
+ d3dx9_animation_framed_UnregisterScaleKey,
+ d3dx9_animation_framed_UnregisterRotationKey,
+ d3dx9_animation_framed_UnregisterTranslationKey,
+ d3dx9_animation_framed_RegisterAnimationSRTKeys,
+ d3dx9_animation_framed_Compress,
+ d3dx9_animation_framed_UnregisterAnimation
+};
+
HRESULT WINAPI D3DXCreateKeyframedAnimationSet(const char *name, double ticks_per_second,
D3DXPLAYBACK_TYPE playback_type, UINT animation_count, UINT callback_key_count,
const D3DXKEY_CALLBACK *callback_keys, ID3DXKeyframedAnimationSet **animation_set)
{
- FIXME("name %s, ticks_per_second %.16e, playback_type %u, animation_count %u, "
- "callback_key_count %u, callback_keys %p, animation_set %p stub.\n",
+ struct d3dx9_animation_frame_set *object;
+
+ TRACE("name %s, ticks_per_second %.16e, playback_type %u, animation_count %u, "
+ "callback_key_count %u, callback_keys %p, animation_set %p.\n",
debugstr_a(name), ticks_per_second, playback_type, animation_count,
callback_key_count, callback_keys, animation_set);
- return E_NOTIMPL;
+ if(!animation_count)
+ return D3DERR_INVALIDCALL;
+
+ object = heap_alloc(sizeof(*object));
+ if (!object)
+ return E_OUTOFMEMORY;
+
+ object->ID3DXKeyframedAnimationSet_iface.lpVtbl = &d3dx9_animation_framed_vtbl;
+ object->ref = 1;
+ object->name = heap_alloc( strlen(name)+1 );
+ if(!object->name)
+ {
+ heap_free(object);
+ return E_OUTOFMEMORY;
+ }
+ strcpy(object->name, name);
+ object->ticks_per_second = ticks_per_second;
+ object->playback_type = playback_type;
+ object->animation_count = animation_count;
+ object->callback_key_count = callback_key_count;
+ object->callback_keys = callback_keys;
+
+ *animation_set = &object->ID3DXKeyframedAnimationSet_iface;
+
+ return D3D_OK;
}
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 3882bb404a..fc07ac1228 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -11119,6 +11119,32 @@ static void D3DXCreateAnimationControllerTest(void)
animation->lpVtbl->Release(animation);
}
+static void D3DXCreateKeyframedAnimationSetTest(void)
+{
+ ID3DXKeyframedAnimationSet *framed;
+ HRESULT hr;
+ const char *name;
+ D3DXPLAYBACK_TYPE playtype;
+ UINT count;
+
+ hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 0, 0, NULL, &framed);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr returned %#x.\n", hr);
+
+ hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 10, 0, NULL, &framed);
+ ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr);
+
+ name = framed->lpVtbl->GetName(framed);
+ ok(!strcmp(name, "wine_bottle"), "unexpected name (%s)\n", name);
+
+ playtype = framed->lpVtbl->GetPlaybackType(framed);
+ ok(playtype == D3DXPLAY_LOOP, "unexpected value, got %d\n", playtype);
+
+ count = framed->lpVtbl->GetNumAnimations(framed);
+ ok(count == 0, "unexpected value, got %d\n", count);
+
+ framed->lpVtbl->Release(framed);
+}
+
static void test_D3DXFrameFind(void)
{
static char n1[] = "name1";
@@ -11387,6 +11413,7 @@ START_TEST(mesh)
D3DXCreateTextTest();
D3DXCreateTorusTest();
D3DXCreateAnimationControllerTest();
+ D3DXCreateKeyframedAnimationSetTest();
test_get_decl_length();
test_get_decl_vertex_size();
test_fvf_decl_conversion();
--
2.24.1

View File

@@ -1 +0,0 @@
Fixes: [45481] d3dx9_36: Implement D3DXCreateKeyframedAnimationSet

View File

@@ -1,174 +0,0 @@
From a649a14676b8b57019021021f9b1c3474c88f129 Mon Sep 17 00:00:00 2001
From: Michael Stefaniuc <mstefani@winehq.org>
Date: Thu, 19 Dec 2019 23:20:20 +0100
Subject: [PATCH 3/3] dmime: Implement IDirectMusicPerformance8_PChannelInfo()
NOT FOR THE FREEZE ==> DEFER
Not needed for the bugs referenced in patch 1 but to validate the tests
from patch 2.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
---
dlls/dmime/performance.c | 31 ++++++++++++++++++++++---------
dlls/dmime/tests/performance.c | 24 +++++++++++-------------
2 files changed, 33 insertions(+), 22 deletions(-)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 2124c1fe35..9f489f5e36 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -701,18 +701,29 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannel(IDirectMusicPe
}
static HRESULT WINAPI IDirectMusicPerformance8Impl_PChannelInfo(IDirectMusicPerformance8 *iface,
- DWORD PChannel, IDirectMusicPort **port, DWORD *group, DWORD *MChannel)
+ DWORD pchannel, IDirectMusicPort **port, DWORD *group, DWORD *channel)
{
IDirectMusicPerformance8Impl *This = impl_from_IDirectMusicPerformance8(iface);
- DMUS_PORTPARAMS8 port_params;
- GUID default_port;
+ struct pchannel_block *block;
+ struct wine_rb_entry *entry;
+ DWORD block_num = pchannel / 16;
+ unsigned int index = pchannel % 16;
- FIXME("(%p)->(%d, %p, %p, %p): stub\n", This, PChannel, port, group, MChannel);
+ TRACE("(%p)->(%d, %p, %p, %p)\n", This, pchannel, port, group, channel);
- port_params.dwSize = sizeof(DMUS_PORTPARAMS8);
- port_params.dwValidParams = 0;
- IDirectMusic8_GetDefaultPort(This->dmusic, &default_port);
- IDirectMusic8_CreatePort(This->dmusic, &default_port, &port_params, port, NULL);
+ entry = wine_rb_get(&This->pchannels, &block_num);
+ if (!entry)
+ return E_INVALIDARG;
+ block = WINE_RB_ENTRY_VALUE(entry, struct pchannel_block, entry);
+
+ if (port) {
+ *port = block->pchannel[index].port;
+ IDirectMusicPort_AddRef(*port);
+ }
+ if (group)
+ *group = block->pchannel[index].group;
+ if (channel)
+ *channel = block->pchannel[index].channel;
return S_OK;
}
@@ -1102,7 +1113,9 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
return E_INVALIDARG;
}
- /* FIXME: Should we create one secondary buffer for each PChannel? */
+ /* FIXME: Create a proper port with enough dwGroups for the PChannels */
+ IDirectMusicPerformance8_AddPort(iface, NULL);
+
hr = IDirectSound_CreateSoundBuffer(This->dsound, &desc, &buffer, NULL);
if (FAILED(hr))
return DSERR_BUFFERLOST;
diff --git a/dlls/dmime/tests/performance.c b/dlls/dmime/tests/performance.c
index 4c340252aa..adc20224c0 100644
--- a/dlls/dmime/tests/performance.c
+++ b/dlls/dmime/tests/performance.c
@@ -101,9 +101,9 @@ static HRESULT test_InitAudio(void)
port = NULL;
hr = IDirectMusicPerformance8_PChannelInfo(performance, 128, &port, NULL, NULL);
- todo_wine ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(performance, 127, &port, NULL, NULL);
- ok(hr == S_OK, "PChannelInfo failed, got %08x\n", hr);
+ todo_wine ok(hr == S_OK, "PChannelInfo failed, got %08x\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(performance, 0, &port, NULL, NULL);
ok(hr == S_OK, "PChannelInfo failed, got %08x\n", hr);
ok(port != NULL, "IDirectMusicPort not set\n");
@@ -129,7 +129,7 @@ static HRESULT test_InitAudio(void)
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, NULL, NULL, 0, 64, 0, NULL);
ok(hr == S_OK, "InitAudio failed: %08x\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(performance, 0, &port, NULL, NULL);
- todo_wine ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x\n", hr);
destroy_performance(performance, NULL, NULL);
/* Refcounts for auto generated dmusic and dsound */
@@ -344,7 +344,7 @@ static void test_pchannel(void)
hr = IDirectMusicPerformance8_Init(perf, NULL, NULL, NULL);
ok(hr == S_OK, "Init failed: %08x\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, 0, &port, NULL, NULL);
- todo_wine ok(hr == E_INVALIDARG && !port, "PChannelInfo failed, got %08x, %p\n", hr, port);
+ ok(hr == E_INVALIDARG && !port, "PChannelInfo failed, got %08x, %p\n", hr, port);
/* Add default port. Sets PChannels 0-15 to the corresponding channels in group 1 */
hr = IDirectMusicPerformance8_AddPort(perf, NULL);
@@ -355,18 +355,16 @@ static void test_pchannel(void)
ok(hr == S_OK && port, "PChannelInfo failed, got %08x, %p\n", hr, port);
for (i = 1; i < 16; i++) {
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
- todo_wine ok(hr == S_OK && port == port2 && group == 1 && channel == i,
+ ok(hr == S_OK && port == port2 && group == 1 && channel == i,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
/* Unset PChannels fail to retrieve */
- todo_wine {
hr = IDirectMusicPerformance8_PChannelInfo(perf, 16, &port2, NULL, NULL);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x, %p\n", hr, port);
hr = IDirectMusicPerformance8_PChannelInfo(perf, MAXDWORD - 16, &port2, NULL, NULL);
ok(hr == E_INVALIDARG, "PChannelInfo failed, got %08x, %p\n", hr, port);
- }
/* Channel group 0 can be set just fine */
hr = IDirectMusicPerformance8_AssignPChannel(perf, 0, port, 0, 0);
@@ -375,7 +373,7 @@ static void test_pchannel(void)
ok(hr == S_OK, "AssignPChannelBlock failed, got %08x\n", hr);
for (i = 1; i < 16; i++) {
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
- todo_wine ok(hr == S_OK && port == port2 && group == 0 && channel == i,
+ ok(hr == S_OK && port == port2 && group == 0 && channel == i,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
@@ -406,7 +404,7 @@ static void test_pchannel(void)
hr = IDirectMusicPerformance8_AssignPChannel(perf, i, port, 1, 7);
ok(hr == S_OK, "AssignPChannel failed, got %08x\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
- todo_wine ok(hr == S_OK && port2 == port && group == 1 && channel == 7,
+ ok(hr == S_OK && port2 == port && group == 1 && channel == 7,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
@@ -416,7 +414,7 @@ static void test_pchannel(void)
ok(hr == S_OK, "AssignPChannelBlock failed, got %08x\n", hr);
for (i = MAXDWORD - 47; i < MAXDWORD - 31; i++) {
hr = IDirectMusicPerformance8_PChannelInfo(perf, i, &port2, &group, &channel);
- todo_wine ok(hr == S_OK && port2 == port && group == 0 && channel == i % 16,
+ ok(hr == S_OK && port2 == port && group == 0 && channel == i % 16,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
}
@@ -425,17 +423,17 @@ static void test_pchannel(void)
hr = IDirectMusicPerformance8_AssignPChannel(perf, 4711, port, 1, 13);
ok(hr == S_OK, "AssignPChannel failed, got %08x\n", hr);
hr = IDirectMusicPerformance8_PChannelInfo(perf, 4711, &port2, &group, &channel);
- todo_wine ok(hr == S_OK && port2 == port && group == 1 && channel == 13,
+ ok(hr == S_OK && port2 == port && group == 1 && channel == 13,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
group = channel = 0xdeadbeef;
hr = IDirectMusicPerformance8_PChannelInfo(perf, 4712, &port2, &group, &channel);
- todo_wine ok(hr == S_OK && port2 == port && group == 0 && channel == 8,
+ ok(hr == S_OK && port2 == port && group == 0 && channel == 8,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
group = channel = 0xdeadbeef;
hr = IDirectMusicPerformance8_PChannelInfo(perf, 4719, &port2, &group, &channel);
- todo_wine ok(hr == S_OK && port2 == port && group == 0 && channel == 15,
+ ok(hr == S_OK && port2 == port && group == 0 && channel == 15,
"PChannelInfo failed, got %08x, %p, %u, %u\n", hr, port2, group, channel);
IDirectMusicPort_Release(port2);
--
2.17.1

Some files were not shown because too many files have changed in this diff Show More