ole32: Remove DECLSPEC_HIDDEN usage.
[wine.git] / dlls / ole32 / compobj_private.h
blobeae1a5998c0d87f4dfc2ac423e6687fe9b4b3c93
1 /*
2 * Copyright 1995 Martin von Loewis
3 * Copyright 1998 Justin Bradford
4 * Copyright 1999 Francis Beaudet
5 * Copyright 1999 Sylvain St-Germain
6 * Copyright 2002 Marcus Meissner
7 * Copyright 2003 Ove Kåven, TransGaming Technologies
8 * Copyright 2004 Mike Hearn, Rob Shearman, CodeWeavers Inc
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #ifndef __WINE_OLE_COMPOBJ_H
26 #define __WINE_OLE_COMPOBJ_H
28 /* All private prototype functions used by OLE will be added to this header file */
30 #include <stdarg.h>
32 #include "wine/list.h"
33 #include "wine/heap.h"
35 #include "windef.h"
36 #include "winbase.h"
37 #include "wtypes.h"
38 #include "dcom.h"
39 #include "winreg.h"
40 #include "winternl.h"
42 DEFINE_OLEGUID( CLSID_DfMarshal, 0x0000030b, 0, 0 );
44 /* this is what is stored in TEB->ReservedForOle */
45 struct oletls
47 struct apartment *apt;
48 IErrorInfo *errorinfo; /* see errorinfo.c */
49 DWORD thread_seqid; /* returned with CoGetCurrentProcess */
50 DWORD flags; /* tlsdata_flags (+0Ch on x86) */
51 void *unknown0;
52 DWORD inits; /* number of times CoInitializeEx called */
53 DWORD ole_inits; /* number of times OleInitialize called */
54 GUID causality_id; /* unique identifier for each COM call */
55 LONG pending_call_count_client; /* number of client calls pending */
56 LONG pending_call_count_server; /* number of server calls pending */
57 DWORD unknown;
58 IObjContext *context_token; /* (+38h on x86) */
59 IUnknown *call_state; /* current call context (+3Ch on x86) */
60 DWORD unknown2[46];
61 IUnknown *cancel_object; /* cancel object set by CoSetCancelObject (+F8h on x86) */
62 IUnknown *state; /* see CoSetState */
63 struct list spies; /* Spies installed with CoRegisterInitializeSpy */
64 DWORD spies_lock;
65 DWORD cancelcount;
68 /* Global Interface Table Functions */
69 extern void release_std_git(void);
70 extern HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv);
72 HRESULT COM_OpenKeyForCLSID(REFCLSID clsid, LPCWSTR keyname, REGSAM access, HKEY *key);
73 HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv);
74 HRESULT FTMarshalCF_Create(REFIID riid, LPVOID *ppv);
76 /* Drag and drop */
77 void OLEDD_UnInitialize(void);
79 extern HRESULT WINAPI InternalTlsAllocData(struct oletls **tlsdata);
81 /* will create if necessary */
82 static inline struct oletls *COM_CurrentInfo(void)
84 struct oletls *oletls;
86 if (!NtCurrentTeb()->ReservedForOle)
87 InternalTlsAllocData(&oletls);
89 return NtCurrentTeb()->ReservedForOle;
92 static inline struct apartment * COM_CurrentApt(void)
94 return COM_CurrentInfo()->apt;
97 #define CHARS_IN_GUID 39 /* including NULL */
99 /* from dlldata.c */
100 extern HINSTANCE hProxyDll;
101 extern HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv);
102 extern HRESULT WINAPI OLE32_DllRegisterServer(void);
103 extern HRESULT WINAPI OLE32_DllUnregisterServer(void);
105 extern HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
106 extern HRESULT HandlerCF_Create(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
108 extern HRESULT WINAPI GlobalOptions_CreateInstance(IClassFactory *iface, IUnknown *pUnk,
109 REFIID riid, void **ppv);
110 extern IClassFactory GlobalOptionsCF;
111 extern HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid,
112 void **obj);
113 extern IClassFactory GlobalInterfaceTableCF;
114 extern HRESULT WINAPI ManualResetEvent_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid,
115 void **obj);
116 extern IClassFactory ManualResetEventCF;
117 extern HRESULT WINAPI Ole32DllGetClassObject(REFCLSID clsid, REFIID riid, void **obj);
119 /* Exported non-interface Data Advise Holder functions */
120 HRESULT DataAdviseHolder_OnConnect(IDataAdviseHolder *iface, IDataObject *pDelegate);
121 void DataAdviseHolder_OnDisconnect(IDataAdviseHolder *iface);
123 extern UINT ownerlink_clipboard_format;
124 extern UINT filename_clipboard_format;
125 extern UINT filenameW_clipboard_format;
126 extern UINT dataobject_clipboard_format;
127 extern UINT embedded_object_clipboard_format;
128 extern UINT embed_source_clipboard_format;
129 extern UINT custom_link_source_clipboard_format;
130 extern UINT link_source_clipboard_format;
131 extern UINT object_descriptor_clipboard_format;
132 extern UINT link_source_descriptor_clipboard_format;
133 extern UINT ole_private_data_clipboard_format;
135 void clipbrd_destroy(void);
137 extern LSTATUS create_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *);
138 extern LSTATUS open_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *);
140 extern BOOL actctx_get_miscstatus(const CLSID*, DWORD, DWORD*);
142 extern const char *debugstr_formatetc(const FORMATETC *formatetc);
144 static inline HRESULT copy_formatetc(FORMATETC *dst, const FORMATETC *src)
146 *dst = *src;
147 if (src->ptd)
149 dst->ptd = CoTaskMemAlloc( src->ptd->tdSize );
150 if (!dst->ptd) return E_OUTOFMEMORY;
151 memcpy( dst->ptd, src->ptd, src->ptd->tdSize );
153 return S_OK;
156 extern HRESULT EnumSTATDATA_Construct(IUnknown *holder, ULONG index, DWORD array_len, STATDATA *data,
157 BOOL copy, IEnumSTATDATA **ppenum);
159 #endif /* __WINE_OLE_COMPOBJ_H */