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