Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- 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(-) create mode 100644 dlls/combase/marshal.c
diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in index 71537f699b1..09e76e48bbb 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 735c710d7c2..f67d6f25e63 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 00000000000..b68efe8c951 --- /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 a7401e9095a..d79e86dec28 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 dfab64a53b8..85ea6dcc8c9 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