Do not call ExitThread() on server communication errors.
[wine] / ole / olecli.c
1 /*
2  *      OLECLI library
3  *
4  *      Copyright 1995  Martin von Loewis
5  */
6
7 /*      At the moment, these are only empty stubs.
8  */
9
10 #include "winerror.h"
11 #include "ole.h"
12 #include "gdi.h"
13 #include "objidl.h"
14 #include "debug.h"
15
16
17 extern LONG     OLE_current_handle;
18
19 /******************************************************************************
20  *              OleRegisterClientDoc16  [OLECLI.41]
21  */
22 OLESTATUS WINAPI OleRegisterClientDoc16(LPCSTR classname, LPCSTR docname,
23                                         LONG reserved, LHCLIENTDOC *hRet )
24 {
25     FIXME(ole,"(%s,%s,...): stub\n",classname,docname);
26     *hRet=++OLE_current_handle;
27     return OLE_OK;
28 }
29
30 /******************************************************************************
31  *              OleRegisterClientDoc32  [OLECLI32.41]
32  */
33 OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR classname, LPCSTR docname,
34                                         LONG reserved, LHCLIENTDOC *hRet )
35 {
36     FIXME(ole,"(%s,%s,...): stub\n",classname,docname);
37     *hRet=++OLE_current_handle;
38     return OLE_OK;
39 }
40
41 /******************************************************************************
42  *              OleRenameClientDoc16    [OLECLI.43]
43  */
44 OLESTATUS WINAPI OleRenameClientDoc16(LHCLIENTDOC hDoc, LPCSTR newName)
45 {
46     FIXME(ole,"(%ld,%s,...): stub\n",hDoc, newName);
47     return OLE_OK;
48 }
49
50 /******************************************************************************
51  *              OleRenameClientDoc32    [OLECLI32.43]
52  */
53 OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC hDoc, LPCSTR newName)
54 {
55     FIXME(ole,"(%ld,%s,...): stub\n",hDoc, newName);
56     return OLE_OK;
57 }
58
59 /******************************************************************************
60  *              OleRevokeClientDoc16    [OLECLI.42]
61  */
62 OLESTATUS WINAPI OleRevokeClientDoc16(LHCLIENTDOC hServerDoc)
63 {
64     FIXME(ole,"(%ld): stub\n",hServerDoc);
65     return OLE_OK;
66 }
67
68 /******************************************************************************
69  *              OleRevokeClientDoc32    [OLECLI32.42]
70  */
71 OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC hServerDoc)
72 {
73     FIXME(ole,"(%ld): stub\n",hServerDoc);
74     return OLE_OK;
75 }
76
77 /******************************************************************************
78  *              OleRevertClientDoc16    [OLECLI.44]
79  */
80 OLESTATUS WINAPI OleRevertClientDoc16(LHCLIENTDOC hServerDoc)
81 {
82     FIXME(ole, "(%ld): stub\n", hServerDoc);
83     return OLE_OK;
84 }
85
86 /******************************************************************************
87  *              OleEnumObjects16        [OLECLI.47]
88  */
89 OLESTATUS WINAPI OleEnumObjects16(LHCLIENTDOC hServerDoc, SEGPTR data)
90 {
91     FIXME(ole, "(%ld, %04x:%04x): stub\n", hServerDoc, HIWORD(data),
92         LOWORD(data));
93     return OLE_OK;
94 }
95
96 /******************************************************************************
97  *           OleCreateLinkFromClip16    [OLECLI.11]
98  */
99 OLESTATUS WINAPI OleCreateLinkFromClip16(
100         LPCSTR name, LPOLECLIENT olecli, LHCLIENTDOC hclientdoc, LPCSTR xname,
101         LPOLEOBJECT *lpoleob, UINT16 render, UINT16 clipformat
102 ) {
103         FIXME(ole, "(%s, %04x:%04x, %ld, %s, %04x:%04x, %d, %d): stub!\n",
104             (char *)PTR_SEG_TO_LIN(name), HIWORD(olecli), LOWORD(olecli),
105             hclientdoc, (char *)PTR_SEG_TO_LIN(xname), HIWORD(lpoleob),
106             LOWORD(lpoleob), render, clipformat);
107         return OLE_OK;
108 }
109
110 /******************************************************************************
111  *           OleCreateLinkFromClip32    [OLECLI32.11]
112  */
113 OLESTATUS WINAPI OleCreateLinkFromClip( 
114         LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
115         LPOLEOBJECT *lpoleob,OLEOPT_RENDER render,OLECLIPFORMAT clipformat
116 ) {
117         FIXME(ole,"(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n",
118               name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
119         return OLE_OK;
120 }
121
122 /******************************************************************************
123  *           OleQueryLinkFromClip16     [OLECLI.9]
124  */
125 OLESTATUS WINAPI OleQueryLinkFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat) {
126         FIXME(ole, "(%s, %d, %d): stub!\n", (char*)(PTR_SEG_TO_LIN(name)),
127                 render, clipformat);
128         return OLE_OK;
129 }
130
131 /******************************************************************************
132  *           OleQueryLinkFromClip32     [OLECLI32.9]
133  */
134 OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
135         FIXME(ole,"(%s,%d,%ld): stub!\n",name,render,clipformat);
136         return OLE_OK;
137 }
138
139 /******************************************************************************
140  *           OleQueryCreateFromClip16   [OLECLI.10]
141  */
142 OLESTATUS WINAPI OleQueryCreateFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat) {
143         FIXME(ole, "(%s, %d, %d): stub!\n", (char*)(PTR_SEG_TO_LIN(name)),
144                 render, clipformat);
145         return OLE_OK;
146 }
147
148 /******************************************************************************
149  *           OleQueryCreateFromClip32   [OLECLI32.10]
150  */
151 OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
152         FIXME(ole,"(%s,%d,%ld): stub!\n",name,render,clipformat);
153         return OLE_OK;
154 }
155
156 /******************************************************************************
157  *              OleIsDcMeta16   [OLECLI.60]
158  */
159 BOOL16 WINAPI OleIsDcMeta16(HDC16 hdc)
160 {
161         TRACE(ole,"(%04x)\n",hdc);
162         if (GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0) {
163             GDI_HEAP_UNLOCK( hdc );
164             return TRUE;
165         }
166         return FALSE;
167 }
168
169
170 /******************************************************************************
171  *              OleIsDcMeta32   [OLECLI32.60]
172  */
173 BOOL WINAPI OleIsDcMeta(HDC hdc)
174 {
175         TRACE(ole,"(%04x)\n",hdc);
176         if (GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0) {
177             GDI_HEAP_UNLOCK( hdc );
178             return TRUE;
179         }
180         return FALSE;
181 }
182
183
184 /******************************************************************************
185  *              OleSetHostNames32       [OLECLI32.15]
186  */
187 OLESTATUS WINAPI OleSetHostNames(LPOLEOBJECT oleob,LPCSTR name1,LPCSTR name2) {
188         FIXME(ole,"(%p,%s,%s): stub\n",oleob,name1,name2);
189         return OLE_OK;
190 }
191
192 /******************************************************************************
193  *              OleQueryType16  [OLECLI.14]
194  */
195 OLESTATUS WINAPI OleQueryType16(LPOLEOBJECT oleob,  SEGPTR xlong) {
196         FIXME(ole, "(%p, %p): stub!\n",
197                 PTR_SEG_TO_LIN(oleob), PTR_SEG_TO_LIN(xlong));
198         return OLE_OK;
199 }
200
201 /******************************************************************************
202  *              OleQueryType32  [OLECLI32.14]
203  */
204 OLESTATUS WINAPI OleQueryType(LPOLEOBJECT oleob,LONG*xlong) {
205         FIXME(ole,"(%p,%p): stub!\n",oleob,xlong);
206         if (!oleob)
207                 return 0x10;
208         TRACE(ole,"Calling OLEOBJECT.QueryType (%p) (%p,%p)\n",
209               oleob->lpvtbl->QueryType,oleob,xlong);
210         return oleob->lpvtbl->QueryType(oleob,xlong);
211 }
212
213 /******************************************************************************
214  *              OleCreateFromClip16     [OLECLI.12]
215  */
216 OLESTATUS WINAPI OleCreateFromClip16(
217         LPCSTR name, LPOLECLIENT olecli, LHCLIENTDOC hclientdoc, LPCSTR xname,
218         LPOLEOBJECT *lpoleob, UINT16 render, UINT16 clipformat
219 ) {
220         FIXME(ole, "(%s, %04x:%04x, %ld, %s, %04x:%04x, %d, %d): stub!\n",
221             (char *)PTR_SEG_TO_LIN(name), HIWORD(olecli), LOWORD(olecli),
222             hclientdoc, (char *)PTR_SEG_TO_LIN(xname), HIWORD(lpoleob),
223             LOWORD(lpoleob), render, clipformat);
224         return OLE_OK;
225 }
226
227 /******************************************************************************
228  *              OleCreateFromClip32     [OLECLI32.12]
229  */
230 OLESTATUS WINAPI OleCreateFromClip(
231         LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
232         LPOLEOBJECT *lpoleob,OLEOPT_RENDER render, OLECLIPFORMAT clipformat
233 ) {
234         FIXME(ole,"(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n",
235               name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
236         /* clipb type, object kreieren entsprechend etc. */
237         return OLE_OK;
238 }
239
240 /***********************************************************************
241  *           OleIsCurrentClipboard32 [OLE32.110]
242  */
243 HRESULT WINAPI OleIsCurrentClipboard (
244   IDataObject *pDataObject)  /* ptr to the data obj previously copied or cut */
245 {
246   FIXME(ole,"(DataObject %p): stub!\n", pDataObject);
247   return S_FALSE;
248 }
249