Nikolay Sivov : combase: Move CoMarshalHresult().

Alexandre Julliard julliard at winehq.org
Tue Aug 11 16:26:49 CDT 2020


Module: wine
Branch: master
Commit: 654be8258f83ba06a91eef7f35f636934ec00892
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=654be8258f83ba06a91eef7f35f636934ec00892

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Aug 11 08:43:14 2020 +0300

combase: Move CoMarshalHresult().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/combase/Makefile.in  |  1 +
 dlls/combase/combase.spec |  2 +-
 dlls/combase/marshal.c    | 30 ++++++++++++++++++++++++++++++
 dlls/ole32/marshal.c      | 21 ---------------------
 dlls/ole32/ole32.spec     |  2 +-
 5 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in
index 71537f699b..09e76e48bb 100644
--- a/dlls/combase/Makefile.in
+++ b/dlls/combase/Makefile.in
@@ -9,6 +9,7 @@ C_SRCS = \
 	combase.c \
 	errorinfo.c \
 	malloc.c \
+	marshal.c \
 	roapi.c \
 	string.c \
 	usrmarshal.c
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index 735c710d7c..f67d6f25e6 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -128,7 +128,7 @@
 @ stub CoInvalidateRemoteMachineBindings
 @ stdcall CoIsHandlerConnected(ptr) ole32.CoIsHandlerConnected
 @ stdcall CoLockObjectExternal(ptr long long) ole32.CoLockObjectExternal
-@ stdcall CoMarshalHresult(ptr long) ole32.CoMarshalHresult
+@ stdcall CoMarshalHresult(ptr long)
 @ stdcall CoMarshalInterThreadInterfaceInStream(ptr ptr ptr) ole32.CoMarshalInterThreadInterfaceInStream
 @ stdcall CoMarshalInterface(ptr ptr ptr long ptr long) ole32.CoMarshalInterface
 @ stub CoPopServiceDomain
diff --git a/dlls/combase/marshal.c b/dlls/combase/marshal.c
new file mode 100644
index 0000000000..b68efe8c95
--- /dev/null
+++ b/dlls/combase/marshal.c
@@ -0,0 +1,30 @@
+/*
+ *     Copyright 2002 Marcus Meissner
+ *     Copyright 2004 Mike Hearn, for CodeWeavers
+ *     Copyright 2004 Rob Shearman, 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
+ */
+
+#define COBJMACROS
+#include "objbase.h"
+
+/***********************************************************************
+ *            CoMarshalHresult        (combase.@)
+ */
+HRESULT WINAPI CoMarshalHresult(IStream *stream, HRESULT hresult)
+{
+    return IStream_Write(stream, &hresult, sizeof(hresult), NULL);
+}
diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c
index a7401e9095..d79e86dec2 100644
--- a/dlls/ole32/marshal.c
+++ b/dlls/ole32/marshal.c
@@ -2208,27 +2208,6 @@ HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv)
     return S_OK;
 }
 
-/***********************************************************************
- *		CoMarshalHresult	[OLE32.@]
- *
- * Marshals an HRESULT value into a stream.
- *
- * PARAMS
- *  pStm    [I] Stream that hresult will be marshalled into.
- *  hresult [I] HRESULT to be marshalled.
- *
- * RETURNS
- *  Success: S_OK
- *  Failure: A COM error code
- *
- * SEE ALSO
- *  CoUnmarshalHresult().
- */
-HRESULT WINAPI CoMarshalHresult(LPSTREAM pStm, HRESULT hresult)
-{
-    return IStream_Write(pStm, &hresult, sizeof(hresult), NULL);
-}
-
 /***********************************************************************
  *		CoUnmarshalHresult	[OLE32.@]
  *
diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec
index dfab64a53b..85ea6dcc8c 100644
--- a/dlls/ole32/ole32.spec
+++ b/dlls/ole32/ole32.spec
@@ -57,7 +57,7 @@
 @ stdcall CoIsOle1Class (ptr)
 @ stdcall CoLoadLibrary(wstr long)
 @ stdcall CoLockObjectExternal(ptr long long)
-@ stdcall CoMarshalHresult(ptr long)
+@ stdcall CoMarshalHresult(ptr long) combase.CoMarshalHresult
 @ stdcall CoMarshalInterThreadInterfaceInStream(ptr ptr ptr)
 @ stdcall CoMarshalInterface(ptr ptr ptr long ptr long)
 @ stub CoQueryAuthenticationServices




More information about the wine-cvs mailing list