combase: Move CoMarshalHresult().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-08-11 08:43:14 +03:00 committed by Alexandre Julliard
parent 9d0eeff2ca
commit 654be8258f
5 changed files with 33 additions and 23 deletions

View File

@ -9,6 +9,7 @@ C_SRCS = \
combase.c \
errorinfo.c \
malloc.c \
marshal.c \
roapi.c \
string.c \
usrmarshal.c

View File

@ -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

30
dlls/combase/marshal.c Normal file
View File

@ -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);
}

View File

@ -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.@]
*

View File

@ -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