You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
34302e77dd | ||
|
ae0343f628 | ||
|
5905340060 | ||
|
c8e3795e69 | ||
|
108662b1cc | ||
|
088d7f9ddf | ||
|
b788fe9549 | ||
|
b8b836e43d | ||
|
d44f4885f2 | ||
|
73caf7ace2 | ||
|
d36d63ac84 | ||
|
8e8259db69 | ||
|
e6aac5d240 | ||
|
40d020d66e | ||
|
0db8c6ad3c | ||
|
45d69ec48b | ||
|
2326756550 | ||
|
4522654f1c | ||
|
dc9fa12a14 | ||
|
b011002d55 | ||
|
3e6d6e3909 | ||
|
62c069eb9f | ||
|
cb9aa710d5 | ||
|
3a14d63abf | ||
|
af616c5fc3 | ||
|
7167c4d6ad | ||
|
d388288e2e | ||
|
7b177b15fa | ||
|
70aaee4bf8 | ||
|
f23d30bc06 | ||
|
2f95fb4782 | ||
|
9be789b289 | ||
|
0da25307db | ||
|
9f10bba729 | ||
|
14a1f8bd0c | ||
|
3ba119e67c | ||
|
f4987b47e3 | ||
|
ced0f96514 | ||
|
f62913bfc3 | ||
|
3fe9b83fa4 | ||
|
194199011a | ||
|
7e4e808869 | ||
|
38efd9d1bc | ||
|
29cc042257 | ||
|
1f5394ae51 | ||
|
a9639c412f | ||
|
d391086546 | ||
|
41ebbee85d | ||
|
69cf026375 |
@@ -1,4 +1,4 @@
|
||||
From c8f9b712a946fac79af1290d14c1d31d0a8f0c10 Mon Sep 17 00:00:00 2001
|
||||
From a0211ba2069af11a64588a49222dcdcce1d805be Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:54:26 +0100
|
||||
Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer.
|
||||
@@ -7,16 +7,16 @@ Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer.
|
||||
dlls/d2d1/bitmap.c | 2 +-
|
||||
dlls/d2d1/brush.c | 8 ++++----
|
||||
dlls/d2d1/dc_render_target.c | 2 +-
|
||||
dlls/d2d1/geometry.c | 6 +++---
|
||||
dlls/d2d1/geometry.c | 8 ++++----
|
||||
dlls/d2d1/hwnd_render_target.c | 2 +-
|
||||
dlls/d2d1/state_block.c | 2 +-
|
||||
6 files changed, 11 insertions(+), 11 deletions(-)
|
||||
6 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c
|
||||
index 39e81192f77..52810211701 100644
|
||||
index bc958e50a1..76ecc7f02a 100644
|
||||
--- a/dlls/d2d1/bitmap.c
|
||||
+++ b/dlls/d2d1/bitmap.c
|
||||
@@ -623,5 +623,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface)
|
||||
@@ -617,5 +617,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (ID2D1BitmapVtbl *)&d2d_bitmap_vtbl);
|
||||
@@ -24,7 +24,7 @@ index 39e81192f77..52810211701 100644
|
||||
+ return CONTAINING_RECORD((ID2D1Bitmap1*)iface, struct d2d_bitmap, ID2D1Bitmap1_iface);
|
||||
}
|
||||
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
|
||||
index 21abf1456ab..1030884c2b7 100644
|
||||
index 80fc0f5331..a612e683b6 100644
|
||||
--- a/dlls/d2d1/brush.c
|
||||
+++ b/dlls/d2d1/brush.c
|
||||
@@ -253,7 +253,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory,
|
||||
@@ -64,7 +64,7 @@ index 21abf1456ab..1030884c2b7 100644
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush1 *iface,
|
||||
diff --git a/dlls/d2d1/dc_render_target.c b/dlls/d2d1/dc_render_target.c
|
||||
index 310c5412967..9d9168dc8ee 100644
|
||||
index 47aa99697d..0efa3ebeaf 100644
|
||||
--- a/dlls/d2d1/dc_render_target.c
|
||||
+++ b/dlls/d2d1/dc_render_target.c
|
||||
@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
@@ -77,7 +77,7 @@ index 310c5412967..9d9168dc8ee 100644
|
||||
|
||||
static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index 91ce32c28e7..da4a1f2d3ee 100644
|
||||
index 79850f1c20..b9b6a32f76 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -2982,7 +2982,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl =
|
||||
@@ -89,7 +89,7 @@ index 91ce32c28e7..da4a1f2d3ee 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_path_geometry_QueryInterface(ID2D1PathGeometry *iface, REFIID iid, void **out)
|
||||
@@ -3498,7 +3498,7 @@ void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory
|
||||
@@ -3502,7 +3502,7 @@ void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factor
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1RectangleGeometry(ID2D1RectangleGeometry *iface)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ index 91ce32c28e7..da4a1f2d3ee 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_QueryInterface(ID2D1RectangleGeometry *iface,
|
||||
@@ -3833,7 +3833,7 @@ fail:
|
||||
@@ -3841,7 +3841,7 @@ fail:
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1TransformedGeometry(ID2D1TransformedGeometry *iface)
|
||||
{
|
||||
@@ -107,8 +107,17 @@ index 91ce32c28e7..da4a1f2d3ee 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_QueryInterface(ID2D1TransformedGeometry *iface,
|
||||
@@ -4122,7 +4122,7 @@ void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1GeometryGroup(ID2D1GeometryGroup *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, struct d2d_geometry, ID2D1Geometry_iface);
|
||||
+ return CONTAINING_RECORD( (ID2D1Geometry*)iface, struct d2d_geometry, ID2D1Geometry_iface);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_geometry_group_QueryInterface(ID2D1GeometryGroup *iface,
|
||||
diff --git a/dlls/d2d1/hwnd_render_target.c b/dlls/d2d1/hwnd_render_target.c
|
||||
index 625f101eaa7..f3626c42cee 100644
|
||||
index 625f101eaa..f3626c42ce 100644
|
||||
--- a/dlls/d2d1/hwnd_render_target.c
|
||||
+++ b/dlls/d2d1/hwnd_render_target.c
|
||||
@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
@@ -121,7 +130,7 @@ index 625f101eaa7..f3626c42cee 100644
|
||||
|
||||
static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/state_block.c b/dlls/d2d1/state_block.c
|
||||
index e3175146a64..b66752983e6 100644
|
||||
index e3175146a6..b66752983e 100644
|
||||
--- a/dlls/d2d1/state_block.c
|
||||
+++ b/dlls/d2d1/state_block.c
|
||||
@@ -187,5 +187,5 @@ struct d2d_state_block *unsafe_impl_from_ID2D1DrawingStateBlock(ID2D1DrawingStat
|
||||
@@ -132,5 +141,5 @@ index e3175146a64..b66752983e6 100644
|
||||
+ return CONTAINING_RECORD((ID2D1DrawingStateBlock1*)iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface);
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 14f3c7debf91be0e5b36299f330541f3146d00ca Mon Sep 17 00:00:00 2001
|
||||
From 7529755fcc41fda650aac6b27f34438354435d34 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:58:40 +0100
|
||||
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
|
||||
index be9ff88fe44..44c4426c9ff 100644
|
||||
index 9280b5d32..2f0974a4c 100644
|
||||
--- a/dlls/dwrite/font.c
|
||||
+++ b/dlls/dwrite/font.c
|
||||
@@ -1781,7 +1781,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
|
||||
@@ -1887,7 +1887,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
|
||||
@@ -21,20 +21,20 @@ index be9ff88fe44..44c4426c9ff 100644
|
||||
}
|
||||
|
||||
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
@@ -1789,7 +1789,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
@@ -1895,7 +1895,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
|
||||
- return CONTAINING_RECORD(iface, struct dwrite_fontface, IDWriteFontFace4_iface);
|
||||
+ return CONTAINING_RECORD((IDWriteFontFace4 *)iface, struct dwrite_fontface, IDWriteFontFace4_iface);
|
||||
- return CONTAINING_RECORD(iface, struct dwrite_fontface, IDWriteFontFace5_iface);
|
||||
+ return CONTAINING_RECORD((IDWriteFontFace5 *)iface, struct dwrite_fontface, IDWriteFontFace5_iface);
|
||||
}
|
||||
|
||||
void get_logfont_from_font(IDWriteFont *iface, LOGFONTW *lf)
|
||||
static struct dwrite_fontfacereference *unsafe_impl_from_IDWriteFontFaceReference(IDWriteFontFaceReference *iface)
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index b9c712cd7fb..358d13963a7 100644
|
||||
index b9321157a..76ea23ba6 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -5715,7 +5715,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
|
||||
@@ -5895,7 +5895,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
|
||||
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
|
||||
{
|
||||
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
|
||||
@@ -44,5 +44,5 @@ index b9c712cd7fb..358d13963a7 100644
|
||||
|
||||
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
@@ -1,2 +1 @@
|
||||
Fixes: Fixes compile warnings.
|
||||
#Depends: mailing-list-patches
|
||||
|
@@ -0,0 +1,72 @@
|
||||
From f517c6095f355529ccbd44585d22458fb52f9197 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 15 Nov 2019 15:46:23 +0800
|
||||
Subject: [PATCH 1/5] include: Add adserr.h.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
include/adserr.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 50 insertions(+)
|
||||
create mode 100644 include/adserr.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.20.1
|
||||
|
@@ -0,0 +1,161 @@
|
||||
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
|
||||
|
@@ -0,0 +1,483 @@
|
||||
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
|
||||
|
@@ -0,0 +1,156 @@
|
||||
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
|
||||
|
@@ -0,0 +1,123 @@
|
||||
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
|
||||
|
2
patches/activeds-ADsOpenObject/definition
Normal file
2
patches/activeds-ADsOpenObject/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: [40649] activeds: Implement ADsOpenObject.
|
||||
#Fixes: [42885] ADsOpenObject to bind to user's account/computer. (related)
|
@@ -1,18 +1,18 @@
|
||||
From 36762a2034391d67fc73ac037f8a7913cee911e7 Mon Sep 17 00:00:00 2001
|
||||
From 6a09d34647aa517e45bc0bb20a92d0d94a1da888 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 03:39:55 +0200
|
||||
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 39 ++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/ntdll/loader.c | 37 +++++++++++++++++++++++++++++++++++++
|
||||
server/process.c | 8 ++++++++
|
||||
server/process.h | 1 +
|
||||
server/protocol.def | 7 +++++++
|
||||
server/token.c | 14 ++++++++++++++
|
||||
5 files changed, 68 insertions(+), 1 deletion(-)
|
||||
5 files changed, 67 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 031bf83b4..c2810d50b 100644
|
||||
index 2f203447e..7c5dd308b 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3804,6 +3804,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
@@ -48,22 +48,6 @@ index 031bf83b4..c2810d50b 100644
|
||||
/***********************************************************************
|
||||
* load_global_options
|
||||
*/
|
||||
@@ -3866,6 +3892,7 @@ static void load_global_options(void)
|
||||
}
|
||||
|
||||
|
||||
+
|
||||
/***********************************************************************
|
||||
* RtlImageDirectoryEntryToData (NTDLL.@)
|
||||
*/
|
||||
@@ -3901,7 +3928,6 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
|
||||
return RtlImageRvaToVa( nt, module, addr, NULL );
|
||||
}
|
||||
|
||||
-
|
||||
/***********************************************************************
|
||||
* RtlImageRvaToSection (NTDLL.@)
|
||||
*/
|
||||
@@ -4233,6 +4259,7 @@ void __wine_process_init(void)
|
||||
's','y','s','t','e','m','3','2','\\',
|
||||
'k','e','r','n','e','l','3','2','.','d','l','l',0};
|
||||
@@ -72,7 +56,7 @@ index 031bf83b4..c2810d50b 100644
|
||||
WINE_MODREF *wm;
|
||||
NTSTATUS status;
|
||||
ANSI_STRING func_name;
|
||||
@@ -4305,6 +4332,16 @@ void __wine_process_init(void)
|
||||
@@ -4324,6 +4351,16 @@ void __wine_process_init(void)
|
||||
|
||||
virtual_set_large_address_space();
|
||||
|
||||
@@ -90,7 +74,7 @@ index 031bf83b4..c2810d50b 100644
|
||||
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
|
||||
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index b4b239d2f..3cfc6f88f 100644
|
||||
index 4c7da9223..d6f71a774 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -1107,6 +1107,14 @@ struct process_snapshot *process_snap( int *count )
|
||||
@@ -109,7 +93,7 @@ index b4b239d2f..3cfc6f88f 100644
|
||||
DECL_HANDLER(new_process)
|
||||
{
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index 20ff6beda..e072a35ba 100644
|
||||
index 5b83e111a..dfe5c4e52 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -139,6 +139,7 @@ extern void kill_debugged_processes( struct thread *debugger, int exit_code );
|
||||
@@ -119,12 +103,12 @@ index 20ff6beda..e072a35ba 100644
|
||||
+extern void replace_process_token( struct process *process, struct token *token );
|
||||
|
||||
/* console functions */
|
||||
extern void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin);
|
||||
extern void inherit_console( struct thread *parent_thread, struct process *parent,
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 72fab786a..042072f58 100644
|
||||
index 6022e1715..45ab670ea 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3743,6 +3743,13 @@ struct handle_info
|
||||
@@ -3755,6 +3755,13 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -161,5 +145,5 @@ index fcab79955..181219d21 100644
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b052f3aa98d77d3ab68cdb2622b8e77478abeb6f Mon Sep 17 00:00:00 2001
|
||||
From 51830c6683b199e79cb9e782ee51555054a4da7c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 02:08:05 +0200
|
||||
Subject: [PATCH] server: Implement support for creating processes using a
|
||||
@@ -16,28 +16,28 @@ Subject: [PATCH] server: Implement support for creating processes using a
|
||||
8 files changed, 66 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c
|
||||
index 51b75470c..16396cb73 100644
|
||||
index a07dddb1f..99985ab89 100644
|
||||
--- a/dlls/kernelbase/process.c
|
||||
+++ b/dlls/kernelbase/process.c
|
||||
@@ -235,7 +235,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
|
||||
@@ -242,7 +242,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
|
||||
/***********************************************************************
|
||||
* create_nt_process
|
||||
*/
|
||||
-static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
|
||||
+static NTSTATUS create_nt_process( HANDLE token, SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
|
||||
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
|
||||
RTL_USER_PROCESS_INFORMATION *info )
|
||||
RTL_USER_PROCESS_INFORMATION *info, HANDLE parent )
|
||||
{
|
||||
@@ -250,7 +250,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
@@ -257,7 +257,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
status = RtlCreateUserProcess( &nameW, OBJ_CASE_INSENSITIVE, params,
|
||||
psa ? psa->lpSecurityDescriptor : NULL,
|
||||
tsa ? tsa->lpSecurityDescriptor : NULL,
|
||||
- 0, inherit, 0, 0, info );
|
||||
+ 0, inherit, 0, token, info );
|
||||
- parent, inherit, 0, 0, info );
|
||||
+ parent, inherit, 0, token, info );
|
||||
RtlFreeUnicodeString( &nameW );
|
||||
}
|
||||
return status;
|
||||
@@ -260,7 +260,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
@@ -267,7 +267,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
/***********************************************************************
|
||||
* create_vdm_process
|
||||
*/
|
||||
@@ -46,16 +46,16 @@ index 51b75470c..16396cb73 100644
|
||||
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
|
||||
RTL_USER_PROCESS_INFORMATION *info )
|
||||
{
|
||||
@@ -281,7 +281,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
@@ -288,7 +288,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
winevdm, params->ImagePathName.Buffer, params->CommandLine.Buffer );
|
||||
RtlInitUnicodeString( ¶ms->ImagePathName, winevdm );
|
||||
RtlInitUnicodeString( ¶ms->CommandLine, newcmdline );
|
||||
- status = create_nt_process( psa, tsa, inherit, flags, params, info );
|
||||
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info );
|
||||
- status = create_nt_process( psa, tsa, inherit, flags, params, info, NULL );
|
||||
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info, NULL );
|
||||
HeapFree( GetProcessHeap(), 0, newcmdline );
|
||||
return status;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
@@ -297,7 +297,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
/***********************************************************************
|
||||
* create_cmd_process
|
||||
*/
|
||||
@@ -64,16 +64,16 @@ index 51b75470c..16396cb73 100644
|
||||
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
|
||||
RTL_USER_PROCESS_INFORMATION *info )
|
||||
{
|
||||
@@ -309,7 +309,7 @@ static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
@@ -316,7 +316,7 @@ static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
swprintf( newcmdline, len, L"%s /s/c \"%s\"", comspec, params->CommandLine.Buffer );
|
||||
RtlInitUnicodeString( ¶ms->ImagePathName, comspec );
|
||||
RtlInitUnicodeString( ¶ms->CommandLine, newcmdline );
|
||||
- status = create_nt_process( psa, tsa, inherit, flags, params, info );
|
||||
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info );
|
||||
- status = create_nt_process( psa, tsa, inherit, flags, params, info, NULL );
|
||||
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info, NULL );
|
||||
RtlFreeHeap( GetProcessHeap(), 0, newcmdline );
|
||||
return status;
|
||||
}
|
||||
@@ -422,7 +422,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
@@ -448,7 +448,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
|
||||
TRACE( "app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
|
||||
|
||||
@@ -84,16 +84,16 @@ index 51b75470c..16396cb73 100644
|
||||
if (new_token) FIXME( "No support for returning created process token\n" );
|
||||
|
||||
if (app_name)
|
||||
@@ -466,7 +468,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
goto done;
|
||||
@@ -521,7 +523,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
}
|
||||
}
|
||||
|
||||
- status = create_nt_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
|
||||
+ status = create_nt_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
|
||||
- status = create_nt_process( process_attr, thread_attr, inherit, flags, params, &rtl_info, parent );
|
||||
+ status = create_nt_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info, parent );
|
||||
switch (status)
|
||||
{
|
||||
case STATUS_SUCCESS:
|
||||
@@ -475,7 +477,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
@@ -530,7 +532,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
case STATUS_INVALID_IMAGE_NE_FORMAT:
|
||||
case STATUS_INVALID_IMAGE_PROTECT:
|
||||
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(app_name) );
|
||||
@@ -102,7 +102,7 @@ index 51b75470c..16396cb73 100644
|
||||
break;
|
||||
case STATUS_INVALID_IMAGE_NOT_MZ:
|
||||
/* check for .com or .bat extension */
|
||||
@@ -483,12 +485,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
@@ -538,12 +540,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
if (!wcsicmp( p, L".com" ) || !wcsicmp( p, L".pif" ))
|
||||
{
|
||||
TRACE( "starting %s as DOS binary\n", debugstr_w(app_name) );
|
||||
@@ -118,7 +118,7 @@ index 51b75470c..16396cb73 100644
|
||||
break;
|
||||
}
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index e24691b8a..89403167b 100644
|
||||
index f3d9079f8..2fa553091 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -1667,7 +1667,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
@@ -130,7 +130,7 @@ index e24691b8a..89403167b 100644
|
||||
RTL_USER_PROCESS_INFORMATION *info )
|
||||
{
|
||||
NTSTATUS status;
|
||||
@@ -1734,6 +1734,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
@@ -1735,6 +1735,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
req->access = PROCESS_ALL_ACCESS;
|
||||
req->cpu = pe_info.cpu;
|
||||
req->info_size = startup_info_size;
|
||||
@@ -139,7 +139,7 @@ index e24691b8a..89403167b 100644
|
||||
wine_server_add_data( req, startup_info, startup_info_size );
|
||||
wine_server_add_data( req, params->Environment, env_size );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 3cfc6f88f..b4466cf43 100644
|
||||
index d6f71a774..aa66814d8 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -491,7 +491,7 @@ static void start_sigkill_timer( struct process *process )
|
||||
@@ -165,10 +165,10 @@ index 3cfc6f88f..b4466cf43 100644
|
||||
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL );
|
||||
struct process *process = NULL;
|
||||
+ struct token *token = NULL;
|
||||
struct process *parent = current->process;
|
||||
struct process *parent;
|
||||
struct thread *parent_thread = current;
|
||||
int socket_fd = thread_get_inflight_fd( current, req->socket_fd );
|
||||
|
||||
@@ -1164,10 +1165,39 @@ DECL_HANDLER(new_process)
|
||||
@@ -1177,10 +1178,39 @@ DECL_HANDLER(new_process)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -205,10 +205,10 @@ index 3cfc6f88f..b4466cf43 100644
|
||||
{
|
||||
close( socket_fd );
|
||||
+ if (token) release_object( token );
|
||||
release_object( parent );
|
||||
return;
|
||||
}
|
||||
info->process = NULL;
|
||||
@@ -1214,7 +1244,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1228,7 +1258,7 @@ DECL_HANDLER(new_process)
|
||||
#undef FIXUP_LEN
|
||||
}
|
||||
|
||||
@@ -217,15 +217,15 @@ index 3cfc6f88f..b4466cf43 100644
|
||||
|
||||
process->startup_info = (struct startup_info *)grab_object( info );
|
||||
|
||||
@@ -1276,6 +1306,7 @@ DECL_HANDLER(new_process)
|
||||
reply->handle = alloc_handle_no_access_check( parent, process, req->access, objattr->attributes );
|
||||
@@ -1289,6 +1319,7 @@ DECL_HANDLER(new_process)
|
||||
reply->handle = alloc_handle_no_access_check( current->process, process, req->access, objattr->attributes );
|
||||
|
||||
done:
|
||||
+ if (token) release_object( token );
|
||||
if (process) release_object( process );
|
||||
release_object( parent );
|
||||
release_object( info );
|
||||
}
|
||||
@@ -1308,7 +1339,7 @@ DECL_HANDLER(exec_process)
|
||||
@@ -1322,7 +1353,7 @@ DECL_HANDLER(exec_process)
|
||||
close( socket_fd );
|
||||
return;
|
||||
}
|
||||
@@ -235,7 +235,7 @@ index 3cfc6f88f..b4466cf43 100644
|
||||
release_object( process );
|
||||
}
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index e072a35ba..9cf757cec 100644
|
||||
index dfe5c4e52..61b83abf6 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -118,7 +118,7 @@ extern unsigned int alloc_ptid( void *ptr );
|
||||
@@ -248,10 +248,10 @@ index e072a35ba..9cf757cec 100644
|
||||
extern struct thread *get_process_first_thread( struct process *process );
|
||||
extern struct process *get_process_from_id( process_id_t id );
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 81a90f7d4..aa68ceedb 100644
|
||||
index 45ab670ea..c763da4ca 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -790,6 +790,7 @@ struct rawinput_device
|
||||
@@ -791,6 +791,7 @@ struct rawinput_device
|
||||
unsigned int access; /* access rights for process object */
|
||||
client_cpu_t cpu; /* CPU that the new process will use */
|
||||
data_size_t info_size; /* size of startup info */
|
||||
@@ -260,10 +260,10 @@ index 81a90f7d4..aa68ceedb 100644
|
||||
VARARG(info,startup_info,info_size); /* startup information */
|
||||
VARARG(env,unicode_str); /* environment for new process */
|
||||
diff --git a/server/request.c b/server/request.c
|
||||
index d2adb08a1..139d643e8 100644
|
||||
index 200c2697d..f743b720a 100644
|
||||
--- a/server/request.c
|
||||
+++ b/server/request.c
|
||||
@@ -578,7 +578,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
|
||||
@@ -582,7 +582,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
|
||||
int client = accept( get_unix_fd( master_socket->fd ), (struct sockaddr *) &dummy, &len );
|
||||
if (client == -1) return;
|
||||
fcntl( client, F_SETFL, O_NONBLOCK );
|
||||
@@ -315,5 +315,5 @@ index 181219d21..858ec25d7 100644
|
||||
{
|
||||
GENERIC_MAPPING mapping;
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
From 37c7da9a71e327dfe86c0c550cabc50968abd04d Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Shadura <bugzilla@tut.by>
|
||||
From: Andrej Shadura <andrew@shadura.me>
|
||||
Date: Fri, 1 Feb 2019 08:38:10 +1100
|
||||
Subject: [PATCH] comctl32: Fixed rebar behaviour when there's capture and no
|
||||
drag
|
||||
|
@@ -1,49 +1,52 @@
|
||||
From 30d0aa2712dbdfe8f532118f9829c7999c0326a7 Mon Sep 17 00:00:00 2001
|
||||
From 7be7006fb497490d61c283f419d73c13ef532ccf Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucian.poston@gmail.com>
|
||||
Date: Thu, 3 May 2018 00:38:06 -0700
|
||||
Subject: [PATCH] d2d1: Use ID2D1Factory1 in d2d_geometry
|
||||
Subject: [PATCH] d2d1: Use ID2D1Factory2 in d2d_geometry
|
||||
|
||||
https://bugs.winehq.org/show_bug.cgi?id=44052
|
||||
|
||||
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
|
||||
---
|
||||
dlls/d2d1/d2d1_private.h | 8 ++++----
|
||||
dlls/d2d1/factory.c | 6 +++---
|
||||
dlls/d2d1/geometry.c | 30 +++++++++++++++++++++---------
|
||||
3 files changed, 28 insertions(+), 16 deletions(-)
|
||||
dlls/d2d1/d2d1_private.h | 10 +++++-----
|
||||
dlls/d2d1/factory.c | 8 ++++----
|
||||
dlls/d2d1/geometry.c | 38 +++++++++++++++++++++++++++-----------
|
||||
3 files changed, 36 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
|
||||
index 70b841df8cb..85c56524de4 100644
|
||||
index 2e42d6d550..1cacb6c1a9 100644
|
||||
--- a/dlls/d2d1/d2d1_private.h
|
||||
+++ b/dlls/d2d1/d2d1_private.h
|
||||
@@ -424,7 +424,7 @@ struct d2d_geometry
|
||||
@@ -426,7 +426,7 @@ struct d2d_geometry
|
||||
ID2D1Geometry ID2D1Geometry_iface;
|
||||
LONG refcount;
|
||||
|
||||
- ID2D1Factory *factory;
|
||||
+ ID2D1Factory1 *factory;
|
||||
+ ID2D1Factory2 *factory;
|
||||
|
||||
D2D_MATRIX_3X2_F transform;
|
||||
|
||||
@@ -494,10 +494,10 @@ struct d2d_geometry
|
||||
@@ -496,12 +496,12 @@ struct d2d_geometry
|
||||
} u;
|
||||
};
|
||||
|
||||
-void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory) DECLSPEC_HIDDEN;
|
||||
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory) DECLSPEC_HIDDEN;
|
||||
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory) DECLSPEC_HIDDEN;
|
||||
HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry,
|
||||
- ID2D1Factory *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
|
||||
-void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+ ID2D1Factory1 *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
|
||||
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory,
|
||||
+ ID2D1Factory2 *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
|
||||
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
ID2D1Geometry *src_geometry, const D2D_MATRIX_3X2_F *transform) DECLSPEC_HIDDEN;
|
||||
HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
-HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
D2D1_FILL_MODE fill_mode, ID2D1Geometry **src_geometries, unsigned int geometry_count) DECLSPEC_HIDDEN;
|
||||
struct d2d_geometry *unsafe_impl_from_ID2D1Geometry(ID2D1Geometry *iface) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
|
||||
index c2a0405abdd..33c2d173596 100644
|
||||
index 48a2efb96b..a1bc6dd296 100644
|
||||
--- a/dlls/d2d1/factory.c
|
||||
+++ b/dlls/d2d1/factory.c
|
||||
@@ -141,7 +141,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
|
||||
@@ -138,7 +138,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -52,7 +55,16 @@ index c2a0405abdd..33c2d173596 100644
|
||||
{
|
||||
WARN("Failed to initialize rectangle geometry, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
@@ -207,7 +207,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Fact
|
||||
@@ -179,7 +179,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory2 *
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
- if (FAILED(hr = d2d_geometry_group_init(object, (ID2D1Factory *)iface, fill_mode, geometries, geometry_count)))
|
||||
+ if (FAILED(hr = d2d_geometry_group_init(object, iface, fill_mode, geometries, geometry_count)))
|
||||
{
|
||||
WARN("Failed to initialize geometry group, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
@@ -204,7 +204,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Fact
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -61,7 +73,7 @@ index c2a0405abdd..33c2d173596 100644
|
||||
|
||||
TRACE("Created transformed geometry %p.\n", object);
|
||||
*transformed_geometry = (ID2D1TransformedGeometry *)&object->ID2D1Geometry_iface;
|
||||
@@ -224,7 +224,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory2 *i
|
||||
@@ -221,7 +221,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory2 *i
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -71,29 +83,29 @@ index c2a0405abdd..33c2d173596 100644
|
||||
TRACE("Created path geometry %p.\n", object);
|
||||
*geometry = (ID2D1PathGeometry *)&object->ID2D1Geometry_iface;
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index 250ff0c5535..7b67e247f7a 100644
|
||||
index 23049d015e..79850f1c20 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -2343,15 +2343,15 @@ static void d2d_geometry_cleanup(struct d2d_geometry *geometry)
|
||||
@@ -2338,15 +2338,15 @@ static void d2d_geometry_cleanup(struct d2d_geometry *geometry)
|
||||
heap_free(geometry->fill.bezier_vertices);
|
||||
heap_free(geometry->fill.faces);
|
||||
heap_free(geometry->fill.vertices);
|
||||
- ID2D1Factory_Release(geometry->factory);
|
||||
+ ID2D1Factory1_Release(geometry->factory);
|
||||
+ ID2D1Factory2_Release(geometry->factory);
|
||||
}
|
||||
|
||||
-static void d2d_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+static void d2d_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory,
|
||||
+static void d2d_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
const D2D1_MATRIX_3X2_F *transform, const struct ID2D1GeometryVtbl *vtbl)
|
||||
{
|
||||
geometry->ID2D1Geometry_iface.lpVtbl = vtbl;
|
||||
geometry->refcount = 1;
|
||||
- ID2D1Factory_AddRef(geometry->factory = factory);
|
||||
+ ID2D1Factory1_AddRef(geometry->factory = factory);
|
||||
+ ID2D1Factory2_AddRef(geometry->factory = factory);
|
||||
geometry->transform = *transform;
|
||||
}
|
||||
|
||||
@@ -3040,10 +3040,14 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac
|
||||
@@ -3035,10 +3035,14 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac
|
||||
static void STDMETHODCALLTYPE d2d_path_geometry_GetFactory(ID2D1PathGeometry *iface, ID2D1Factory **factory)
|
||||
{
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface);
|
||||
@@ -102,23 +114,23 @@ index 250ff0c5535..7b67e247f7a 100644
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory1_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_path_geometry_GetBounds(ID2D1PathGeometry *iface,
|
||||
@@ -3491,7 +3495,7 @@ static const struct ID2D1PathGeometryVtbl d2d_path_geometry_vtbl =
|
||||
@@ -3486,7 +3490,7 @@ static const struct ID2D1PathGeometryVtbl d2d_path_geometry_vtbl =
|
||||
d2d_path_geometry_GetFigureCount,
|
||||
};
|
||||
|
||||
-void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory)
|
||||
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory)
|
||||
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory)
|
||||
{
|
||||
d2d_geometry_init(geometry, factory, &identity, (ID2D1GeometryVtbl *)&d2d_path_geometry_vtbl);
|
||||
geometry->u.path.ID2D1GeometrySink_iface.lpVtbl = &d2d_geometry_sink_vtbl;
|
||||
@@ -3556,10 +3560,14 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_Release(ID2D1RectangleGeom
|
||||
@@ -3551,10 +3555,14 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_Release(ID2D1RectangleGeom
|
||||
static void STDMETHODCALLTYPE d2d_rectangle_geometry_GetFactory(ID2D1RectangleGeometry *iface, ID2D1Factory **factory)
|
||||
{
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface);
|
||||
@@ -127,23 +139,23 @@ index 250ff0c5535..7b67e247f7a 100644
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory1_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_GetBounds(ID2D1RectangleGeometry *iface,
|
||||
@@ -3779,7 +3787,7 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
|
||||
@@ -3774,7 +3782,7 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
|
||||
d2d_rectangle_geometry_GetRect,
|
||||
};
|
||||
|
||||
-HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory, const D2D1_RECT_F *rect)
|
||||
+HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory, const D2D1_RECT_F *rect)
|
||||
+HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory, const D2D1_RECT_F *rect)
|
||||
{
|
||||
struct d2d_face *f;
|
||||
D2D1_POINT_2F *v;
|
||||
@@ -3900,10 +3908,14 @@ static void STDMETHODCALLTYPE d2d_transformed_geometry_GetFactory(ID2D1Transform
|
||||
@@ -3895,10 +3903,14 @@ static void STDMETHODCALLTYPE d2d_transformed_geometry_GetFactory(ID2D1Transform
|
||||
ID2D1Factory **factory)
|
||||
{
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
|
||||
@@ -152,22 +164,48 @@ index 250ff0c5535..7b67e247f7a 100644
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory1_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_GetBounds(ID2D1TransformedGeometry *iface,
|
||||
@@ -4096,7 +4108,7 @@ static const struct ID2D1TransformedGeometryVtbl d2d_transformed_geometry_vtbl =
|
||||
@@ -4091,7 +4103,7 @@ static const struct ID2D1TransformedGeometryVtbl d2d_transformed_geometry_vtbl =
|
||||
d2d_transformed_geometry_GetTransform,
|
||||
};
|
||||
|
||||
-void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory,
|
||||
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
ID2D1Geometry *src_geometry, const D2D_MATRIX_3X2_F *transform)
|
||||
{
|
||||
struct d2d_geometry *src_impl;
|
||||
@@ -4167,11 +4179,15 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_Release(ID2D1GeometryGroup *if
|
||||
static void STDMETHODCALLTYPE d2d_geometry_group_GetFactory(ID2D1GeometryGroup *iface,
|
||||
ID2D1Factory **factory)
|
||||
{
|
||||
+ HRESULT hr;
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1GeometryGroup(iface);
|
||||
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_geometry_group_GetBounds(ID2D1GeometryGroup *iface,
|
||||
@@ -4347,7 +4363,7 @@ static const struct ID2D1GeometryGroupVtbl d2d_geometry_group_vtbl =
|
||||
d2d_geometry_group_GetSourceGeometries,
|
||||
};
|
||||
|
||||
-HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
D2D1_FILL_MODE fill_mode, ID2D1Geometry **geometries, unsigned int geometry_count)
|
||||
{
|
||||
unsigned int i;
|
||||
--
|
||||
2.20.1
|
||||
2.17.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 701a77256d55032b60e454279013984844dffd78 Mon Sep 17 00:00:00 2001
|
||||
From 881e39d338d1b8faed36440376460d498262c532 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Jan 2017 16:54:42 +0100
|
||||
Subject: [PATCH] wined3d: Add wined3d_resource_map_info function.
|
||||
@@ -13,10 +13,10 @@ Subject: [PATCH] wined3d: Add wined3d_resource_map_info function.
|
||||
6 files changed, 70 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 18a0d72117..a6117942ef 100644
|
||||
index 89dab8ebfdd..5ef9a48eeb7 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1104,6 +1104,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
|
||||
@@ -1121,6 +1121,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -41,16 +41,16 @@ index 18a0d72117..a6117942ef 100644
|
||||
static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
@@ -1262,6 +1280,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
@@ -1279,6 +1297,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
buffer_resource_preload,
|
||||
buffer_unload,
|
||||
buffer_resource_unload,
|
||||
buffer_resource_sub_resource_map,
|
||||
+ buffer_resource_sub_resource_map_info,
|
||||
buffer_resource_sub_resource_unmap,
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index bba940f42c..ff31c004b0 100644
|
||||
index bba940f42cb..ff31c004b06 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -383,6 +383,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
|
||||
@@ -69,10 +69,10 @@ index bba940f42c..ff31c004b0 100644
|
||||
{
|
||||
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index ff25f64043..37054833c5 100644
|
||||
index 7c9c8298519..73e79ff25b5 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3024,6 +3024,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -3155,6 +3155,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -109,19 +109,19 @@ index ff25f64043..37054833c5 100644
|
||||
static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
@@ -3076,6 +3106,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
|
||||
@@ -3207,6 +3237,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
|
||||
texture_resource_preload,
|
||||
wined3d_texture_gl_unload,
|
||||
texture_resource_unload,
|
||||
texture_resource_sub_resource_map,
|
||||
+ texture_resource_sub_resource_map_info,
|
||||
texture_resource_sub_resource_unmap,
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index edd4a70d97..742126c4d2 100644
|
||||
index e03c57055b7..f68f8199f7e 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -216,6 +216,7 @@
|
||||
@@ -218,6 +218,7 @@
|
||||
@ cdecl wined3d_resource_get_parent(ptr)
|
||||
@ cdecl wined3d_resource_get_priority(ptr)
|
||||
@ cdecl wined3d_resource_map(ptr long ptr ptr long)
|
||||
@@ -130,10 +130,10 @@ index edd4a70d97..742126c4d2 100644
|
||||
@ cdecl wined3d_resource_set_parent(ptr ptr)
|
||||
@ cdecl wined3d_resource_set_priority(ptr long)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 5ce23f85f6..740e535217 100644
|
||||
index 8f9ad1ce856..c7f75d1983c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3414,6 +3414,8 @@ struct wined3d_resource_ops
|
||||
@@ -3368,6 +3368,8 @@ struct wined3d_resource_ops
|
||||
void (*resource_unload)(struct wined3d_resource *resource);
|
||||
HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
@@ -143,10 +143,10 @@ index 5ce23f85f6..740e535217 100644
|
||||
};
|
||||
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 3e46c23c14..c60597bb4c 100644
|
||||
index bafab04d3d3..ea50fb7c8d4 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1833,6 +1833,13 @@ struct wined3d_map_desc
|
||||
@@ -1851,6 +1851,13 @@ struct wined3d_map_desc
|
||||
void *data;
|
||||
};
|
||||
|
||||
@@ -160,7 +160,7 @@ index 3e46c23c14..c60597bb4c 100644
|
||||
struct wined3d_sub_resource_data
|
||||
{
|
||||
const void *data;
|
||||
@@ -2600,6 +2607,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour
|
||||
@@ -2663,6 +2670,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour
|
||||
DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);
|
||||
HRESULT __cdecl wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
@@ -170,5 +170,5 @@ index 3e46c23c14..c60597bb4c 100644
|
||||
void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
|
||||
DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9838666108baca0c57a9dc5538d0d9af98eae18e Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
1 file changed, 57 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c
|
||||
index 21df2a34cd2..3bec0eaa169 100644
|
||||
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
|
||||
@@ -45,10 +45,10 @@ index 21df2a34cd2..3bec0eaa169 100644
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI shader_validator_stub2(void *arg1, void *arg2, void *arg3, DWORD *arg4, DWORD_PTR arg5)
|
||||
+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 %#lx, stub!\n", arg1, arg2, arg3, arg4, arg5);
|
||||
+ 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;
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 44260ce08c1291f1c2e6806ae2cccb8df50890df Mon Sep 17 00:00:00 2001
|
||||
From 63a4b93d73acaa55a2246a1b0d825e7950af042b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 15 Feb 2016 08:25:58 +0100
|
||||
Subject: [PATCH] d3dx9_36/tests: Add initial tests for D3DXDisassembleShader.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/shader.c | 46 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/tests/shader.c | 46 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 46 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
|
||||
index 2f01a46..dd26f58 100644
|
||||
index e2925faad6..5edac61ae8 100644
|
||||
--- a/dlls/d3dx9_36/tests/shader.c
|
||||
+++ b/dlls/d3dx9_36/tests/shader.c
|
||||
@@ -6651,6 +6651,51 @@ static void test_shader_semantics(void)
|
||||
}
|
||||
@@ -6623,6 +6623,51 @@ static void test_fragment_linker(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_disassemble_shader(void)
|
||||
@@ -63,12 +63,12 @@ index 2f01a46..dd26f58 100644
|
||||
START_TEST(shader)
|
||||
{
|
||||
test_get_shader_size();
|
||||
@@ -6665,4 +6710,5 @@ START_TEST(shader)
|
||||
test_registerset();
|
||||
@@ -6638,4 +6683,5 @@ START_TEST(shader)
|
||||
test_registerset_defaults();
|
||||
test_shader_semantics();
|
||||
test_fragment_linker();
|
||||
+ test_disassemble_shader();
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
2.23.0
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 6f28c9154b40e00b0e582a54910f3f88fd05a510 Mon Sep 17 00:00:00 2001
|
||||
From ce7f2989a9fc4d4d6a307131f08f6ed5570de680 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Tue, 16 Feb 2016 12:11:45 +0100
|
||||
Subject: [PATCH] d3dx9_36/tests: Add additional tests for special cases.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/shader.c | 163 +++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/tests/shader.c | 163 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 163 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
|
||||
index dd26f58..44cc441 100644
|
||||
index 5edac61ae8..0ae8f27b03 100644
|
||||
--- a/dlls/d3dx9_36/tests/shader.c
|
||||
+++ b/dlls/d3dx9_36/tests/shader.c
|
||||
@@ -6651,6 +6651,60 @@ static void test_shader_semantics(void)
|
||||
}
|
||||
@@ -6623,6 +6623,60 @@ static void test_fragment_linker(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static const DWORD ps_tex[] = {
|
||||
@@ -72,7 +72,7 @@ index dd26f58..44cc441 100644
|
||||
static void test_disassemble_shader(void)
|
||||
{
|
||||
static const char disasm_vs[] = " vs_1_1\n"
|
||||
@@ -6665,6 +6719,33 @@ static void test_disassemble_shader(void)
|
||||
@@ -6637,6 +6691,33 @@ static void test_disassemble_shader(void)
|
||||
" dp3 r0, c1, c0\n"
|
||||
" mul r0, v0, r0\n"
|
||||
" mul r0, t0, r0\n";
|
||||
@@ -106,7 +106,7 @@ index dd26f58..44cc441 100644
|
||||
ID3DXBuffer *disassembly;
|
||||
HRESULT ret;
|
||||
char *ptr;
|
||||
@@ -6694,6 +6775,88 @@ static void test_disassemble_shader(void)
|
||||
@@ -6666,6 +6747,88 @@ static void test_disassemble_shader(void)
|
||||
ok(!memcmp(ptr, disasm_ps, sizeof(disasm_ps) - 1), /* compare beginning */
|
||||
"Returned '%s', expected '%s'\n", ptr, disasm_ps);
|
||||
ID3DXBuffer_Release(disassembly);
|
||||
@@ -196,5 +196,5 @@ index dd26f58..44cc441 100644
|
||||
|
||||
START_TEST(shader)
|
||||
--
|
||||
1.9.1
|
||||
2.23.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2dbc476ab7a1edb75f07108a6a44ea2700513797 Mon Sep 17 00:00:00 2001
|
||||
From cdf51c18aa92ddfc4df67216ebeaea0c393d8cbd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 29 Jul 2015 17:09:50 +0200
|
||||
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
|
||||
@@ -64,7 +64,7 @@ index 4ecd83d006b..c11f4f0aa80 100644
|
||||
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index 3702454bde0..cc43cdc8840 100644
|
||||
index ffa029321c1..31f76bdcbd3 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -1854,7 +1854,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||
@@ -94,8 +94,8 @@ index 3702454bde0..cc43cdc8840 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
IDirectDrawSurface_AddRef(target);
|
||||
@@ -6947,7 +6947,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
|
||||
return WINED3D_ZB_TRUE;
|
||||
@@ -6972,7 +6972,7 @@ static void ddraw_reset_viewport_state(struct ddraw *ddraw)
|
||||
wined3d_stateblock_set_scissor_rect(ddraw->state, &rect);
|
||||
}
|
||||
|
||||
-static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -103,7 +103,7 @@ index 3702454bde0..cc43cdc8840 100644
|
||||
struct ddraw_surface *target, IUnknown *rt_iface, UINT version, IUnknown *outer_unknown)
|
||||
{
|
||||
static const D3DMATRIX ident =
|
||||
@@ -6970,6 +6970,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -6995,6 +6995,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
device->IUnknown_inner.lpVtbl = &d3d_device_inner_vtbl;
|
||||
device->ref = 1;
|
||||
device->version = version;
|
||||
@@ -111,7 +111,7 @@ index 3702454bde0..cc43cdc8840 100644
|
||||
|
||||
if (outer_unknown)
|
||||
device->outer_unknown = outer_unknown;
|
||||
@@ -7026,14 +7027,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -7054,14 +7055,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ index 3702454bde0..cc43cdc8840 100644
|
||||
|
||||
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
|
||||
|| (target->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
|
||||
@@ -7056,7 +7061,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7084,7 +7089,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ index 3702454bde0..cc43cdc8840 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target);
|
||||
return D3DERR_SURFACENOTINVIDMEM;
|
||||
@@ -7074,7 +7079,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7102,7 +7107,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ index 3702454bde0..cc43cdc8840 100644
|
||||
WARN("Failed to initialize device, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index 0c03120662b..3e0d6d66573 100644
|
||||
index 1f24c49634b..dc017d87467 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -223,7 +223,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
|
||||
@@ -164,7 +164,7 @@ index 0c03120662b..3e0d6d66573 100644
|
||||
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
|
||||
{
|
||||
This->device1 = NULL;
|
||||
@@ -6198,7 +6198,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
@@ -6201,7 +6201,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
|
||||
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
|
||||
{
|
||||
|
@@ -1,45 +0,0 @@
|
||||
From 6a4d40b86f94703f8c37264739fffc4885507ebf Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 17 Sep 2019 16:21:22 +1000
|
||||
Subject: [PATCH] dmime: Ensure Channels are in range before assignment.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=17766
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24740
|
||||
---
|
||||
dlls/dmime/performance.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
|
||||
index 6e4dae6be7..3bbbb3b853 100644
|
||||
--- a/dlls/dmime/performance.c
|
||||
+++ b/dlls/dmime/performance.c
|
||||
@@ -34,7 +34,7 @@ typedef struct IDirectMusicPerformance8Impl {
|
||||
float fMasterTempo;
|
||||
long lMasterVolume;
|
||||
/* performance channels */
|
||||
- DMUSIC_PRIVATE_PCHANNEL PChannel[32];
|
||||
+ DMUSIC_PRIVATE_PCHANNEL PChannel[256];
|
||||
/* IDirectMusicPerformance8Impl fields */
|
||||
IDirectMusicAudioPath *pDefaultPath;
|
||||
HANDLE hNotification;
|
||||
@@ -624,6 +624,9 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannelBlock(IDirectMu
|
||||
FIXME("(%p, %d, %p, %d): semi-stub\n", This, dwBlockNum, pPort, dwGroup-1);
|
||||
if (NULL == pPort) return E_POINTER;
|
||||
|
||||
+ if (dwBlockNum > ARRAY_SIZE(This->PChannel))
|
||||
+ return S_FALSE;
|
||||
+
|
||||
range = 16 * dwBlockNum;
|
||||
j = 0;
|
||||
for (i = range; i < range+16; i++) {
|
||||
@@ -633,7 +636,6 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannelBlock(IDirectMu
|
||||
This->PChannel[i].channel = j; /* FIXME: should this be assigned? */
|
||||
j++;
|
||||
}
|
||||
- /*if (dwGroup > 2) return S_FALSE;*/
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,174 @@
|
||||
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
Reference in New Issue
Block a user