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 |
|
---|
16 | extern HRESULT WINE_StringFromCLSID(const CLSID *id,LPSTR idstr);
|
---|
17 | extern HRESULT create_marshalled_proxy(REFCLSID rclsid, REFIID iid, LPVOID *ppv);
|
---|
18 |
|
---|
19 | #ifndef __WIN32OS2__
|
---|
20 | inline static HRESULT
|
---|
21 | get_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 */
|
---|
34 | typedef struct _wine_marshal_id {
|
---|
35 | DWORD processid;
|
---|
36 | DWORD objectid; /* unique value corresp. IUnknown of object */
|
---|
37 | IID iid;
|
---|
38 | } wine_marshal_id;
|
---|
39 |
|
---|
40 | inline static BOOL
|
---|
41 | MARSHAL_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 */
|
---|
50 | inline static BOOL
|
---|
51 | MARSHAL_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 |
|
---|
58 | HRESULT MARSHAL_Find_Stub_Buffer(wine_marshal_id *mid,IRpcStubBuffer **stub);
|
---|
59 | HRESULT MARSHAL_Find_Stub_Server(wine_marshal_id *mid,LPUNKNOWN *punk);
|
---|
60 | HRESULT MARSHAL_Register_Stub(wine_marshal_id *mid,LPUNKNOWN punk, IRpcStubBuffer *stub);
|
---|
61 |
|
---|
62 | HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv);
|
---|
63 |
|
---|
64 | typedef struct _wine_marshal_data {
|
---|
65 | DWORD dwDestContext;
|
---|
66 | DWORD mshlflags;
|
---|
67 | } wine_marshal_data;
|
---|
68 |
|
---|
69 |
|
---|
70 | #define REQTYPE_REQUEST 0
|
---|
71 | typedef 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
|
---|
79 | typedef 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 |
|
---|
94 | void STUBMGR_Start();
|
---|
95 |
|
---|
96 | extern HRESULT PIPE_GetNewPipeBuf(wine_marshal_id *mid, IRpcChannelBuffer **pipebuf);
|
---|
97 |
|
---|
98 | /* This function initialize the Running Object Table */
|
---|
99 | HRESULT WINAPI RunningObjectTableImpl_Initialize();
|
---|
100 |
|
---|
101 | /* This function uninitialize the Running Object Table */
|
---|
102 | HRESULT 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 */
|
---|
105 | int WINAPI FileMonikerImpl_DecomposePath(LPCOLESTR str, LPOLESTR** stringTable);
|
---|
106 |
|
---|
107 | #endif /* __WINE_OLE_COMPOBJ_H */
|
---|