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
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_OLE_COMPOBJ_H
24 #define __WINE_OLE_COMPOBJ_H
26 /* All private prototype functions used by OLE will be added to this header file */
30 extern void* StdGlobalInterfaceTable_Construct();
31 extern void StdGlobalInterfaceTable_Destroy(void* self
);
33 extern HRESULT
WINE_StringFromCLSID(const CLSID
*id
,LPSTR idstr
);
34 extern HRESULT
create_marshalled_proxy(REFCLSID rclsid
, REFIID iid
, LPVOID
*ppv
);
37 get_facbuf_for_iid(REFIID riid
,IPSFactoryBuffer
**facbuf
) {
41 if ((hres
= CoGetPSClsid(riid
,&pxclsid
)))
43 return CoGetClassObject(&pxclsid
,CLSCTX_INPROC_SERVER
,NULL
,&IID_IPSFactoryBuffer
,(LPVOID
*)facbuf
);
46 #define PIPEPREF "\\\\.\\pipe\\"
47 #define OLESTUBMGR PIPEPREF"WINE_OLE_StubMgr"
48 /* Standard Marshaling definitions */
49 typedef struct _wine_marshal_id
{
51 DWORD objectid
; /* unique value corresp. IUnknown of object */
56 MARSHAL_Compare_Mids(wine_marshal_id
*mid1
,wine_marshal_id
*mid2
) {
58 (mid1
->processid
== mid2
->processid
) &&
59 (mid1
->objectid
== mid2
->objectid
) &&
60 IsEqualIID(&(mid1
->iid
),&(mid2
->iid
))
64 /* compare without interface compare */
66 MARSHAL_Compare_Mids_NoInterface(wine_marshal_id
*mid1
, wine_marshal_id
*mid2
) {
68 (mid1
->processid
== mid2
->processid
) &&
69 (mid1
->objectid
== mid2
->objectid
)
73 HRESULT
MARSHAL_Find_Stub_Buffer(wine_marshal_id
*mid
,IRpcStubBuffer
**stub
);
74 HRESULT
MARSHAL_Find_Stub_Server(wine_marshal_id
*mid
,LPUNKNOWN
*punk
);
75 HRESULT
MARSHAL_Register_Stub(wine_marshal_id
*mid
,LPUNKNOWN punk
, IRpcStubBuffer
*stub
);
77 HRESULT
MARSHAL_GetStandardMarshalCF(LPVOID
*ppv
);
79 typedef struct _wine_marshal_data
{
85 #define REQTYPE_REQUEST 0
86 typedef struct _wine_rpc_request_header
{
91 } wine_rpc_request_header
;
93 #define REQTYPE_RESPONSE 1
94 typedef struct _wine_rpc_response_header
{
98 } wine_rpc_response_header
;
100 #define REQSTATE_START 0
101 #define REQSTATE_REQ_QUEUED 1
102 #define REQSTATE_REQ_WAITING_FOR_REPLY 2
103 #define REQSTATE_REQ_GOT 3
104 #define REQSTATE_INVOKING 4
105 #define REQSTATE_RESP_QUEUED 5
106 #define REQSTATE_RESP_GOT 6
107 #define REQSTATE_DONE 6
109 void STUBMGR_Start();
111 extern HRESULT
PIPE_GetNewPipeBuf(wine_marshal_id
*mid
, IRpcChannelBuffer
**pipebuf
);
113 /* This function initialize the Running Object Table */
114 HRESULT WINAPI
RunningObjectTableImpl_Initialize();
116 /* This function uninitialize the Running Object Table */
117 HRESULT WINAPI
RunningObjectTableImpl_UnInitialize();
119 /* This function decomposes a String path to a String Table containing all the elements ("\" or "subDirectory" or "Directory" or "FileName") of the path */
120 int WINAPI
FileMonikerImpl_DecomposePath(LPCOLESTR str
, LPOLESTR
** stringTable
);
122 HRESULT WINAPI
__CLSIDFromStringA(LPCSTR idstr
, CLSID
*id
);
124 #endif /* __WINE_OLE_COMPOBJ_H */