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 HRESULT WINE_StringFromCLSID(const CLSID *id,LPSTR idstr);
31 extern HRESULT create_marshalled_proxy(REFCLSID rclsid, REFIID iid, LPVOID *ppv);
34 get_facbuf_for_iid(REFIID riid,IPSFactoryBuffer **facbuf) {
38 if ((hres = CoGetPSClsid(riid,&pxclsid)))
40 return CoGetClassObject(&pxclsid,CLSCTX_INPROC_SERVER,NULL,&IID_IPSFactoryBuffer,(LPVOID*)facbuf);
43 #define PIPEPREF "\\\\.\\pipe\\"
44 #define OLESTUBMGR PIPEPREF"WINE_OLE_StubMgr"
45 /* Standard Marshaling definitions */
46 typedef struct _wine_marshal_id {
48 DWORD objectid; /* unique value corresp. IUnknown of object */
53 MARSHAL_Compare_Mids(wine_marshal_id *mid1,wine_marshal_id *mid2) {
55 (mid1->processid == mid2->processid) &&
56 (mid1->objectid == mid2->objectid) &&
57 IsEqualIID(&(mid1->iid),&(mid2->iid))
61 /* compare without interface compare */
63 MARSHAL_Compare_Mids_NoInterface(wine_marshal_id *mid1, wine_marshal_id *mid2) {
65 (mid1->processid == mid2->processid) &&
66 (mid1->objectid == mid2->objectid)
70 HRESULT MARSHAL_Find_Stub_Buffer(wine_marshal_id *mid,IRpcStubBuffer **stub);
71 HRESULT MARSHAL_Find_Stub_Server(wine_marshal_id *mid,LPUNKNOWN *punk);
72 HRESULT MARSHAL_Register_Stub(wine_marshal_id *mid,LPUNKNOWN punk, IRpcStubBuffer *stub);
74 HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv);
76 typedef struct _wine_marshal_data {
82 #define REQTYPE_REQUEST 0
83 typedef struct _wine_rpc_request_header {
88 } wine_rpc_request_header;
90 #define REQTYPE_RESPONSE 1
91 typedef struct _wine_rpc_response_header {
95 } wine_rpc_response_header;
97 #define REQSTATE_START 0
98 #define REQSTATE_REQ_QUEUED 1
99 #define REQSTATE_REQ_WAITING_FOR_REPLY 2
100 #define REQSTATE_REQ_GOT 3
101 #define REQSTATE_INVOKING 4
102 #define REQSTATE_RESP_QUEUED 5
103 #define REQSTATE_RESP_GOT 6
104 #define REQSTATE_DONE 6
106 void STUBMGR_Start();
108 extern HRESULT PIPE_GetNewPipeBuf(wine_marshal_id *mid, IRpcChannelBuffer **pipebuf);
110 /* This function initialize the Running Object Table */
111 HRESULT WINAPI RunningObjectTableImpl_Initialize();
113 /* This function uninitialize the Running Object Table */
114 HRESULT WINAPI RunningObjectTableImpl_UnInitialize();
116 /* This function decomposes a String path to a String Table containing all the elements ("\" or "subDirectory" or "Directory" or "FileName") of the path */
117 int WINAPI FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable);
119 HRESULT WINAPI __CLSIDFromStringA(LPCSTR idstr, CLSID *id);
121 #endif /* __WINE_OLE_COMPOBJ_H */