Fixed another regression in PlaySound.
[wine.git] / dlls / ole32 / compobj_private.h
blob310854af17a4c5d4cd7c271f1af06cd9803106a9
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
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 */
28 #include "wtypes.h"
30 extern HRESULT WINE_StringFromCLSID(const CLSID *id,LPSTR idstr);
31 extern HRESULT create_marshalled_proxy(REFCLSID rclsid, REFIID iid, LPVOID *ppv);
33 inline static HRESULT
34 get_facbuf_for_iid(REFIID riid,IPSFactoryBuffer **facbuf) {
35 HRESULT hres;
36 CLSID pxclsid;
38 if ((hres = CoGetPSClsid(riid,&pxclsid)))
39 return hres;
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 {
47 DWORD processid;
48 DWORD objectid; /* unique value corresp. IUnknown of object */
49 IID iid;
50 } wine_marshal_id;
52 inline static BOOL
53 MARSHAL_Compare_Mids(wine_marshal_id *mid1,wine_marshal_id *mid2) {
54 return
55 (mid1->processid == mid2->processid) &&
56 (mid1->objectid == mid2->objectid) &&
57 IsEqualIID(&(mid1->iid),&(mid2->iid))
61 /* compare without interface compare */
62 inline static BOOL
63 MARSHAL_Compare_Mids_NoInterface(wine_marshal_id *mid1, wine_marshal_id *mid2) {
64 return
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 {
77 DWORD dwDestContext;
78 DWORD mshlflags;
79 } wine_marshal_data;
82 #define REQTYPE_REQUEST 0
83 typedef struct _wine_rpc_request_header {
84 DWORD reqid;
85 wine_marshal_id mid;
86 DWORD iMethod;
87 DWORD cbBuffer;
88 } wine_rpc_request_header;
90 #define REQTYPE_RESPONSE 1
91 typedef struct _wine_rpc_response_header {
92 DWORD reqid;
93 DWORD cbBuffer;
94 DWORD retval;
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 #endif /* __WINE_OLE_COMPOBJ_H */