[PATCH 5/5] ieproxy: Add proxy/stub for IInternetExplorerManager.
Zebediah Figura
zfigura at codeweavers.com
Tue Aug 8 12:56:42 CDT 2017
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/ieframe/ieframe.rgs | 7 +++++
dlls/ieframe/tests/ie.c | 21 ++++++++++++++
dlls/ieproxy/Makefile.in | 8 ++++++
dlls/ieproxy/ieproxy.spec | 10 +++----
dlls/ieproxy/ieproxy_ieautomation.idl | 31 ++++++++++++++++++++
dlls/ieproxy/usrmarshal.c | 54 +++++++++++++++++++++++++++++++++++
include/ieautomation.idl | 3 +-
7 files changed, 128 insertions(+), 6 deletions(-)
create mode 100644 dlls/ieproxy/ieproxy_ieautomation.idl
create mode 100644 dlls/ieproxy/usrmarshal.c
diff --git a/dlls/ieframe/ieframe.rgs b/dlls/ieframe/ieframe.rgs
index f99e6b63523..0b48600321e 100644
--- a/dlls/ieframe/ieframe.rgs
+++ b/dlls/ieframe/ieframe.rgs
@@ -42,6 +42,13 @@ HKCR
Control
}
}
+ NoRemove Interface
+ {
+ '{acc84351-04ff-44f9-b23f-655ed168c6d5}'
+ {
+ ProxyStubClsid32 = s '{a4a1a128-768f-41e0-bf75-e4fddd701cba}'
+ }
+ }
'InternetShortcut'
{
val 'EditFlags' = s '2'
diff --git a/dlls/ieframe/tests/ie.c b/dlls/ieframe/tests/ie.c
index 9ddd25c35a1..5e19f787748 100644
--- a/dlls/ieframe/tests/ie.c
+++ b/dlls/ieframe/tests/ie.c
@@ -28,6 +28,8 @@
#include "exdisp.h"
#include "exdispid.h"
#include "mshtml.h"
+#include "initguid.h"
+#include "ieautomation.h"
#define DEFINE_EXPECT(func) \
static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
@@ -275,10 +277,29 @@ static void test_InternetExplorer(void)
ok(!ref, "object not destroyed, ref=%u\n", ref);
}
+static void test_InternetExplorerManager(void)
+{
+ IUnknown *unk;
+ ULONG ref;
+ HRESULT hres;
+
+ hres = CoCreateInstance(&CLSID_InternetExplorerManager, NULL, CLSCTX_LOCAL_SERVER,
+ &IID_IInternetExplorerManager, (void**)&unk);
+ ok(hres == S_OK, "Could not create InternetExplorerManager instance: %08x\n", hres);
+
+ if(hres != S_OK)
+ return;
+
+ ref = IUnknown_Release(unk);
+ ok(!ref, "object not destroyed, ref=%u\n", ref);
+}
+
START_TEST(ie)
{
CoInitialize(NULL);
+ test_InternetExplorerManager();
+
test_InternetExplorer();
CoUninitialize();
diff --git a/dlls/ieproxy/Makefile.in b/dlls/ieproxy/Makefile.in
index ec5f8f7070e..129eb59171b 100644
--- a/dlls/ieproxy/Makefile.in
+++ b/dlls/ieproxy/Makefile.in
@@ -1,2 +1,10 @@
MODULE = ieproxy.dll
+IMPORTS = uuid rpcrt4
+C_SRCS = \
+ usrmarshal.c
+
+IDL_SRCS = \
+ ieproxy_ieautomation.idl
+
+dlldata_EXTRADEFS = -DWINE_REGISTER_DLL -DPROXY_CLSID=CLSID_PSFactoryBuffer
diff --git a/dlls/ieproxy/ieproxy.spec b/dlls/ieproxy/ieproxy.spec
index 98b01323734..a1096f14f2b 100644
--- a/dlls/ieproxy/ieproxy.spec
+++ b/dlls/ieproxy/ieproxy.spec
@@ -1,5 +1,5 @@
-3 stub GetProxyDllInfo
-@ stub DllCanUnloadNow
-@ stub DllGetClassObject
-@ stub DllRegisterServer
-@ stub DllUnregisterServer
+3 stdcall -private GetProxyDllInfo(ptr ptr)
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
diff --git a/dlls/ieproxy/ieproxy_ieautomation.idl b/dlls/ieproxy/ieproxy_ieautomation.idl
new file mode 100644
index 00000000000..b53bcd78a54
--- /dev/null
+++ b/dlls/ieproxy/ieproxy_ieautomation.idl
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2017 Zebediah Figura for Codeweavers
+ *
+ * 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
+ */
+
+/* just a wrapper for ieautomation.idl */
+
+#pragma makedep ident
+#pragma makedep proxy
+#pragma makedep register
+
+#include "ieautomation.idl"
+
+[
+ threading(both),
+ uuid(a4a1a128-768f-41e0-bf75-e4fddd701cba) /* IInternetExplorerManager */
+]
+coclass PSFactoryBuffer { interface IFactoryBuffer; }
diff --git a/dlls/ieproxy/usrmarshal.c b/dlls/ieproxy/usrmarshal.c
new file mode 100644
index 00000000000..939e80aa2b1
--- /dev/null
+++ b/dlls/ieproxy/usrmarshal.c
@@ -0,0 +1,54 @@
+/*
+ * Miscellaneous Marshaling Routines
+ *
+ * Copyright 2017 Zebediah Figura for Codeweavers
+ *
+ * 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 <string.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "ieautomation.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
+
+HRESULT CALLBACK IInternetExplorerManager_CreateObject_Proxy(
+ IInternetExplorerManager *This,
+ DWORD config,
+ LPCWSTR url,
+ REFIID riid,
+ void **ppv)
+{
+ TRACE("(%p)->(0x%x, %s, %s, %p)\n", This, config, debugstr_w(url), debugstr_guid(riid), ppv);
+ return IInternetExplorerManager_RemoteCreateObject_Proxy(This, config, url, riid, ppv);
+}
+
+HRESULT __RPC_STUB IInternetExplorerManager_CreateObject_Stub(
+ IInternetExplorerManager *This,
+ DWORD config,
+ LPCWSTR url,
+ REFIID riid,
+ void **ppv)
+{
+ TRACE("(%p)->(0x%x, %s, %s, %p)\n", This, config, debugstr_w(url), debugstr_guid(riid), ppv);
+ return IInternetExplorerManager_CreateObject(This, config, url, riid, ppv);
+}
diff --git a/include/ieautomation.idl b/include/ieautomation.idl
index 491b9058003..6eacf87bfa3 100644
--- a/include/ieautomation.idl
+++ b/include/ieautomation.idl
@@ -27,7 +27,8 @@ cpp_quote("#define INTERNETEXPLORERCONFIGURATION_HOST 0x00000001");
]
interface IInternetExplorerManager : IUnknown
{
- HRESULT CreateObject([in] DWORD config, [in, unique] LPCWSTR url, [in] REFIID riid, [out, iid_is(riid)] void **ppv);
+ [local] HRESULT CreateObject([in] DWORD config, [in, unique] LPCWSTR url, [in] REFIID riid, [out, iid_is(riid)] void **ppv);
+ [call_as(CreateObject)] HRESULT RemoteCreateObject([in] DWORD config, [in, unique] LPCWSTR url, [in] REFIID riid, [out, iid_is(riid)] void **ppv);
}
cpp_quote("DEFINE_GUID(CLSID_InternetExplorerManager, 0xdf4fcc34, 0x067a, 0x4e0a, 0x83,0x52, 0x4a,0x1a,0x50,0x95,0x34,0x6e);")
--
2.13.3
More information about the wine-patches
mailing list