| 1 | /* | 
|---|
| 2 | * Temporary place for ole2 stubs. | 
|---|
| 3 | * | 
|---|
| 4 | * Copyright (C) 1999 Corel Corporation | 
|---|
| 5 | * Move these functions to dlls/ole32/ole2impl.c when you implement them. | 
|---|
| 6 | * | 
|---|
| 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. | 
|---|
| 11 | * | 
|---|
| 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. | 
|---|
| 16 | * | 
|---|
| 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 | 
|---|
| 20 | */ | 
|---|
| 21 |  | 
|---|
| 22 | #include "windef.h" | 
|---|
| 23 | #include "winbase.h" | 
|---|
| 24 | #include "winuser.h" | 
|---|
| 25 | #include "ole2.h" | 
|---|
| 26 | #include "wine/debug.h" | 
|---|
| 27 |  | 
|---|
| 28 | WINE_DEFAULT_DEBUG_CHANNEL(ole); | 
|---|
| 29 |  | 
|---|
| 30 | /****************************************************************************** | 
|---|
| 31 | *               OleCreateLinkToFile        [OLE32.96] | 
|---|
| 32 | */ | 
|---|
| 33 | HRESULT WINAPI  OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, | 
|---|
| 34 | DWORD renderopt, LPFORMATETC lpFormatEtc, | 
|---|
| 35 | LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj) | 
|---|
| 36 | { | 
|---|
| 37 | FIXME("(%p,%p,%li,%p,%p,%p,%p), stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj); | 
|---|
| 38 | return E_NOTIMPL; | 
|---|
| 39 | } | 
|---|
| 40 |  | 
|---|
| 41 |  | 
|---|
| 42 | /****************************************************************************** | 
|---|
| 43 | *              OleDuplicateData        [OLE32.102] | 
|---|
| 44 | */ | 
|---|
| 45 | HRESULT WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, | 
|---|
| 46 | UINT uiFlags) | 
|---|
| 47 | { | 
|---|
| 48 | FIXME("(%x,%x,%x), stub!\n", hSrc, cfFormat, uiFlags); | 
|---|
| 49 | return E_NOTIMPL; | 
|---|
| 50 | } | 
|---|
| 51 |  | 
|---|
| 52 |  | 
|---|
| 53 | /*********************************************************************** | 
|---|
| 54 | *               WriteFmtUserTypeStg (OLE32.160) | 
|---|
| 55 | */ | 
|---|
| 56 | HRESULT WINAPI WriteFmtUserTypeStg( | 
|---|
| 57 | LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType) | 
|---|
| 58 | { | 
|---|
| 59 | FIXME("(%p,%x,%s) stub!\n",pstg,cf,debugstr_w(lpszUserType)); | 
|---|
| 60 | return E_NOTIMPL; | 
|---|
| 61 | } | 
|---|
| 62 |  | 
|---|
| 63 | /*********************************************************************** | 
|---|
| 64 | *             OleTranslateAccelerator [OLE32.130] | 
|---|
| 65 | */ | 
|---|
| 66 | HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, | 
|---|
| 67 | LPOLEINPLACEFRAMEINFO lpFrameInfo, LPMSG lpmsg) | 
|---|
| 68 | { | 
|---|
| 69 | FIXME("(%p,%p,%p),stub!\n", lpFrame, lpFrameInfo, lpmsg); | 
|---|
| 70 | return S_OK; | 
|---|
| 71 | } | 
|---|
| 72 |  | 
|---|
| 73 | /****************************************************************************** | 
|---|
| 74 | *              SetConvertStg        [OLE32.142] | 
|---|
| 75 | */ | 
|---|
| 76 | HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert) | 
|---|
| 77 | { | 
|---|
| 78 | FIXME("(%p,%x), stub!\n", pStg, fConvert); | 
|---|
| 79 | return E_NOTIMPL; | 
|---|
| 80 | } | 
|---|
| 81 |  | 
|---|
| 82 | /****************************************************************************** | 
|---|
| 83 | *              OleCreate        [OLE32.89] | 
|---|
| 84 | * | 
|---|
| 85 | */ | 
|---|
| 86 | HRESULT WINAPI OleCreate( | 
|---|
| 87 | REFCLSID rclsid, | 
|---|
| 88 | REFIID riid, | 
|---|
| 89 | DWORD renderopt, | 
|---|
| 90 | LPFORMATETC pFormatEtc, | 
|---|
| 91 | LPOLECLIENTSITE pClientSite, | 
|---|
| 92 | LPSTORAGE pStg, | 
|---|
| 93 | LPVOID* ppvObj) | 
|---|
| 94 | { | 
|---|
| 95 | HRESULT hres, hres1; | 
|---|
| 96 | IUnknown * pUnk = NULL; | 
|---|
| 97 |  | 
|---|
| 98 | FIXME("\n\t%s\n\t%s stub!\n", debugstr_guid(rclsid), debugstr_guid(riid)); | 
|---|
| 99 |  | 
|---|
| 100 | if (SUCCEEDED((hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER, riid, (LPVOID*)&pUnk)))) | 
|---|
| 101 | { | 
|---|
| 102 | if (pClientSite) | 
|---|
| 103 | { | 
|---|
| 104 | IOleObject * pOE; | 
|---|
| 105 | IPersistStorage * pPS; | 
|---|
| 106 | if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IOleObject, (LPVOID*)&pOE)))) | 
|---|
| 107 | { | 
|---|
| 108 | TRACE("trying to set clientsite %p\n", pClientSite); | 
|---|
| 109 | hres1 = IOleObject_SetClientSite(pOE, pClientSite); | 
|---|
| 110 | TRACE("-- result 0x%08lx\n", hres1); | 
|---|
| 111 | IOleObject_Release(pOE); | 
|---|
| 112 | } | 
|---|
| 113 | if (SUCCEEDED((hres = IUnknown_QueryInterface( pUnk, &IID_IPersistStorage, (LPVOID*)&pPS)))) | 
|---|
| 114 | { | 
|---|
| 115 | TRACE("trying to set stg %p\n", pStg); | 
|---|
| 116 | hres1 = IPersistStorage_InitNew(pPS, pStg); | 
|---|
| 117 | TRACE("-- result 0x%08lx\n", hres1); | 
|---|
| 118 | IPersistStorage_Release(pPS); | 
|---|
| 119 | } | 
|---|
| 120 | } | 
|---|
| 121 | } | 
|---|
| 122 |  | 
|---|
| 123 | *ppvObj = pUnk; | 
|---|
| 124 |  | 
|---|
| 125 | TRACE("-- %p \n", pUnk); | 
|---|
| 126 | return hres; | 
|---|
| 127 | } | 
|---|
| 128 |  | 
|---|
| 129 | /****************************************************************************** | 
|---|
| 130 | *              OleCreateLink        [OLE32.94] | 
|---|
| 131 | */ | 
|---|
| 132 | HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc, | 
|---|
| 133 | LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj) | 
|---|
| 134 | { | 
|---|
| 135 | FIXME("(not shown), stub!\n"); | 
|---|
| 136 | return E_NOTIMPL; | 
|---|
| 137 | } | 
|---|
| 138 |  | 
|---|
| 139 | /****************************************************************************** | 
|---|
| 140 | *              OleCreateFromFile        [OLE32.93] | 
|---|
| 141 | */ | 
|---|
| 142 | HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid, | 
|---|
| 143 | DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj) | 
|---|
| 144 | { | 
|---|
| 145 | FIXME("(not shown), stub!\n"); | 
|---|
| 146 | return E_NOTIMPL; | 
|---|
| 147 | } | 
|---|
| 148 |  | 
|---|
| 149 |  | 
|---|
| 150 | /****************************************************************************** | 
|---|
| 151 | *              OleGetIconOfClass        [OLE32.106] | 
|---|
| 152 | */ | 
|---|
| 153 | HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel) | 
|---|
| 154 | { | 
|---|
| 155 | FIXME("(%p,%p,%x), stub!\n", rclsid, lpszLabel, fUseTypeAsLabel); | 
|---|
| 156 | return (HGLOBAL)NULL; | 
|---|
| 157 | } | 
|---|
| 158 |  | 
|---|
| 159 | /****************************************************************************** | 
|---|
| 160 | *              ReadFmtUserTypeStg        [OLE32.136] | 
|---|
| 161 | */ | 
|---|
| 162 | HRESULT WINAPI ReadFmtUserTypeStg (LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType) | 
|---|
| 163 | { | 
|---|
| 164 | FIXME("(%p,%p,%p), stub!\n", pstg, pcf, lplpszUserType); | 
|---|
| 165 | return E_NOTIMPL; | 
|---|
| 166 | } | 
|---|
| 167 |  | 
|---|
| 168 | /****************************************************************************** | 
|---|
| 169 | *              OleCreateStaticFromData        [OLE32.98] | 
|---|
| 170 | */ | 
|---|
| 171 | HRESULT     WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid, | 
|---|
| 172 | DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, | 
|---|
| 173 | LPSTORAGE pStg, LPVOID* ppvObj) | 
|---|
| 174 | { | 
|---|
| 175 | FIXME("(not shown), stub!\n"); | 
|---|
| 176 | return E_NOTIMPL; | 
|---|
| 177 | } | 
|---|
| 178 |  | 
|---|
| 179 | /****************************************************************************** | 
|---|
| 180 | *              OleCreateLinkFromData        [OLE32.95] | 
|---|
| 181 | */ | 
|---|
| 182 |  | 
|---|
| 183 | HRESULT WINAPI  OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, | 
|---|
| 184 | DWORD renderopt, LPFORMATETC pFormatEtc, | 
|---|
| 185 | LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, | 
|---|
| 186 | LPVOID* ppvObj) | 
|---|
| 187 | { | 
|---|
| 188 | FIXME("(not shown), stub!\n"); | 
|---|
| 189 | return E_NOTIMPL; | 
|---|
| 190 | } | 
|---|
| 191 |  | 
|---|
| 192 | /****************************************************************************** | 
|---|
| 193 | *              OleIsRunning        [OLE32.111] | 
|---|
| 194 | */ | 
|---|
| 195 | BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject) | 
|---|
| 196 | { | 
|---|
| 197 | FIXME("(%p), stub!\n", pObject); | 
|---|
| 198 | return TRUE; | 
|---|
| 199 | } | 
|---|
| 200 |  | 
|---|
| 201 | /*********************************************************************** | 
|---|
| 202 | *           OleRegEnumVerbs    [OLE32.120] | 
|---|
| 203 | */ | 
|---|
| 204 | HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum) | 
|---|
| 205 | { | 
|---|
| 206 | FIXME("(%p,%p), stub!\n", clsid, ppenum); | 
|---|
| 207 | return OLEOBJ_E_NOVERBS; | 
|---|
| 208 | } | 
|---|
| 209 |  | 
|---|
| 210 | /*********************************************************************** | 
|---|
| 211 | *           OleRegEnumFormatEtc    [OLE32.119] | 
|---|
| 212 | */ | 
|---|
| 213 | HRESULT     WINAPI OleRegEnumFormatEtc ( | 
|---|
| 214 | REFCLSID clsid, | 
|---|
| 215 | DWORD    dwDirection, | 
|---|
| 216 | LPENUMFORMATETC* ppenumFormatetc) | 
|---|
| 217 | { | 
|---|
| 218 | FIXME("(%p, %ld, %p), stub!\n", clsid, dwDirection, ppenumFormatetc); | 
|---|
| 219 |  | 
|---|
| 220 | return E_NOTIMPL; | 
|---|
| 221 | } | 
|---|
| 222 |  | 
|---|
| 223 | /*********************************************************************** | 
|---|
| 224 | *           PropVariantClear                       [OLE32.166] | 
|---|
| 225 | */ | 
|---|
| 226 | HRESULT WINAPI PropVariantClear(void *pvar) /* [in/out] FIXME: PROPVARIANT * */ | 
|---|
| 227 | { | 
|---|
| 228 | FIXME("(%p): stub:\n", pvar); | 
|---|
| 229 |  | 
|---|
| 230 | *(LPWORD)pvar = 0; | 
|---|
| 231 | /* sets at least the vt field to VT_EMPTY */ | 
|---|
| 232 | return E_NOTIMPL; | 
|---|
| 233 | } | 
|---|
| 234 |  | 
|---|
| 235 | /*********************************************************************** | 
|---|
| 236 | *           PropVariantCopy                        [OLE32.246] | 
|---|
| 237 | */ | 
|---|
| 238 | HRESULT WINAPI PropVariantCopy(void *pvarDest,      /* [out] FIXME: PROPVARIANT * */ | 
|---|
| 239 | const void *pvarSrc) /* [in] FIXME: const PROPVARIANT * */ | 
|---|
| 240 | { | 
|---|
| 241 | FIXME("(%p, %p): stub:\n", pvarDest, pvarSrc); | 
|---|
| 242 |  | 
|---|
| 243 | return E_NOTIMPL; | 
|---|
| 244 | } | 
|---|
| 245 |  | 
|---|
| 246 | /*********************************************************************** | 
|---|
| 247 | *           FreePropVariantArray                           [OLE32.195] | 
|---|
| 248 | */ | 
|---|
| 249 | HRESULT WINAPI FreePropVariantArray(ULONG cVariants, /* [in] */ | 
|---|
| 250 | void *rgvars)    /* [in/out] FIXME: PROPVARIANT * */ | 
|---|
| 251 | { | 
|---|
| 252 | FIXME("(%lu, %p): stub:\n", cVariants, rgvars); | 
|---|
| 253 |  | 
|---|
| 254 | return E_NOTIMPL; | 
|---|
| 255 | } | 
|---|
| 256 |  | 
|---|
| 257 | /*********************************************************************** | 
|---|
| 258 | *           CoIsOle1Class                              [OLE32.29] | 
|---|
| 259 | */ | 
|---|
| 260 | BOOL WINAPI CoIsOle1Class(REFCLSID clsid) | 
|---|
| 261 | { | 
|---|
| 262 | FIXME("%s\n", debugstr_guid(clsid)); | 
|---|
| 263 | return FALSE; | 
|---|
| 264 | } | 
|---|