2002-03-10 00:29:33 +01:00
|
|
|
/*
|
|
|
|
* Copyright 1995 Martin von Loewis
|
|
|
|
* Copyright 1998 Justin Bradford
|
|
|
|
* Copyright 1999 Francis Beaudet
|
|
|
|
* Copyright 1999 Sylvain St-Germain
|
|
|
|
* Copyright 2002 Marcus Meissner
|
2008-10-18 19:20:29 +02:00
|
|
|
* Copyright 2003 Ove Kåven, TransGaming Technologies
|
2005-02-08 13:55:26 +01:00
|
|
|
* Copyright 2004 Mike Hearn, Rob Shearman, CodeWeavers Inc
|
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-03-10 00:29:33 +01:00
|
|
|
*/
|
|
|
|
|
2000-11-25 04:08:23 +01:00
|
|
|
#ifndef __WINE_OLE_COMPOBJ_H
|
|
|
|
#define __WINE_OLE_COMPOBJ_H
|
|
|
|
|
|
|
|
/* All private prototype functions used by OLE will be added to this header file */
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2004-12-27 20:21:47 +01:00
|
|
|
#include "wine/list.h"
|
2018-02-02 01:03:56 +01:00
|
|
|
#include "wine/heap.h"
|
2004-12-27 20:21:47 +01:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2000-11-25 04:08:23 +01:00
|
|
|
#include "wtypes.h"
|
2003-06-04 22:11:34 +02:00
|
|
|
#include "dcom.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winreg.h"
|
2003-08-28 21:57:35 +02:00
|
|
|
#include "winternl.h"
|
2003-06-04 22:11:34 +02:00
|
|
|
|
2006-06-09 21:09:49 +02:00
|
|
|
DEFINE_OLEGUID( CLSID_DfMarshal, 0x0000030b, 0, 0 );
|
2006-05-08 16:55:25 +02:00
|
|
|
|
2005-01-14 18:20:27 +01:00
|
|
|
/* this is what is stored in TEB->ReservedForOle */
|
|
|
|
struct oletls
|
|
|
|
{
|
|
|
|
struct apartment *apt;
|
2020-11-19 14:40:31 +01:00
|
|
|
IErrorInfo *errorinfo; /* see errorinfo.c */
|
|
|
|
DWORD thread_seqid; /* returned with CoGetCurrentProcess */
|
|
|
|
DWORD flags; /* tlsdata_flags (+0Ch on x86) */
|
|
|
|
void *unknown0;
|
|
|
|
DWORD inits; /* number of times CoInitializeEx called */
|
|
|
|
DWORD ole_inits; /* number of times OleInitialize called */
|
|
|
|
GUID causality_id; /* unique identifier for each COM call */
|
|
|
|
LONG pending_call_count_client; /* number of client calls pending */
|
|
|
|
LONG pending_call_count_server; /* number of server calls pending */
|
|
|
|
DWORD unknown;
|
|
|
|
IObjContext *context_token; /* (+38h on x86) */
|
|
|
|
IUnknown *call_state; /* current call context (+3Ch on x86) */
|
|
|
|
DWORD unknown2[46];
|
|
|
|
IUnknown *cancel_object; /* cancel object set by CoSetCancelObject (+F8h on x86) */
|
|
|
|
IUnknown *state; /* see CoSetState */
|
|
|
|
struct list spies; /* Spies installed with CoRegisterInitializeSpy */
|
|
|
|
DWORD spies_lock;
|
|
|
|
DWORD cancelcount;
|
2005-01-14 18:20:27 +01:00
|
|
|
};
|
2000-11-25 04:08:23 +01:00
|
|
|
|
2005-02-15 16:44:25 +01:00
|
|
|
/* Global Interface Table Functions */
|
2013-08-23 08:34:48 +02:00
|
|
|
extern void release_std_git(void) DECLSPEC_HIDDEN;
|
2011-04-21 10:45:36 +02:00
|
|
|
extern HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv) DECLSPEC_HIDDEN;
|
2003-03-11 02:45:38 +01:00
|
|
|
|
2011-04-21 10:45:36 +02:00
|
|
|
HRESULT COM_OpenKeyForCLSID(REFCLSID clsid, LPCWSTR keyname, REGSAM access, HKEY *key) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT FTMarshalCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
|
2002-02-05 19:11:17 +01:00
|
|
|
|
2007-04-05 12:33:52 +02:00
|
|
|
/* Drag and drop */
|
2011-04-21 10:45:36 +02:00
|
|
|
void OLEDD_UnInitialize(void) DECLSPEC_HIDDEN;
|
2005-02-15 16:44:25 +01:00
|
|
|
|
2020-08-17 09:20:49 +02:00
|
|
|
extern HRESULT WINAPI InternalTlsAllocData(struct oletls **tlsdata);
|
|
|
|
|
2005-01-05 18:14:33 +01:00
|
|
|
/* will create if necessary */
|
|
|
|
static inline struct oletls *COM_CurrentInfo(void)
|
2003-06-04 22:11:34 +02:00
|
|
|
{
|
2020-08-17 09:20:49 +02:00
|
|
|
struct oletls *oletls;
|
|
|
|
|
2005-01-12 20:48:39 +01:00
|
|
|
if (!NtCurrentTeb()->ReservedForOle)
|
2020-08-17 09:20:49 +02:00
|
|
|
InternalTlsAllocData(&oletls);
|
2005-01-12 20:48:39 +01:00
|
|
|
|
2005-01-05 18:14:33 +01:00
|
|
|
return NtCurrentTeb()->ReservedForOle;
|
2003-06-04 22:11:34 +02:00
|
|
|
}
|
2005-01-05 18:14:33 +01:00
|
|
|
|
2020-08-25 17:18:13 +02:00
|
|
|
static inline struct apartment * COM_CurrentApt(void)
|
2005-01-05 18:14:33 +01:00
|
|
|
{
|
|
|
|
return COM_CurrentInfo()->apt;
|
2003-06-04 22:11:34 +02:00
|
|
|
}
|
|
|
|
|
2005-06-20 12:33:17 +02:00
|
|
|
#define CHARS_IN_GUID 39 /* including NULL */
|
|
|
|
|
2008-12-01 18:56:15 +01:00
|
|
|
/* from dlldata.c */
|
2008-12-02 20:52:09 +01:00
|
|
|
extern HINSTANCE hProxyDll DECLSPEC_HIDDEN;
|
2008-12-01 18:56:15 +01:00
|
|
|
extern HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) DECLSPEC_HIDDEN;
|
2008-12-02 20:52:09 +01:00
|
|
|
extern HRESULT WINAPI OLE32_DllRegisterServer(void) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT WINAPI OLE32_DllUnregisterServer(void) DECLSPEC_HIDDEN;
|
2008-12-01 18:56:15 +01:00
|
|
|
|
2011-10-03 13:28:32 +02:00
|
|
|
extern HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT HandlerCF_Create(REFCLSID rclsid, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
|
2009-11-23 16:07:49 +01:00
|
|
|
|
2017-02-22 12:28:57 +01:00
|
|
|
extern HRESULT WINAPI GlobalOptions_CreateInstance(IClassFactory *iface, IUnknown *pUnk,
|
|
|
|
REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern IClassFactory GlobalOptionsCF DECLSPEC_HIDDEN;
|
2020-08-12 10:12:31 +02:00
|
|
|
extern HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid,
|
|
|
|
void **obj) DECLSPEC_HIDDEN;
|
|
|
|
extern IClassFactory GlobalInterfaceTableCF DECLSPEC_HIDDEN;
|
2020-08-12 10:12:32 +02:00
|
|
|
extern HRESULT WINAPI ManualResetEvent_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid,
|
|
|
|
void **obj) DECLSPEC_HIDDEN;
|
|
|
|
extern IClassFactory ManualResetEventCF DECLSPEC_HIDDEN;
|
2020-08-13 09:29:30 +02:00
|
|
|
extern HRESULT WINAPI Ole32DllGetClassObject(REFCLSID clsid, REFIID riid, void **obj) DECLSPEC_HIDDEN;
|
2017-02-22 12:28:57 +01:00
|
|
|
|
2005-11-28 11:16:58 +01:00
|
|
|
/* Exported non-interface Data Advise Holder functions */
|
2011-04-21 10:45:36 +02:00
|
|
|
HRESULT DataAdviseHolder_OnConnect(IDataAdviseHolder *iface, IDataObject *pDelegate) DECLSPEC_HIDDEN;
|
|
|
|
void DataAdviseHolder_OnDisconnect(IDataAdviseHolder *iface) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
extern UINT ownerlink_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT filename_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT filenameW_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT dataobject_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT embedded_object_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT embed_source_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT custom_link_source_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT link_source_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT object_descriptor_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT link_source_descriptor_clipboard_format DECLSPEC_HIDDEN;
|
|
|
|
extern UINT ole_private_data_clipboard_format DECLSPEC_HIDDEN;
|
2009-04-23 16:04:56 +02:00
|
|
|
|
2021-07-26 12:28:13 +02:00
|
|
|
void clipbrd_destroy(void) DECLSPEC_HIDDEN;
|
|
|
|
|
2012-11-26 15:20:13 +01:00
|
|
|
extern LSTATUS create_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *) DECLSPEC_HIDDEN;
|
|
|
|
extern LSTATUS open_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *) DECLSPEC_HIDDEN;
|
|
|
|
|
2013-11-11 19:02:58 +01:00
|
|
|
extern BOOL actctx_get_miscstatus(const CLSID*, DWORD, DWORD*) DECLSPEC_HIDDEN;
|
|
|
|
|
2015-10-09 12:13:24 +02:00
|
|
|
extern const char *debugstr_formatetc(const FORMATETC *formatetc) DECLSPEC_HIDDEN;
|
|
|
|
|
2017-05-18 12:07:02 +02:00
|
|
|
static inline HRESULT copy_formatetc(FORMATETC *dst, const FORMATETC *src)
|
|
|
|
{
|
|
|
|
*dst = *src;
|
|
|
|
if (src->ptd)
|
|
|
|
{
|
|
|
|
dst->ptd = CoTaskMemAlloc( src->ptd->tdSize );
|
|
|
|
if (!dst->ptd) return E_OUTOFMEMORY;
|
|
|
|
memcpy( dst->ptd, src->ptd, src->ptd->tdSize );
|
|
|
|
}
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2017-05-23 14:11:40 +02:00
|
|
|
extern HRESULT EnumSTATDATA_Construct(IUnknown *holder, ULONG index, DWORD array_len, STATDATA *data,
|
|
|
|
BOOL copy, IEnumSTATDATA **ppenum) DECLSPEC_HIDDEN;
|
|
|
|
|
2000-11-25 04:08:23 +01:00
|
|
|
#endif /* __WINE_OLE_COMPOBJ_H */
|