4 * Copyright 2002 Marcus Meissner
5 * Copyright 2004 Mike Hearn, for CodeWeavers
6 * Copyright 2004 Rob Shearman, for CodeWeavers
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.
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.
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
36 #include "compobj_private.h"
38 #include "wine/debug.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(ole
);
42 HRESULT WINAPI
InternalCoStdMarshalObject(REFIID riid
, DWORD dest_context
, void *dest_context_data
, void **ppvObject
);
44 static HRESULT WINAPI
StdMarshalCF_QueryInterface(LPCLASSFACTORY iface
,
45 REFIID riid
, LPVOID
*ppv
)
48 if (IsEqualIID(riid
, &IID_IUnknown
) || IsEqualIID(riid
, &IID_IClassFactory
))
56 static ULONG WINAPI
StdMarshalCF_AddRef(LPCLASSFACTORY iface
)
58 return 2; /* non-heap based object */
61 static ULONG WINAPI
StdMarshalCF_Release(LPCLASSFACTORY iface
)
63 return 1; /* non-heap based object */
66 static HRESULT WINAPI
StdMarshalCF_CreateInstance(LPCLASSFACTORY iface
,
67 LPUNKNOWN pUnk
, REFIID riid
, LPVOID
*ppv
)
69 if (IsEqualIID(riid
, &IID_IUnknown
) || IsEqualIID(riid
, &IID_IMarshal
))
70 return InternalCoStdMarshalObject(riid
, 0, NULL
, ppv
);
72 FIXME("(%s), not supported.\n",debugstr_guid(riid
));
76 static HRESULT WINAPI
StdMarshalCF_LockServer(LPCLASSFACTORY iface
, BOOL fLock
)
78 FIXME("(%d), stub!\n",fLock
);
82 static const IClassFactoryVtbl StdMarshalCFVtbl
=
84 StdMarshalCF_QueryInterface
,
87 StdMarshalCF_CreateInstance
,
88 StdMarshalCF_LockServer
90 static const IClassFactoryVtbl
*StdMarshalCF
= &StdMarshalCFVtbl
;
92 HRESULT
MARSHAL_GetStandardMarshalCF(LPVOID
*ppv
)