source: trunk/src/ole32/compobj_private.h

Last change on this file was 21916, checked in by dmik, 14 years ago

Merge branch gcc-kmk to trunk.

File size: 3.9 KB
Line 
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 *
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.
12 *
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.
17 *
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
21 */
22
23#ifndef __WINE_OLE_COMPOBJ_H
24#define __WINE_OLE_COMPOBJ_H
25
26#ifdef __WIN32OS2__
27#undef inline
28#define inline
29
30#include "wine/obj_moniker.h"
31
32#endif
33
34/* All private prototype functions used by OLE will be added to this header file */
35
36#include "wtypes.h"
37
38extern HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid);
39extern HRESULT create_marshalled_proxy(REFCLSID rclsid, REFIID iid, LPVOID *ppv);
40
41inline static HRESULT
42get_facbuf_for_iid(REFIID riid,IPSFactoryBuffer **facbuf) {
43 HRESULT hres;
44 CLSID pxclsid;
45
46 if ((hres = CoGetPSClsid(riid,&pxclsid)))
47 return hres;
48 return CoGetClassObject(&pxclsid,CLSCTX_INPROC_SERVER,NULL,&IID_IPSFactoryBuffer,(LPVOID*)facbuf);
49}
50
51#define PIPEPREF "\\\\.\\pipe\\"
52#define OLESTUBMGR PIPEPREF"WINE_OLE_StubMgr"
53/* Standard Marshaling definitions */
54typedef struct _wine_marshal_id {
55 DWORD processid;
56 DWORD objectid; /* unique value corresp. IUnknown of object */
57 IID iid;
58} wine_marshal_id;
59
60inline static BOOL
61MARSHAL_Compare_Mids(wine_marshal_id *mid1,wine_marshal_id *mid2) {
62 return
63 (mid1->processid == mid2->processid) &&
64 (mid1->objectid == mid2->objectid) &&
65 IsEqualIID(&(mid1->iid),&(mid2->iid))
66 ;
67}
68
69/* compare without interface compare */
70inline static BOOL
71MARSHAL_Compare_Mids_NoInterface(wine_marshal_id *mid1, wine_marshal_id *mid2) {
72 return
73 (mid1->processid == mid2->processid) &&
74 (mid1->objectid == mid2->objectid)
75 ;
76}
77
78HRESULT MARSHAL_Find_Stub_Buffer(wine_marshal_id *mid,IRpcStubBuffer **stub);
79HRESULT MARSHAL_Find_Stub_Server(wine_marshal_id *mid,LPUNKNOWN *punk);
80HRESULT MARSHAL_Register_Stub(wine_marshal_id *mid,LPUNKNOWN punk, IRpcStubBuffer *stub);
81
82HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv);
83
84typedef struct _wine_marshal_data {
85 DWORD dwDestContext;
86 DWORD mshlflags;
87} wine_marshal_data;
88
89
90#define REQTYPE_REQUEST 0
91typedef struct _wine_rpc_request_header {
92 DWORD reqid;
93 wine_marshal_id mid;
94 DWORD iMethod;
95 DWORD cbBuffer;
96} wine_rpc_request_header;
97
98#define REQTYPE_RESPONSE 1
99typedef struct _wine_rpc_response_header {
100 DWORD reqid;
101 DWORD cbBuffer;
102 DWORD retval;
103} wine_rpc_response_header;
104
105#define REQSTATE_START 0
106#define REQSTATE_REQ_QUEUED 1
107#define REQSTATE_REQ_WAITING_FOR_REPLY 2
108#define REQSTATE_REQ_GOT 3
109#define REQSTATE_INVOKING 4
110#define REQSTATE_RESP_QUEUED 5
111#define REQSTATE_RESP_GOT 6
112#define REQSTATE_DONE 6
113
114void STUBMGR_Start();
115
116extern HRESULT PIPE_GetNewPipeBuf(wine_marshal_id *mid, IRpcChannelBuffer **pipebuf);
117
118/* This function initialize the Running Object Table */
119HRESULT WINAPI RunningObjectTableImpl_Initialize();
120
121/* This function uninitialize the Running Object Table */
122HRESULT WINAPI RunningObjectTableImpl_UnInitialize();
123
124/* This function decomposes a String path to a String Table containing all the elements ("\" or "subDirectory" or "Directory" or "FileName") of the path */
125int WINAPI FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable);
126
127HRESULT WINAPI __CLSIDFromStringA(LPCSTR idstr, CLSID *id);
128
129#endif /* __WINE_OLE_COMPOBJ_H */
Note: See TracBrowser for help on using the repository browser.