Release 20030408.
[wine/gsoc-2012-control.git] / dlls / ole32 / ole2stubs.c
blobc865f8e0cdd5c4edf55041415600184d78fe9b2c
1 /*
2 * Temporary place for ole2 stubs.
4 * Copyright (C) 1999 Corel Corporation
5 * Move these functions to dlls/ole32/ole2impl.c when you implement them.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #define NONAMELESSUNION
23 #define NONAMELESSSTRUCT
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "ole2.h"
28 #include "objidl.h"
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(ole);
33 /******************************************************************************
34 * OleCreateLinkToFile [OLE32.96]
36 HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid,
37 DWORD renderopt, LPFORMATETC lpFormatEtc,
38 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
40 FIXME("(%p,%p,%li,%p,%p,%p,%p), stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
41 return E_NOTIMPL;
45 /******************************************************************************
46 * OleDuplicateData [OLE32.102]
48 HRESULT WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat,
49 UINT uiFlags)
51 FIXME("(%p,%x,%x), stub!\n", hSrc, cfFormat, uiFlags);
52 return E_NOTIMPL;
56 /***********************************************************************
57 * WriteFmtUserTypeStg (OLE32.160)
59 HRESULT WINAPI WriteFmtUserTypeStg(
60 LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType)
62 FIXME("(%p,%x,%s) stub!\n",pstg,cf,debugstr_w(lpszUserType));
63 return E_NOTIMPL;
66 /***********************************************************************
67 * OleTranslateAccelerator [OLE32.130]
69 HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame,
70 LPOLEINPLACEFRAMEINFO lpFrameInfo, LPMSG lpmsg)
72 FIXME("(%p,%p,%p),stub!\n", lpFrame, lpFrameInfo, lpmsg);
73 return S_OK;
76 /******************************************************************************
77 * SetConvertStg [OLE32.142]
79 HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert)
81 FIXME("(%p,%x), stub!\n", pStg, fConvert);
82 return E_NOTIMPL;
85 /******************************************************************************
86 * OleCreate [OLE32.89]
89 HRESULT WINAPI OleCreate(
90 REFCLSID rclsid,
91 REFIID riid,
92 DWORD renderopt,
93 LPFORMATETC pFormatEtc,
94 LPOLECLIENTSITE pClientSite,
95 LPSTORAGE pStg,
96 LPVOID* ppvObj)
98 HRESULT hres, hres1;
99 IUnknown * pUnk = NULL;
101 FIXME("\n\t%s\n\t%s stub!\n", debugstr_guid(rclsid), debugstr_guid(riid));
103 if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER , riid, (LPVOID*)&pUnk))))
105 if (pClientSite)
107 IOleObject * pOE;
108 IPersistStorage * pPS;
109 if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IOleObject, (LPVOID*)&pOE))))
111 TRACE("trying to set clientsite %p\n", pClientSite);
112 hres1 = IOleObject_SetClientSite(pOE, pClientSite);
113 TRACE("-- result 0x%08lx\n", hres1);
114 IOleObject_Release(pOE);
116 if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IPersistStorage, (LPVOID*)&pPS))))
118 TRACE("trying to set stg %p\n", pStg);
119 hres1 = IPersistStorage_InitNew(pPS, pStg);
120 TRACE("-- result 0x%08lx\n", hres1);
121 IPersistStorage_Release(pPS);
126 *ppvObj = pUnk;
128 TRACE("-- %p \n", pUnk);
129 return hres;
132 /******************************************************************************
133 * OleCreateLink [OLE32.94]
135 HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
136 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
138 FIXME("(not shown), stub!\n");
139 return E_NOTIMPL;
142 /******************************************************************************
143 * OleCreateFromFile [OLE32.93]
145 HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid,
146 DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
148 FIXME("(not shown), stub!\n");
149 return E_NOTIMPL;
153 /******************************************************************************
154 * OleGetIconOfClass [OLE32.106]
156 HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel)
158 FIXME("(%p,%p,%x), stub!\n", rclsid, lpszLabel, fUseTypeAsLabel);
159 return NULL;
162 /******************************************************************************
163 * ReadFmtUserTypeStg [OLE32.136]
165 HRESULT WINAPI ReadFmtUserTypeStg (LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType)
167 FIXME("(%p,%p,%p), stub!\n", pstg, pcf, lplpszUserType);
168 return E_NOTIMPL;
171 /******************************************************************************
172 * OleCreateStaticFromData [OLE32.98]
174 HRESULT WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
175 DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
176 LPSTORAGE pStg, LPVOID* ppvObj)
178 FIXME("(not shown), stub!\n");
179 return E_NOTIMPL;
182 /******************************************************************************
183 * OleCreateLinkFromData [OLE32.95]
186 HRESULT WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid,
187 DWORD renderopt, LPFORMATETC pFormatEtc,
188 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
189 LPVOID* ppvObj)
191 FIXME("(not shown), stub!\n");
192 return E_NOTIMPL;
195 /******************************************************************************
196 * OleIsRunning [OLE32.111]
198 BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject)
200 FIXME("(%p), stub!\n", pObject);
201 return TRUE;
204 /***********************************************************************
205 * OleRegEnumVerbs [OLE32.120]
207 HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
209 FIXME("(%p,%p), stub!\n", clsid, ppenum);
210 return OLEOBJ_E_NOVERBS;
213 /***********************************************************************
214 * OleRegEnumFormatEtc [OLE32.119]
216 HRESULT WINAPI OleRegEnumFormatEtc (
217 REFCLSID clsid,
218 DWORD dwDirection,
219 LPENUMFORMATETC* ppenumFormatetc)
221 FIXME("(%p, %ld, %p), stub!\n", clsid, dwDirection, ppenumFormatetc);
223 return E_NOTIMPL;
226 /***********************************************************************
227 * PropVariantClear [OLE32.166]
229 HRESULT WINAPI PropVariantClear(PROPVARIANT * pvar) /* [in/out] FIXME: PROPVARIANT * */
231 TRACE("(%p)\n", pvar);
233 if (!pvar)
234 return S_OK;
236 switch(pvar->vt)
238 case VT_BSTR:
239 CoTaskMemFree(pvar->u.bstrVal);
240 break;
241 case VT_STREAM:
242 case VT_STREAMED_OBJECT:
243 case VT_STORAGE:
244 case VT_STORED_OBJECT:
245 IUnknown_Release((LPUNKNOWN)pvar->u.pStream);
246 break;
247 case VT_CLSID:
248 case VT_CF:
249 case VT_LPSTR:
250 case VT_LPWSTR:
251 case VT_BLOB:
252 case VT_BLOB_OBJECT:
253 FIXME("Don't know what to do for variant type %d\n", pvar->vt);
254 default:
255 if (pvar->vt && VT_VECTOR)
257 FIXME("Need to recursively destroy elements in vector\n");
258 /* SafeArrayDestroy(pvar->u.caub); */
262 ZeroMemory(pvar, sizeof(PROPVARIANT));
264 return S_OK;
267 /***********************************************************************
268 * PropVariantCopy [OLE32.246]
270 HRESULT WINAPI PropVariantCopy(void *pvarDest, /* [out] FIXME: PROPVARIANT * */
271 const void *pvarSrc) /* [in] FIXME: const PROPVARIANT * */
273 FIXME("(%p, %p): stub:\n", pvarDest, pvarSrc);
275 return E_NOTIMPL;
278 /***********************************************************************
279 * FreePropVariantArray [OLE32.195]
281 HRESULT WINAPI FreePropVariantArray(ULONG cVariants, /* [in] */
282 void *rgvars) /* [in/out] FIXME: PROPVARIANT * */
284 FIXME("(%lu, %p): stub:\n", cVariants, rgvars);
286 return E_NOTIMPL;
289 /***********************************************************************
290 * CoIsOle1Class [OLE32.29]
292 BOOL WINAPI CoIsOle1Class(REFCLSID clsid)
294 FIXME("%s\n", debugstr_guid(clsid));
295 return FALSE;
298 /***********************************************************************
299 * DllGetClassObject [OLE2.4]
301 HRESULT WINAPI DllGetClassObject16(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
303 FIXME("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
304 return E_NOTIMPL;
307 /***********************************************************************
308 * OleSetClipboard [OLE2.49]
310 HRESULT WINAPI OleSetClipboard16(IDataObject* pDataObj)
312 FIXME("(%p): stub\n", pDataObj);
313 return S_OK;
316 /***********************************************************************
317 * OleGetClipboard [OLE2.50]
319 HRESULT WINAPI OleGetClipboard16(IDataObject** ppDataObj)
321 FIXME("(%p): stub\n", ppDataObj);
322 return E_NOTIMPL;