source: trunk/src/ole32/compobj_private.h@ 7954

Last change on this file since 7954 was 7954, checked in by phaller, 24 years ago

Moved CoGetPSClsid call to where it belongs

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