ReactOS 0.4.16-dev-2332-g4cba65d
marshal.c
Go to the documentation of this file.
1/*
2 * Marshalling library
3 *
4 * Copyright 2002 Marcus Meissner
5 * Copyright 2004 Mike Hearn, for CodeWeavers
6 * Copyright 2004 Rob Shearman, for CodeWeavers
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23#include <stdarg.h>
24#include <string.h>
25#include <assert.h>
26
27#define COBJMACROS
28
29#include "windef.h"
30#include "winbase.h"
31#include "winuser.h"
32#include "objbase.h"
33#include "ole2.h"
34#include "winerror.h"
35
36#include "compobj_private.h"
37
38#include "wine/debug.h"
39
41
42HRESULT WINAPI InternalCoStdMarshalObject(REFIID riid, DWORD dest_context, void *dest_context_data, void **ppvObject);
43
44static HRESULT WINAPI StdMarshalCF_QueryInterface(LPCLASSFACTORY iface,
46{
47 *ppv = NULL;
49 {
50 *ppv = iface;
51 return S_OK;
52 }
53 return E_NOINTERFACE;
54}
55
56static ULONG WINAPI StdMarshalCF_AddRef(LPCLASSFACTORY iface)
57{
58 return 2; /* non-heap based object */
59}
60
61static ULONG WINAPI StdMarshalCF_Release(LPCLASSFACTORY iface)
62{
63 return 1; /* non-heap based object */
64}
65
66static HRESULT WINAPI StdMarshalCF_CreateInstance(LPCLASSFACTORY iface,
68{
69 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IMarshal))
71
72 FIXME("(%s), not supported.\n",debugstr_guid(riid));
73 return E_NOINTERFACE;
74}
75
76static HRESULT WINAPI StdMarshalCF_LockServer(LPCLASSFACTORY iface, BOOL fLock)
77{
78 FIXME("(%d), stub!\n",fLock);
79 return S_OK;
80}
81
82static const IClassFactoryVtbl StdMarshalCFVtbl =
83{
89};
90static const IClassFactoryVtbl *StdMarshalCF = &StdMarshalCFVtbl;
91
93{
94 *ppv = &StdMarshalCF;
95 return S_OK;
96}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
const GUID IID_IClassFactory
static LPVOID LPUNKNOWN
Definition: dinput.c:53
#define NULL
Definition: types.h:112
HRESULT WINAPI InternalCoStdMarshalObject(REFIID riid, DWORD dest_context, void *dest_context_data, void **ppvObject)
Definition: marshal.c:2260
static ULONG WINAPI StdMarshalCF_AddRef(LPCLASSFACTORY iface)
Definition: marshal.c:56
static ULONG WINAPI StdMarshalCF_Release(LPCLASSFACTORY iface)
Definition: marshal.c:61
HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv)
Definition: marshal.c:92
static const IClassFactoryVtbl StdMarshalCFVtbl
Definition: marshal.c:82
static const IClassFactoryVtbl * StdMarshalCF
Definition: marshal.c:90
static HRESULT WINAPI StdMarshalCF_LockServer(LPCLASSFACTORY iface, BOOL fLock)
Definition: marshal.c:76
static HRESULT WINAPI StdMarshalCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv)
Definition: marshal.c:66
static HRESULT WINAPI StdMarshalCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppv)
Definition: marshal.c:44
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479