ReactOS 0.4.16-dev-2332-g4cba65d
compobj_private.h
Go to the documentation of this file.
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
9 *
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.
14 *
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.
19 *
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
23 */
24
25#ifndef __WINE_OLE_COMPOBJ_H
26#define __WINE_OLE_COMPOBJ_H
27
28/* All private prototype functions used by OLE will be added to this header file */
29
30#include <stdarg.h>
31
32#include "wine/list.h"
33#include "wine/heap.h"
34
35#include "windef.h"
36#include "winbase.h"
37#include "wtypes.h"
38#ifdef __REACTOS__
39#include <ole2.h>
40#endif
41#include "dcom.h"
42#include "winreg.h"
43#include "winternl.h"
44
45DEFINE_OLEGUID( CLSID_DfMarshal, 0x0000030b, 0, 0 );
46
47/* this is what is stored in TEB->ReservedForOle */
48struct oletls
49{
50 struct apartment *apt;
51 IErrorInfo *errorinfo; /* see errorinfo.c */
52 DWORD thread_seqid; /* returned with CoGetCurrentProcess */
53 DWORD flags; /* tlsdata_flags (+0Ch on x86) */
54 void *unknown0;
55 DWORD inits; /* number of times CoInitializeEx called */
56 DWORD ole_inits; /* number of times OleInitialize called */
57 GUID causality_id; /* unique identifier for each COM call */
58 LONG pending_call_count_client; /* number of client calls pending */
59 LONG pending_call_count_server; /* number of server calls pending */
61 IObjContext *context_token; /* (+38h on x86) */
62 IUnknown *call_state; /* current call context (+3Ch on x86) */
64 IUnknown *cancel_object; /* cancel object set by CoSetCancelObject (+F8h on x86) */
65 IUnknown *state; /* see CoSetState */
66 struct list spies; /* Spies installed with CoRegisterInitializeSpy */
69 CO_MTA_USAGE_COOKIE implicit_mta_cookie; /* mta referenced by roapi from sta thread */
70};
71
72/* Global Interface Table Functions */
73extern void release_std_git(void);
75
79
80/* Drag and drop */
82
84
85/* will create if necessary */
86static inline struct oletls *COM_CurrentInfo(void)
87{
88 struct oletls *oletls;
89
90 if (!NtCurrentTeb()->ReservedForOle)
92
93 return NtCurrentTeb()->ReservedForOle;
94}
95
96static inline struct apartment * COM_CurrentApt(void)
97{
98 return COM_CurrentInfo()->apt;
99}
100
101#define CHARS_IN_GUID 39 /* including NULL */
102
103/* from dlldata.c */
104extern HINSTANCE hProxyDll;
108
111
113 REFIID riid, void **ppv);
116 void **obj);
119 void **obj);
122
123/* Exported non-interface Data Advise Holder functions */
126
138
139void clipbrd_destroy(void);
140
141extern LSTATUS create_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *);
142extern LSTATUS open_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *);
143
144extern BOOL actctx_get_miscstatus(const CLSID*, DWORD, DWORD*);
145
146extern const char *debugstr_formatetc(const FORMATETC *formatetc);
147
148static inline HRESULT copy_formatetc(FORMATETC *dst, const FORMATETC *src)
149{
150 *dst = *src;
151 if (src->ptd)
152 {
153 dst->ptd = CoTaskMemAlloc( src->ptd->tdSize );
154 if (!dst->ptd) return E_OUTOFMEMORY;
155 memcpy( dst->ptd, src->ptd, src->ptd->tdSize );
156 }
157 return S_OK;
158}
159
160extern HRESULT EnumSTATDATA_Construct(IUnknown *holder, ULONG index, DWORD array_len, STATDATA *data,
161 BOOL copy, IEnumSTATDATA **ppenum);
162
163#endif /* __WINE_OLE_COMPOBJ_H */
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
Definition: list.h:37
HRESULT EnumSTATDATA_Construct(IUnknown *holder, ULONG index, DWORD array_len, STATDATA *data, BOOL copy, IEnumSTATDATA **ppenum)
Definition: oleobj.c:195
static HRESULT copy_formatetc(FORMATETC *dst, const FORMATETC *src)
IClassFactory GlobalOptionsCF
HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
UINT dataobject_clipboard_format
Definition: clipboard.c:192
HRESULT WINAPI ManualResetEvent_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
Definition: compobj.c:481
HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv)
Definition: marshal.c:92
HRESULT HandlerCF_Create(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
void release_std_git(void)
Definition: git.c:327
UINT ole_private_data_clipboard_format
Definition: clipboard.c:199
static struct apartment * COM_CurrentApt(void)
static struct oletls * COM_CurrentInfo(void)
HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv)
HRESULT COM_OpenKeyForCLSID(REFCLSID clsid, LPCWSTR keyname, REGSAM access, HKEY *key)
Definition: compobj.c:540
UINT embedded_object_clipboard_format
Definition: clipboard.c:193
HRESULT WINAPI GlobalOptions_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
UINT filenameW_clipboard_format
Definition: clipboard.c:191
HRESULT WINAPI InternalTlsAllocData(struct oletls **tlsdata)
LSTATUS create_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *)
Definition: compobj.c:306
UINT filename_clipboard_format
Definition: clipboard.c:190
HRESULT WINAPI OLE32_DllRegisterServer(void)
HRESULT DataAdviseHolder_OnConnect(IDataAdviseHolder *iface, IDataObject *pDelegate)
Definition: oleobj.c:805
HRESULT FTMarshalCF_Create(REFIID riid, LPVOID *ppv)
Definition: ftmarshal.c:99
LSTATUS open_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *)
Definition: compobj.c:328
HINSTANCE hProxyDll
Definition: combase.c:40
HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: compobj.c:911
UINT ownerlink_clipboard_format
Definition: clipboard.c:189
UINT object_descriptor_clipboard_format
Definition: clipboard.c:197
void DataAdviseHolder_OnDisconnect(IDataAdviseHolder *iface)
Definition: oleobj.c:827
HRESULT WINAPI OLE32_DllUnregisterServer(void)
void clipbrd_destroy(void)
Definition: clipboard.c:2038
UINT link_source_descriptor_clipboard_format
Definition: clipboard.c:198
const char * debugstr_formatetc(const FORMATETC *formatetc)
Definition: datacache.c:214
IClassFactory GlobalInterfaceTableCF
Definition: oleproxy.c:171
void OLEDD_UnInitialize(void)
HRESULT WINAPI Ole32DllGetClassObject(REFCLSID clsid, REFIID riid, void **obj)
Definition: oleproxy.c:229
BOOL actctx_get_miscstatus(const CLSID *, DWORD, DWORD *)
Definition: compobj.c:160
UINT custom_link_source_clipboard_format
Definition: clipboard.c:195
HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
Definition: git.c:303
IClassFactory ManualResetEventCF
Definition: oleproxy.c:182
UINT embed_source_clipboard_format
Definition: clipboard.c:194
UINT link_source_clipboard_format
Definition: clipboard.c:196
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
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
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum src
Definition: glext.h:6340
GLuint index
Definition: glext.h:6031
GLenum GLenum dst
Definition: glext.h:6340
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define NtCurrentTeb
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static IUnknown * outer
Definition: compobj.c:82
static const GUID CLSID_DfMarshal
Definition: marshal.c:62
const CLSID * clsid
Definition: msctf.cpp:50
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define DEFINE_OLEGUID(name, l, w1, w2)
Definition: guiddef.h:73
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
Definition: copy.c:22
DWORD cancelcount
IErrorInfo * errorinfo
CO_MTA_USAGE_COOKIE implicit_mta_cookie
DWORD unknown
IUnknown * call_state
LONG pending_call_count_client
LONG pending_call_count_server
IUnknown * state
DWORD spies_lock
IObjContext * context_token
DWORD unknown2[46]
struct list spies
IUnknown * cancel_object
void * unknown0
GUID causality_id
DWORD ole_inits
DWORD thread_seqid
DWORD inits
DWORD flags
struct apartment * apt
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
ACCESS_MASK REGSAM
Definition: winreg.h:76
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
__wchar_t WCHAR
Definition: xmlstorage.h:180