3369d576faad312eb1da92940b74971be08ccaf3
[reactos.git] / reactos / dll / win32 / atl / atl_main.c
1 /*
2 * Implementation of Active Template Library (atl.dll)
3 *
4 * Copyright 2004 Aric Stewart for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #define COBJMACROS
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winerror.h"
29 #include "wingdi.h"
30 #include "winuser.h"
31 #include "wine/debug.h"
32 #include "objbase.h"
33 #include "objidl.h"
34 #include "ole2.h"
35 #include "atlbase.h"
36 #include "atliface.h"
37 #include "atlwin.h"
38
39 #include "wine/unicode.h"
40
41 WINE_DEFAULT_DEBUG_CHANNEL(atl);
42
43 DECLSPEC_HIDDEN HINSTANCE hInst;
44
45 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
46 {
47 TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
48
49 if (fdwReason == DLL_PROCESS_ATTACH) {
50 DisableThreadLibraryCalls(hinstDLL);
51 hInst = hinstDLL;
52 }
53 return TRUE;
54 }
55
56 #define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
57
58 HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h)
59 {
60 INT i;
61 UINT size;
62
63 //FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h);
64
65 size = pM->cbSize;
66 switch (size)
67 {
68 case ATLVer1Size:
69 case sizeof(_ATL_MODULEW):
70 #ifdef _WIN64
71 case sizeof(_ATL_MODULEW) + sizeof(void *):
72 #endif
73 break;
74 default:
75 WARN("Unknown structure version (size %i)\n",size);
76 return E_INVALIDARG;
77 }
78
79 memset(pM,0,pM->cbSize);
80 pM->cbSize = size;
81 pM->m_hInst = h;
82 pM->m_hInstResource = h;
83 pM->m_hInstTypeLib = h;
84 pM->m_pObjMap = p;
85 pM->m_hHeap = GetProcessHeap();
86
87 InitializeCriticalSection(&pM->u.m_csTypeInfoHolder);
88 InitializeCriticalSection(&pM->m_csWindowCreate);
89 InitializeCriticalSection(&pM->m_csObjMap);
90
91 /* call mains */
92 i = 0;
93 if (pM->m_pObjMap != NULL && size > ATLVer1Size)
94 {
95 while (pM->m_pObjMap[i].pclsid != NULL)
96 {
97 TRACE("Initializing object %i %p\n",i,p[i].pfnObjectMain);
98 if (p[i].pfnObjectMain)
99 p[i].pfnObjectMain(TRUE);
100 i++;
101 }
102 }
103
104 return S_OK;
105 }
106
107 static _ATL_OBJMAP_ENTRYW_V1 *get_objmap_entry( _ATL_MODULEW *mod, unsigned int index )
108 {
109 _ATL_OBJMAP_ENTRYW_V1 *ret;
110
111 if (mod->cbSize == ATLVer1Size)
112 ret = (_ATL_OBJMAP_ENTRYW_V1 *)mod->m_pObjMap + index;
113 else
114 ret = (_ATL_OBJMAP_ENTRYW_V1 *)(mod->m_pObjMap + index);
115
116 if (!ret->pclsid) ret = NULL;
117 return ret;
118 }
119
120 HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex,
121 BSTR *pbstrPath, ITypeLib **ppTypeLib)
122 {
123 HRESULT hRes;
124 OLECHAR path[MAX_PATH+8]; /* leave some space for index */
125
126 TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
127
128 if (!pM)
129 return E_INVALIDARG;
130
131 GetModuleFileNameW(pM->m_hInstTypeLib, path, MAX_PATH);
132 if (lpszIndex)
133 lstrcatW(path, lpszIndex);
134
135 hRes = LoadTypeLib(path, ppTypeLib);
136 if (FAILED(hRes))
137 return hRes;
138
139 *pbstrPath = SysAllocString(path);
140
141 return S_OK;
142 }
143
144 HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM)
145 {
146 _ATL_TERMFUNC_ELEM *iter = pM->m_pTermFuncs, *tmp;
147
148 TRACE("(%p)\n", pM);
149
150 while(iter) {
151 iter->pFunc(iter->dw);
152 tmp = iter;
153 iter = iter->pNext;
154 HeapFree(GetProcessHeap(), 0, tmp);
155 }
156
157 HeapFree(GetProcessHeap(), 0, pM);
158
159 return S_OK;
160 }
161
162 HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw)
163 {
164 _ATL_TERMFUNC_ELEM *termfunc_elem;
165
166 TRACE("(%p %p %ld)\n", pM, pFunc, dw);
167
168 termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
169 termfunc_elem->pFunc = pFunc;
170 termfunc_elem->dw = dw;
171 termfunc_elem->pNext = pM->m_pTermFuncs;
172
173 pM->m_pTermFuncs = termfunc_elem;
174
175 return S_OK;
176 }
177
178 HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW *pM, DWORD dwClsContext,
179 DWORD dwFlags)
180 {
181 _ATL_OBJMAP_ENTRYW_V1 *obj;
182 HRESULT hRes = S_OK;
183 int i=0;
184
185 TRACE("(%p %i %i)\n",pM, dwClsContext, dwFlags);
186
187 if (pM == NULL)
188 return E_INVALIDARG;
189
190 while ((obj = get_objmap_entry( pM, i++ )))
191 {
192 IUnknown* pUnknown;
193 HRESULT rc;
194
195 TRACE("Registering object %i\n",i);
196 if (obj->pfnGetClassObject)
197 {
198 rc = obj->pfnGetClassObject(obj->pfnCreateInstance, &IID_IUnknown,
199 (LPVOID*)&pUnknown);
200 if (SUCCEEDED (rc) )
201 {
202 CoRegisterClassObject(obj->pclsid, pUnknown, dwClsContext,
203 dwFlags, &obj->dwRegister);
204 if (pUnknown)
205 IUnknown_Release(pUnknown);
206 }
207 }
208 }
209
210 return hRes;
211 }
212
213 HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID)
214 {
215 FIXME("(%p, %i, %p) stub\n", pM, bUnRegTypeLib, pCLSID);
216 return S_OK;
217 }
218
219
220 IUnknown* WINAPI AtlComPtrAssign(IUnknown** pp, IUnknown *p)
221 {
222 TRACE("(%p %p)\n", pp, p);
223
224 if (p) IUnknown_AddRef(p);
225 if (*pp) IUnknown_Release(*pp);
226 *pp = p;
227 return p;
228 }
229
230 IUnknown* WINAPI AtlComQIPtrAssign(IUnknown** pp, IUnknown *p, REFIID riid)
231 {
232 IUnknown *new_p = NULL;
233
234 TRACE("(%p %p %s)\n", pp, p, debugstr_guid(riid));
235
236 if (p) IUnknown_QueryInterface(p, riid, (void **)&new_p);
237 if (*pp) IUnknown_Release(*pp);
238 *pp = new_p;
239 return new_p;
240 }
241
242
243 HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, void** ppvObject)
244 {
245 int i = 0;
246 HRESULT rc = E_NOINTERFACE;
247 TRACE("(%p, %p, %s, %p)\n",this, pEntries, debugstr_guid(iid), ppvObject);
248
249 if (IsEqualGUID(iid,&IID_IUnknown))
250 {
251 TRACE("Returning IUnknown\n");
252 *ppvObject = ((LPSTR)this+pEntries[0].dw);
253 IUnknown_AddRef((IUnknown*)*ppvObject);
254 return S_OK;
255 }
256
257 while (pEntries[i].pFunc != 0)
258 {
259 TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid),
260 pEntries[i].dw, pEntries[i].pFunc);
261
262 if (!pEntries[i].piid || IsEqualGUID(iid,pEntries[i].piid))
263 {
264 TRACE("MATCH\n");
265 if (pEntries[i].pFunc == (_ATL_CREATORARGFUNC*)1)
266 {
267 TRACE("Offset\n");
268 *ppvObject = ((LPSTR)this+pEntries[i].dw);
269 IUnknown_AddRef((IUnknown*)*ppvObject);
270 return S_OK;
271 }
272 else
273 {
274 TRACE("Function\n");
275 rc = pEntries[i].pFunc(this, iid, ppvObject, pEntries[i].dw);
276 if(rc==S_OK || pEntries[i].piid)
277 return rc;
278 }
279 }
280 i++;
281 }
282 TRACE("Done returning (0x%x)\n",rc);
283 return rc;
284 }
285
286 /***********************************************************************
287 * AtlModuleRegisterServer [ATL.@]
288 *
289 */
290 HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* clsid)
291 {
292 const _ATL_OBJMAP_ENTRYW_V1 *obj;
293 int i;
294 HRESULT hRes;
295
296 TRACE("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid));
297
298 if (pM == NULL)
299 return E_INVALIDARG;
300
301 for (i = 0; (obj = get_objmap_entry( pM, i )) != NULL; i++) /* register CLSIDs */
302 {
303 if (!clsid || IsEqualCLSID(obj->pclsid, clsid))
304 {
305 TRACE("Registering clsid %s\n", debugstr_guid(obj->pclsid));
306 hRes = obj->pfnUpdateRegistry(TRUE); /* register */
307 if (FAILED(hRes))
308 return hRes;
309 }
310 }
311
312 if (bRegTypeLib)
313 {
314 hRes = AtlModuleRegisterTypeLib(pM, NULL);
315 if (FAILED(hRes))
316 return hRes;
317 }
318
319 return S_OK;
320 }
321
322 /***********************************************************************
323 * AtlAdvise [ATL.@]
324 */
325 HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, LPDWORD pdw)
326 {
327 FIXME("%p %p %p %p\n", pUnkCP, pUnk, iid, pdw);
328 return E_FAIL;
329 }
330
331 /***********************************************************************
332 * AtlUnadvise [ATL.@]
333 */
334 HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
335 {
336 FIXME("%p %p %d\n", pUnkCP, iid, dw);
337 return S_OK;
338 }
339
340 /***********************************************************************
341 * AtlFreeMarshalStream [ATL.@]
342 */
343 HRESULT WINAPI AtlFreeMarshalStream(IStream *stm)
344 {
345 FIXME("%p\n", stm);
346 return S_OK;
347 }
348
349 /***********************************************************************
350 * AtlMarshalPtrInProc [ATL.@]
351 */
352 HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **pstm)
353 {
354 FIXME("%p %p %p\n", pUnk, iid, pstm);
355 return E_FAIL;
356 }
357
358 /***********************************************************************
359 * AtlUnmarshalPtr [ATL.@]
360 */
361 HRESULT WINAPI AtlUnmarshalPtr(IStream *stm, const IID *iid, IUnknown **ppUnk)
362 {
363 FIXME("%p %p %p\n", stm, iid, ppUnk);
364 return E_FAIL;
365 }
366
367 /***********************************************************************
368 * AtlModuleGetClassObject [ATL.@]
369 */
370 HRESULT WINAPI AtlModuleGetClassObject(_ATL_MODULEW *pm, REFCLSID rclsid,
371 REFIID riid, LPVOID *ppv)
372 {
373 _ATL_OBJMAP_ENTRYW_V1 *obj;
374 int i;
375 HRESULT hres = CLASS_E_CLASSNOTAVAILABLE;
376
377 TRACE("%p %s %s %p\n", pm, debugstr_guid(rclsid), debugstr_guid(riid), ppv);
378
379 if (pm == NULL)
380 return E_INVALIDARG;
381
382 for (i = 0; (obj = get_objmap_entry( pm, i )) != NULL; i++)
383 {
384 if (IsEqualCLSID(obj->pclsid, rclsid))
385 {
386 TRACE("found object %i\n", i);
387 if (obj->pfnGetClassObject)
388 {
389 if (!obj->pCF)
390 hres = obj->pfnGetClassObject(obj->pfnCreateInstance,
391 &IID_IUnknown,
392 (void **)&obj->pCF);
393 if (obj->pCF)
394 hres = IUnknown_QueryInterface(obj->pCF, riid, ppv);
395 break;
396 }
397 }
398 }
399
400 WARN("no class object found for %s\n", debugstr_guid(rclsid));
401
402 return hres;
403 }
404
405 /***********************************************************************
406 * AtlModuleGetClassObject [ATL.@]
407 */
408 HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pm, LPCOLESTR lpszIndex)
409 {
410 HRESULT hRes;
411 BSTR path;
412 ITypeLib *typelib;
413
414 TRACE("%p %s\n", pm, debugstr_w(lpszIndex));
415
416 if (!pm)
417 return E_INVALIDARG;
418
419 hRes = AtlModuleLoadTypeLib(pm, lpszIndex, &path, &typelib);
420
421 if (SUCCEEDED(hRes))
422 {
423 hRes = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
424 ITypeLib_Release(typelib);
425 SysFreeString(path);
426 }
427
428 return hRes;
429 }
430
431 /***********************************************************************
432 * AtlModuleRevokeClassObjects [ATL.@]
433 */
434 HRESULT WINAPI AtlModuleRevokeClassObjects(_ATL_MODULEW *pm)
435 {
436 FIXME("%p\n", pm);
437 return E_FAIL;
438 }
439
440 /***********************************************************************
441 * AtlModuleUnregisterServer [ATL.@]
442 */
443 HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pm, const CLSID *clsid)
444 {
445 FIXME("%p %s\n", pm, debugstr_guid(clsid));
446 return E_FAIL;
447 }
448
449 /***********************************************************************
450 * AtlModuleRegisterWndClassInfoA [ATL.@]
451 *
452 * See AtlModuleRegisterWndClassInfoW.
453 */
454 ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc)
455 {
456 ATOM atom;
457
458 FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
459
460 atom = wci->m_atom;
461 if (!atom)
462 {
463 WNDCLASSEXA wc;
464
465 TRACE("wci->m_wc.lpszClassName = %s\n", wci->m_wc.lpszClassName);
466
467 if (wci->m_lpszOrigName)
468 FIXME( "subclassing %s not implemented\n", debugstr_a(wci->m_lpszOrigName));
469
470 if (!wci->m_wc.lpszClassName)
471 {
472 snprintf(wci->m_szAutoName, sizeof(wci->m_szAutoName), "ATL%08lx", (UINT_PTR)wci);
473 TRACE("auto-generated class name %s\n", wci->m_szAutoName);
474 wci->m_wc.lpszClassName = wci->m_szAutoName;
475 }
476
477 atom = GetClassInfoExA(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
478 if (!atom)
479 {
480 wci->m_wc.hInstance = pm->m_hInst;
481 wci->m_wc.hCursor = LoadCursorA( wci->m_bSystemCursor ? NULL : pm->m_hInst,
482 wci->m_lpszCursorID );
483 atom = RegisterClassExA(&wci->m_wc);
484 }
485 wci->pWndProc = wci->m_wc.lpfnWndProc;
486 wci->m_atom = atom;
487 }
488
489 if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
490
491 TRACE("returning 0x%04x\n", atom);
492 return atom;
493 }
494
495 /***********************************************************************
496 * AtlModuleRegisterWndClassInfoW [ATL.@]
497 *
498 * PARAMS
499 * pm [IO] Information about the module registering the window.
500 * wci [IO] Information about the window being registered.
501 * pProc [O] Window procedure of the registered class.
502 *
503 * RETURNS
504 * Atom representing the registered class.
505 *
506 * NOTES
507 * Can be called multiple times without error, unlike RegisterClassEx().
508 *
509 * If the class name is NULL, then a class with a name of "ATLxxxxxxxx" is
510 * registered, where the 'x's represent a unique value.
511 *
512 */
513 ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc)
514 {
515 ATOM atom;
516
517 FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
518
519 atom = wci->m_atom;
520 if (!atom)
521 {
522 WNDCLASSEXW wc;
523
524 TRACE("wci->m_wc.lpszClassName = %s\n", debugstr_w(wci->m_wc.lpszClassName));
525
526 if (wci->m_lpszOrigName)
527 FIXME( "subclassing %s not implemented\n", debugstr_w(wci->m_lpszOrigName));
528
529 if (!wci->m_wc.lpszClassName)
530 {
531 static const WCHAR szFormat[] = {'A','T','L','%','0','8','l','x',0};
532 snprintfW(wci->m_szAutoName, sizeof(wci->m_szAutoName)/sizeof(WCHAR), szFormat, (UINT_PTR)wci);
533 TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
534 wci->m_wc.lpszClassName = wci->m_szAutoName;
535 }
536
537 atom = GetClassInfoExW(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
538 if (!atom)
539 {
540 wci->m_wc.hInstance = pm->m_hInst;
541 wci->m_wc.hCursor = LoadCursorW( wci->m_bSystemCursor ? NULL : pm->m_hInst,
542 wci->m_lpszCursorID );
543 atom = RegisterClassExW(&wci->m_wc);
544 }
545 wci->pWndProc = wci->m_wc.lpfnWndProc;
546 wci->m_atom = atom;
547 }
548
549 if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
550
551 TRACE("returning 0x%04x\n", atom);
552 return atom;
553 }
554
555 void WINAPI AtlHiMetricToPixel(const SIZEL* lpHiMetric, SIZEL* lpPix)
556 {
557 HDC dc = GetDC(NULL);
558 lpPix->cx = lpHiMetric->cx * GetDeviceCaps( dc, LOGPIXELSX ) / 100;
559 lpPix->cy = lpHiMetric->cy * GetDeviceCaps( dc, LOGPIXELSY ) / 100;
560 ReleaseDC( NULL, dc );
561 }
562
563 void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric)
564 {
565 HDC dc = GetDC(NULL);
566 lpHiMetric->cx = 100 * lpPix->cx / GetDeviceCaps( dc, LOGPIXELSX );
567 lpHiMetric->cy = 100 * lpPix->cy / GetDeviceCaps( dc, LOGPIXELSY );
568 ReleaseDC( NULL, dc );
569 }
570
571 /***********************************************************************
572 * AtlCreateTargetDC [ATL.@]
573 */
574 HDC WINAPI AtlCreateTargetDC( HDC hdc, DVTARGETDEVICE *dv )
575 {
576 static const WCHAR displayW[] = {'d','i','s','p','l','a','y',0};
577 const WCHAR *driver = NULL, *device = NULL, *port = NULL;
578 DEVMODEW *devmode = NULL;
579
580 TRACE( "(%p, %p)\n", hdc, dv );
581
582 if (dv)
583 {
584 if (dv->tdDriverNameOffset) driver = (WCHAR *)((char *)dv + dv->tdDriverNameOffset);
585 if (dv->tdDeviceNameOffset) device = (WCHAR *)((char *)dv + dv->tdDeviceNameOffset);
586 if (dv->tdPortNameOffset) port = (WCHAR *)((char *)dv + dv->tdPortNameOffset);
587 if (dv->tdExtDevmodeOffset) devmode = (DEVMODEW *)((char *)dv + dv->tdExtDevmodeOffset);
588 }
589 else
590 {
591 if (hdc) return hdc;
592 driver = displayW;
593 }
594 return CreateDCW( driver, device, port, devmode );
595 }
596
597 /***********************************************************************
598 * AtlModuleAddCreateWndData [ATL.@]
599 */
600 void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, void* pvObject)
601 {
602 TRACE("(%p, %p, %p)\n", pM, pData, pvObject);
603
604 pData->m_pThis = pvObject;
605 pData->m_dwThreadID = GetCurrentThreadId();
606 pData->m_pNext = pM->m_pCreateWndList;
607 pM->m_pCreateWndList = pData;
608 }
609
610 /***********************************************************************
611 * AtlModuleExtractCreateWndData [ATL.@]
612 *
613 * NOTE: I failed to find any good description of this function.
614 * Tests show that this function extracts one of _AtlCreateWndData
615 * records from the current thread from a list
616 *
617 */
618 void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
619 {
620 _AtlCreateWndData **ppData;
621
622 TRACE("(%p)\n", pM);
623
624 for(ppData = &pM->m_pCreateWndList; *ppData!=NULL; ppData = &(*ppData)->m_pNext)
625 {
626 if ((*ppData)->m_dwThreadID == GetCurrentThreadId())
627 {
628 _AtlCreateWndData *pData = *ppData;
629 *ppData = pData->m_pNext;
630 return pData->m_pThis;
631 }
632 }
633 return NULL;
634 }
635
636 /* FIXME: should be in a header file */
637 typedef struct ATL_PROPMAP_ENTRY
638 {
639 LPCOLESTR szDesc;
640 DISPID dispid;
641 const CLSID* pclsidPropPage;
642 const IID* piidDispatch;
643 DWORD dwOffsetData;
644 DWORD dwSizeData;
645 VARTYPE vt;
646 } ATL_PROPMAP_ENTRY;
647
648 /***********************************************************************
649 * AtlIPersistStreamInit_Load [ATL.@]
650 */
651 HRESULT WINAPI AtlIPersistStreamInit_Load( LPSTREAM pStm, ATL_PROPMAP_ENTRY *pMap,
652 void *pThis, IUnknown *pUnk)
653 {
654 FIXME("(%p, %p, %p, %p)\n", pStm, pMap, pThis, pUnk);
655
656 return S_OK;
657 }
658
659 HRESULT WINAPI AtlIPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty,
660 ATL_PROPMAP_ENTRY *pMap, void *pThis,
661 IUnknown *pUnk)
662 {
663 FIXME("(%p, %d, %p, %p, %p)\n", pStm, fClearDirty, pMap, pThis, pUnk);
664
665 return S_OK;
666 }