Fixed potential buffer overflows (spotted by Francois Gouget).
[wine/multimedia.git] / dlls / olecli / olecli_main.c
blob2e5e4d690683d9b3051eba768503d843ec796528
1 /*
2 * OLECLI library
4 * Copyright 1995 Martin von Loewis
5 */
7 /* At the moment, these are only empty stubs.
8 */
9 #include "ole.h"
10 #include "gdi.h"
11 #include "debugtools.h"
13 DEFAULT_DEBUG_CHANNEL(ole)
16 extern LONG OLE_current_handle;
18 /******************************************************************************
19 * OleRegisterClientDoc16 [OLECLI.41]
21 OLESTATUS WINAPI OleRegisterClientDoc16(LPCSTR classname, LPCSTR docname,
22 LONG reserved, LHCLIENTDOC *hRet )
24 FIXME("(%s,%s,...): stub\n",classname,docname);
25 *hRet=++OLE_current_handle;
26 return OLE_OK;
29 /******************************************************************************
30 * OleRegisterClientDoc32 [OLECLI32.41]
32 OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR classname, LPCSTR docname,
33 LONG reserved, LHCLIENTDOC *hRet )
35 FIXME("(%s,%s,...): stub\n",classname,docname);
36 *hRet=++OLE_current_handle;
37 return OLE_OK;
40 /******************************************************************************
41 * OleRenameClientDoc16 [OLECLI.43]
43 OLESTATUS WINAPI OleRenameClientDoc16(LHCLIENTDOC hDoc, LPCSTR newName)
45 FIXME("(%ld,%s,...): stub\n",hDoc, newName);
46 return OLE_OK;
49 /******************************************************************************
50 * OleRenameClientDoc32 [OLECLI32.43]
52 OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC hDoc, LPCSTR newName)
54 FIXME("(%ld,%s,...): stub\n",hDoc, newName);
55 return OLE_OK;
58 /******************************************************************************
59 * OleRevokeClientDoc16 [OLECLI.42]
61 OLESTATUS WINAPI OleRevokeClientDoc16(LHCLIENTDOC hServerDoc)
63 FIXME("(%ld): stub\n",hServerDoc);
64 return OLE_OK;
67 /******************************************************************************
68 * OleRevokeClientDoc32 [OLECLI32.42]
70 OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC hServerDoc)
72 FIXME("(%ld): stub\n",hServerDoc);
73 return OLE_OK;
76 /******************************************************************************
77 * OleRevertClientDoc16 [OLECLI.44]
79 OLESTATUS WINAPI OleRevertClientDoc16(LHCLIENTDOC hServerDoc)
81 FIXME("(%ld): stub\n", hServerDoc);
82 return OLE_OK;
85 /******************************************************************************
86 * OleEnumObjects16 [OLECLI.47]
88 OLESTATUS WINAPI OleEnumObjects16(LHCLIENTDOC hServerDoc, SEGPTR data)
90 FIXME("(%ld, %04x:%04x): stub\n", hServerDoc, HIWORD(data),
91 LOWORD(data));
92 return OLE_OK;
95 /******************************************************************************
96 * OleCreateLinkFromClip16 [OLECLI.11]
98 OLESTATUS WINAPI OleCreateLinkFromClip16(
99 LPCSTR name, LPOLECLIENT olecli, LHCLIENTDOC hclientdoc, LPCSTR xname,
100 LPOLEOBJECT *lpoleob, UINT16 render, UINT16 clipformat
102 FIXME("(%s, %04x:%04x, %ld, %s, %04x:%04x, %d, %d): stub!\n",
103 (char *)PTR_SEG_TO_LIN(name), HIWORD(olecli), LOWORD(olecli),
104 hclientdoc, (char *)PTR_SEG_TO_LIN(xname), HIWORD(lpoleob),
105 LOWORD(lpoleob), render, clipformat);
106 return OLE_OK;
109 /******************************************************************************
110 * OleCreateLinkFromClip32 [OLECLI32.11]
112 OLESTATUS WINAPI OleCreateLinkFromClip(
113 LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
114 LPOLEOBJECT *lpoleob,OLEOPT_RENDER render,OLECLIPFORMAT clipformat
116 FIXME("(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n",
117 name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
118 return OLE_OK;
121 /******************************************************************************
122 * OleQueryLinkFromClip16 [OLECLI.9]
124 OLESTATUS WINAPI OleQueryLinkFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat) {
125 FIXME("(%s, %d, %d): stub!\n", (char*)(PTR_SEG_TO_LIN(name)),
126 render, clipformat);
127 return OLE_OK;
130 /******************************************************************************
131 * OleQueryLinkFromClip32 [OLECLI32.9]
133 OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
134 FIXME("(%s,%d,%ld): stub!\n",name,render,clipformat);
135 return OLE_OK;
138 /******************************************************************************
139 * OleQueryCreateFromClip16 [OLECLI.10]
141 OLESTATUS WINAPI OleQueryCreateFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat) {
142 FIXME("(%s, %d, %d): stub!\n", (char*)(PTR_SEG_TO_LIN(name)),
143 render, clipformat);
144 return OLE_OK;
147 /******************************************************************************
148 * OleQueryCreateFromClip32 [OLECLI32.10]
150 OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) {
151 FIXME("(%s,%d,%ld): stub!\n",name,render,clipformat);
152 return OLE_OK;
155 /******************************************************************************
156 * OleIsDcMeta16 [OLECLI.60]
158 BOOL16 WINAPI OleIsDcMeta16(HDC16 hdc)
160 TRACE("(%04x)\n",hdc);
161 if (GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0) {
162 GDI_HEAP_UNLOCK( hdc );
163 return TRUE;
165 return FALSE;
169 /******************************************************************************
170 * OleIsDcMeta32 [OLECLI32.60]
172 BOOL WINAPI OleIsDcMeta(HDC hdc)
174 TRACE("(%04x)\n",hdc);
175 if (GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0) {
176 GDI_HEAP_UNLOCK( hdc );
177 return TRUE;
179 return FALSE;
183 /******************************************************************************
184 * OleSetHostNames32 [OLECLI32.15]
186 OLESTATUS WINAPI OleSetHostNames(LPOLEOBJECT oleob,LPCSTR name1,LPCSTR name2) {
187 FIXME("(%p,%s,%s): stub\n",oleob,name1,name2);
188 return OLE_OK;
191 /******************************************************************************
192 * OleQueryType16 [OLECLI.14]
194 OLESTATUS WINAPI OleQueryType16(LPOLEOBJECT oleob, SEGPTR xlong) {
195 FIXME("(%p, %p): stub!\n",
196 PTR_SEG_TO_LIN(oleob), PTR_SEG_TO_LIN(xlong));
197 return OLE_OK;
200 /******************************************************************************
201 * OleQueryType32 [OLECLI32.14]
203 OLESTATUS WINAPI OleQueryType(LPOLEOBJECT oleob,LONG*xlong) {
204 FIXME("(%p,%p): stub!\n",oleob,xlong);
205 if (!oleob)
206 return 0x10;
207 TRACE("Calling OLEOBJECT.QueryType (%p) (%p,%p)\n",
208 oleob->lpvtbl->QueryType,oleob,xlong);
209 return oleob->lpvtbl->QueryType(oleob,xlong);
212 /******************************************************************************
213 * OleCreateFromClip16 [OLECLI.12]
215 OLESTATUS WINAPI OleCreateFromClip16(
216 LPCSTR name, LPOLECLIENT olecli, LHCLIENTDOC hclientdoc, LPCSTR xname,
217 LPOLEOBJECT *lpoleob, UINT16 render, UINT16 clipformat
219 FIXME("(%s, %04x:%04x, %ld, %s, %04x:%04x, %d, %d): stub!\n",
220 (char *)PTR_SEG_TO_LIN(name), HIWORD(olecli), LOWORD(olecli),
221 hclientdoc, (char *)PTR_SEG_TO_LIN(xname), HIWORD(lpoleob),
222 LOWORD(lpoleob), render, clipformat);
223 return OLE_OK;
226 /******************************************************************************
227 * OleCreateFromClip32 [OLECLI32.12]
229 OLESTATUS WINAPI OleCreateFromClip(
230 LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname,
231 LPOLEOBJECT *lpoleob,OLEOPT_RENDER render, OLECLIPFORMAT clipformat
233 FIXME("(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n",
234 name,olecli,hclientdoc,xname,lpoleob,render,clipformat);
235 /* clipb type, object kreieren entsprechend etc. */
236 return OLE_OK;