2002-02-05 19:11:17 +01:00
|
|
|
|
/*
|
|
|
|
|
* OLE32 proxy/stub handler
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2002 Marcus Meissner
|
2005-01-25 20:02:54 +01:00
|
|
|
|
* Copyright 2001 Ove K<EFBFBD>ven, TransGaming Technologies
|
2002-03-10 00:29:33 +01:00
|
|
|
|
*
|
|
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-02-05 19:11:17 +01:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
|
#include <stdarg.h>
|
2002-02-05 19:11:17 +01:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
2004-10-07 05:06:48 +02:00
|
|
|
|
#define COBJMACROS
|
2003-01-07 21:36:20 +01:00
|
|
|
|
#define NONAMELESSUNION
|
|
|
|
|
#define NONAMELESSSTRUCT
|
2004-10-07 05:06:48 +02:00
|
|
|
|
|
2002-02-05 19:11:17 +01:00
|
|
|
|
#include "windef.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
|
#include "winbase.h"
|
2003-09-09 21:39:31 +02:00
|
|
|
|
#include "winuser.h"
|
2002-02-05 19:11:17 +01:00
|
|
|
|
#include "objbase.h"
|
|
|
|
|
#include "ole2.h"
|
|
|
|
|
#include "rpc.h"
|
2008-09-02 16:00:33 +02:00
|
|
|
|
#include "rpcproxy.h"
|
2002-02-05 19:11:17 +01:00
|
|
|
|
|
|
|
|
|
#include "compobj_private.h"
|
2005-05-19 16:22:14 +02:00
|
|
|
|
#include "moniker.h"
|
2008-10-11 13:30:08 +02:00
|
|
|
|
#include "comcat.h"
|
2002-02-05 19:11:17 +01:00
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
|
#include "wine/debug.h"
|
2002-02-05 19:11:17 +01:00
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
2002-02-05 19:11:17 +01:00
|
|
|
|
|
2008-09-02 16:00:33 +02:00
|
|
|
|
static CStdPSFactoryBuffer PSFactoryBuffer;
|
2006-05-22 23:17:13 +02:00
|
|
|
|
|
2008-09-02 16:00:33 +02:00
|
|
|
|
CSTDSTUBBUFFERRELEASE(&PSFactoryBuffer)
|
2005-01-25 20:02:54 +01:00
|
|
|
|
|
2008-09-02 16:00:33 +02:00
|
|
|
|
extern const ExtendedProxyFileInfo dcom_ProxyFileInfo;
|
2008-09-02 16:02:29 +02:00
|
|
|
|
extern const ExtendedProxyFileInfo ole32_objidl_ProxyFileInfo;
|
2008-09-02 16:03:02 +02:00
|
|
|
|
extern const ExtendedProxyFileInfo ole32_oleidl_ProxyFileInfo;
|
2008-09-02 16:00:33 +02:00
|
|
|
|
extern const ExtendedProxyFileInfo ole32_unknwn_ProxyFileInfo;
|
2005-01-25 20:02:54 +01:00
|
|
|
|
|
2008-09-02 16:00:33 +02:00
|
|
|
|
static const ProxyFileInfo *OLE32_ProxyFileList[] = {
|
|
|
|
|
&dcom_ProxyFileInfo,
|
2008-09-02 16:02:29 +02:00
|
|
|
|
&ole32_objidl_ProxyFileInfo,
|
2008-09-02 16:03:02 +02:00
|
|
|
|
&ole32_oleidl_ProxyFileInfo,
|
2008-09-02 16:00:33 +02:00
|
|
|
|
&ole32_unknwn_ProxyFileInfo,
|
|
|
|
|
NULL
|
2005-01-25 20:02:54 +01:00
|
|
|
|
};
|
|
|
|
|
|
2002-02-05 19:11:17 +01:00
|
|
|
|
/***********************************************************************
|
2003-09-11 05:06:25 +02:00
|
|
|
|
* DllGetClassObject [OLE32.@]
|
2002-02-05 19:11:17 +01:00
|
|
|
|
*/
|
2005-08-08 19:35:28 +02:00
|
|
|
|
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
|
2002-02-05 19:11:17 +01:00
|
|
|
|
{
|
|
|
|
|
*ppv = NULL;
|
2002-06-05 00:14:06 +02:00
|
|
|
|
if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&(
|
|
|
|
|
IsEqualIID(iid,&IID_IClassFactory) ||
|
|
|
|
|
IsEqualIID(iid,&IID_IUnknown)
|
|
|
|
|
)
|
|
|
|
|
)
|
2002-02-05 19:11:17 +01:00
|
|
|
|
return MARSHAL_GetStandardMarshalCF(ppv);
|
2003-06-17 05:57:18 +02:00
|
|
|
|
if (IsEqualIID(rclsid,&CLSID_StdGlobalInterfaceTable) && (IsEqualIID(iid,&IID_IClassFactory) || IsEqualIID(iid,&IID_IUnknown)))
|
|
|
|
|
return StdGlobalInterfaceTable_GetFactory(ppv);
|
2005-05-19 16:22:14 +02:00
|
|
|
|
if (IsEqualCLSID(rclsid, &CLSID_FileMoniker))
|
|
|
|
|
return FileMonikerCF_Create(iid, ppv);
|
|
|
|
|
if (IsEqualCLSID(rclsid, &CLSID_ItemMoniker))
|
|
|
|
|
return ItemMonikerCF_Create(iid, ppv);
|
2006-05-08 13:36:13 +02:00
|
|
|
|
if (IsEqualCLSID(rclsid, &CLSID_AntiMoniker))
|
|
|
|
|
return AntiMonikerCF_Create(iid, ppv);
|
2006-05-08 13:41:06 +02:00
|
|
|
|
if (IsEqualCLSID(rclsid, &CLSID_CompositeMoniker))
|
|
|
|
|
return CompositeMonikerCF_Create(iid, ppv);
|
2006-05-08 16:55:14 +02:00
|
|
|
|
if (IsEqualCLSID(rclsid, &CLSID_ClassMoniker))
|
|
|
|
|
return ClassMonikerCF_Create(iid, ppv);
|
2008-01-31 15:45:10 +01:00
|
|
|
|
if (IsEqualCLSID(rclsid, &CLSID_PointerMoniker))
|
|
|
|
|
return PointerMonikerCF_Create(iid, ppv);
|
2008-10-11 13:30:08 +02:00
|
|
|
|
if (IsEqualGUID(rclsid, &CLSID_StdComponentCategoriesMgr))
|
|
|
|
|
return ComCatCF_Create(iid, ppv);
|
2003-06-17 05:57:18 +02:00
|
|
|
|
|
2008-09-02 16:00:33 +02:00
|
|
|
|
return NdrDllGetClassObject(rclsid, iid, ppv, OLE32_ProxyFileList,
|
|
|
|
|
&CLSID_PSFactoryBuffer, &PSFactoryBuffer);
|
2002-02-05 19:11:17 +01:00
|
|
|
|
}
|