1e1cf452f79007ea7e289c519c16ea02a931e05f
[reactos.git] / reactos / dll / win32 / ole32 / ole16.c
1 /*
2 * 16 bit ole functions
3 *
4 * Copyright 1995 Martin von Loewis
5 * Copyright 1998 Justin Bradford
6 * Copyright 1999 Francis Beaudet
7 * Copyright 1999 Sylvain St-Germain
8 * Copyright 2002 Marcus Meissner
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25 #include "config.h"
26
27 #include <stdlib.h>
28 #include <stdarg.h>
29 #include <stdio.h>
30 #include <string.h>
31 #include <assert.h>
32
33 #include "windef.h"
34 #include "winbase.h"
35 #include "winuser.h"
36 #include "objbase.h"
37 #include "ole2.h"
38 #include "rpc.h"
39 #include "winerror.h"
40 #include "winreg.h"
41 #include "wownt32.h"
42 #include "wtypes.h"
43 #include "wine/unicode.h"
44 #include "wine/winbase16.h"
45 #include "compobj_private.h"
46 #include "ifs.h"
47
48 #include "wine/debug.h"
49
50 WINE_DEFAULT_DEBUG_CHANNEL(ole);
51
52 static HTASK16 hETask = 0;
53 static WORD Table_ETask[62];
54
55 static LPMALLOC16 currentMalloc16=NULL;
56
57 /* --- IMalloc16 implementation */
58
59
60 typedef struct
61 {
62 /* IUnknown fields */
63 const IMalloc16Vtbl *lpVtbl;
64 DWORD ref;
65 /* IMalloc16 fields */
66 } IMalloc16Impl;
67
68 /******************************************************************************
69 * IMalloc16_QueryInterface [COMPOBJ.500]
70 */
71 HRESULT CDECL IMalloc16_fnQueryInterface(IMalloc16* iface,REFIID refiid,LPVOID *obj) {
72 IMalloc16Impl *This = (IMalloc16Impl *)iface;
73
74 TRACE("(%p)->QueryInterface(%s,%p)\n",This,debugstr_guid(refiid),obj);
75 if ( !memcmp(&IID_IUnknown,refiid,sizeof(IID_IUnknown)) ||
76 !memcmp(&IID_IMalloc,refiid,sizeof(IID_IMalloc))
77 ) {
78 *obj = This;
79 return 0;
80 }
81 return OLE_E_ENUM_NOMORE;
82 }
83
84 /******************************************************************************
85 * IMalloc16_AddRef [COMPOBJ.501]
86 */
87 ULONG CDECL IMalloc16_fnAddRef(IMalloc16* iface) {
88 IMalloc16Impl *This = (IMalloc16Impl *)iface;
89 TRACE("(%p)->AddRef()\n",This);
90 return 1; /* cannot be freed */
91 }
92
93 /******************************************************************************
94 * IMalloc16_Release [COMPOBJ.502]
95 */
96 ULONG CDECL IMalloc16_fnRelease(IMalloc16* iface) {
97 IMalloc16Impl *This = (IMalloc16Impl *)iface;
98 TRACE("(%p)->Release()\n",This);
99 return 1; /* cannot be freed */
100 }
101
102 /******************************************************************************
103 * IMalloc16_Alloc [COMPOBJ.503]
104 */
105 SEGPTR CDECL IMalloc16_fnAlloc(IMalloc16* iface,DWORD cb) {
106 IMalloc16Impl *This = (IMalloc16Impl *)iface;
107 TRACE("(%p)->Alloc(%d)\n",This,cb);
108 return MapLS( HeapAlloc( GetProcessHeap(), 0, cb ) );
109 }
110
111 /******************************************************************************
112 * IMalloc16_Free [COMPOBJ.505]
113 */
114 VOID CDECL IMalloc16_fnFree(IMalloc16* iface,SEGPTR pv)
115 {
116 void *ptr = MapSL(pv);
117 IMalloc16Impl *This = (IMalloc16Impl *)iface;
118 TRACE("(%p)->Free(%08x)\n",This,pv);
119 UnMapLS(pv);
120 HeapFree( GetProcessHeap(), 0, ptr );
121 }
122
123 /******************************************************************************
124 * IMalloc16_Realloc [COMPOBJ.504]
125 */
126 SEGPTR CDECL IMalloc16_fnRealloc(IMalloc16* iface,SEGPTR pv,DWORD cb)
127 {
128 SEGPTR ret;
129 IMalloc16Impl *This = (IMalloc16Impl *)iface;
130 TRACE("(%p)->Realloc(%08x,%d)\n",This,pv,cb);
131 if (!pv)
132 ret = IMalloc16_fnAlloc(iface, cb);
133 else if (cb) {
134 ret = MapLS( HeapReAlloc( GetProcessHeap(), 0, MapSL(pv), cb ) );
135 UnMapLS(pv);
136 } else {
137 IMalloc16_fnFree(iface, pv);
138 ret = 0;
139 }
140 return ret;
141 }
142
143 /******************************************************************************
144 * IMalloc16_GetSize [COMPOBJ.506]
145 */
146 DWORD CDECL IMalloc16_fnGetSize(IMalloc16* iface,SEGPTR pv)
147 {
148 IMalloc16Impl *This = (IMalloc16Impl *)iface;
149 TRACE("(%p)->GetSize(%08x)\n",This,pv);
150 return HeapSize( GetProcessHeap(), 0, MapSL(pv) );
151 }
152
153 /******************************************************************************
154 * IMalloc16_DidAlloc [COMPOBJ.507]
155 */
156 INT16 CDECL IMalloc16_fnDidAlloc(IMalloc16* iface,LPVOID pv) {
157 IMalloc16 *This = iface;
158 TRACE("(%p)->DidAlloc(%p)\n",This,pv);
159 return (INT16)-1;
160 }
161
162 /******************************************************************************
163 * IMalloc16_HeapMinimize [COMPOBJ.508]
164 */
165 LPVOID CDECL IMalloc16_fnHeapMinimize(IMalloc16* iface) {
166 IMalloc16Impl *This = (IMalloc16Impl *)iface;
167 TRACE("(%p)->HeapMinimize()\n",This);
168 return NULL;
169 }
170
171 /******************************************************************************
172 * IMalloc16_Constructor [VTABLE]
173 */
174 static LPMALLOC16
175 IMalloc16_Constructor(void)
176 {
177 static IMalloc16Vtbl vt16;
178 static SEGPTR msegvt16;
179 IMalloc16Impl* This;
180 HMODULE16 hcomp = GetModuleHandle16("COMPOBJ");
181
182 This = HeapAlloc( GetProcessHeap(), 0, sizeof(IMalloc16Impl) );
183 if (!msegvt16)
184 {
185 #define VTENT(x) vt16.x = (void*)GetProcAddress16(hcomp,"IMalloc16_"#x);assert(vt16.x)
186 VTENT(QueryInterface);
187 VTENT(AddRef);
188 VTENT(Release);
189 VTENT(Alloc);
190 VTENT(Realloc);
191 VTENT(Free);
192 VTENT(GetSize);
193 VTENT(DidAlloc);
194 VTENT(HeapMinimize);
195 #undef VTENT
196 msegvt16 = MapLS( &vt16 );
197 }
198 This->lpVtbl = (const IMalloc16Vtbl*)msegvt16;
199 This->ref = 1;
200 return (LPMALLOC16)MapLS( This );
201 }
202
203
204 /***********************************************************************
205 * CoGetMalloc [COMPOBJ.4]
206 *
207 * Retrieve the current win16 IMalloc interface.
208 *
209 * RETURNS
210 * The current win16 IMalloc
211 */
212 HRESULT WINAPI CoGetMalloc16(
213 DWORD dwMemContext, /* [in] unknown */
214 LPMALLOC16 * lpMalloc /* [out] current win16 malloc interface */
215 ) {
216 if(!currentMalloc16)
217 currentMalloc16 = IMalloc16_Constructor();
218 *lpMalloc = currentMalloc16;
219 return S_OK;
220 }
221
222 /***********************************************************************
223 * CoCreateStandardMalloc [COMPOBJ.71]
224 */
225 HRESULT WINAPI CoCreateStandardMalloc16(DWORD dwMemContext,
226 LPMALLOC16 *lpMalloc)
227 {
228 /* FIXME: docu says we shouldn't return the same allocator as in
229 * CoGetMalloc16 */
230 *lpMalloc = IMalloc16_Constructor();
231 return S_OK;
232 }
233
234 /******************************************************************************
235 * CoInitialize [COMPOBJ.2]
236 * Set the win16 IMalloc used for memory management
237 */
238 HRESULT WINAPI CoInitialize16(
239 LPVOID lpReserved /* [in] pointer to win16 malloc interface */
240 ) {
241 currentMalloc16 = (LPMALLOC16)lpReserved;
242 return S_OK;
243 }
244
245 /***********************************************************************
246 * CoUninitialize [COMPOBJ.3]
247 * Don't know what it does.
248 * 3-Nov-98 -- this was originally misspelled, I changed it to what I
249 * believe is the correct spelling
250 */
251 void WINAPI CoUninitialize16(void)
252 {
253 TRACE("()\n");
254 CoFreeAllLibraries();
255 }
256
257 /***********************************************************************
258 * IsEqualGUID [COMPOBJ.18]
259 *
260 * Compares two Unique Identifiers.
261 *
262 * RETURNS
263 * TRUE if equal
264 */
265 BOOL16 WINAPI IsEqualGUID16(
266 GUID* g1, /* [in] unique id 1 */
267 GUID* g2) /* [in] unique id 2 */
268 {
269 return !memcmp( g1, g2, sizeof(GUID) );
270 }
271
272 /******************************************************************************
273 * CLSIDFromString [COMPOBJ.20]
274 * Converts a unique identifier from its string representation into
275 * the GUID struct.
276 *
277 * Class id: DWORD-WORD-WORD-BYTES[2]-BYTES[6]
278 *
279 * RETURNS
280 * the converted GUID
281 */
282 HRESULT WINAPI CLSIDFromString16(
283 LPCOLESTR16 idstr, /* [in] string representation of guid */
284 CLSID *id) /* [out] GUID converted from string */
285 {
286 const BYTE *s;
287 int i;
288 BYTE table[256];
289
290 if (!idstr) {
291 memset( id, 0, sizeof (CLSID) );
292 return S_OK;
293 }
294
295 /* validate the CLSID string */
296 if (strlen(idstr) != 38)
297 return CO_E_CLASSSTRING;
298
299 s = (const BYTE *) idstr;
300 if ((s[0]!='{') || (s[9]!='-') || (s[14]!='-') || (s[19]!='-') || (s[24]!='-') || (s[37]!='}'))
301 return CO_E_CLASSSTRING;
302
303 for (i=1; i<37; i++) {
304 if ((i == 9)||(i == 14)||(i == 19)||(i == 24)) continue;
305 if (!(((s[i] >= '0') && (s[i] <= '9')) ||
306 ((s[i] >= 'a') && (s[i] <= 'f')) ||
307 ((s[i] >= 'A') && (s[i] <= 'F'))))
308 return CO_E_CLASSSTRING;
309 }
310
311 TRACE("%s -> %p\n", s, id);
312
313 /* quick lookup table */
314 memset(table, 0, 256);
315
316 for (i = 0; i < 10; i++) {
317 table['0' + i] = i;
318 }
319 for (i = 0; i < 6; i++) {
320 table['A' + i] = i+10;
321 table['a' + i] = i+10;
322 }
323
324 /* in form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} */
325
326 id->Data1 = (table[s[1]] << 28 | table[s[2]] << 24 | table[s[3]] << 20 | table[s[4]] << 16 |
327 table[s[5]] << 12 | table[s[6]] << 8 | table[s[7]] << 4 | table[s[8]]);
328 id->Data2 = table[s[10]] << 12 | table[s[11]] << 8 | table[s[12]] << 4 | table[s[13]];
329 id->Data3 = table[s[15]] << 12 | table[s[16]] << 8 | table[s[17]] << 4 | table[s[18]];
330
331 /* these are just sequential bytes */
332 id->Data4[0] = table[s[20]] << 4 | table[s[21]];
333 id->Data4[1] = table[s[22]] << 4 | table[s[23]];
334 id->Data4[2] = table[s[25]] << 4 | table[s[26]];
335 id->Data4[3] = table[s[27]] << 4 | table[s[28]];
336 id->Data4[4] = table[s[29]] << 4 | table[s[30]];
337 id->Data4[5] = table[s[31]] << 4 | table[s[32]];
338 id->Data4[6] = table[s[33]] << 4 | table[s[34]];
339 id->Data4[7] = table[s[35]] << 4 | table[s[36]];
340
341 return S_OK;
342 }
343
344 /******************************************************************************
345 * _xmalloc16 [internal]
346 * Allocates size bytes from the standard ole16 allocator.
347 *
348 * RETURNS
349 * the allocated segmented pointer and a HRESULT
350 */
351 static HRESULT
352 _xmalloc16(DWORD size, SEGPTR *ptr) {
353 LPMALLOC16 mllc;
354 DWORD args[2];
355
356 if (CoGetMalloc16(0,&mllc))
357 return E_OUTOFMEMORY;
358
359 args[0] = (DWORD)mllc;
360 args[1] = size;
361 /* No need for a Callback entry, we have WOWCallback16Ex which does
362 * everything we need.
363 */
364 if (!WOWCallback16Ex(
365 (DWORD)((const IMalloc16Vtbl*)MapSL(
366 (SEGPTR)((LPMALLOC16)MapSL((SEGPTR)mllc))->lpVtbl )
367 )->Alloc,
368 WCB16_CDECL,
369 2*sizeof(DWORD),
370 (LPVOID)args,
371 (LPDWORD)ptr
372 )) {
373 ERR("CallTo16 IMalloc16 (%d) failed\n",size);
374 return E_FAIL;
375 }
376 return S_OK;
377 }
378
379 /******************************************************************************
380 * StringFromCLSID [COMPOBJ.19]
381 * Converts a GUID into the respective string representation.
382 * The target string is allocated using the OLE IMalloc.
383 *
384 * RETURNS
385 * the string representation and HRESULT
386 */
387
388 HRESULT WINAPI StringFromCLSID16(
389 REFCLSID id, /* [in] the GUID to be converted */
390 LPOLESTR16 *idstr /* [out] a pointer to a to-be-allocated segmented pointer pointing to the resulting string */
391
392 ) {
393 HRESULT ret;
394
395 ret = _xmalloc16(40,(SEGPTR*)idstr);
396 if (ret != S_OK)
397 return ret;
398 return WINE_StringFromCLSID(id,MapSL((SEGPTR)*idstr));
399 }
400
401 /******************************************************************************
402 * ProgIDFromCLSID [COMPOBJ.62]
403 *
404 * Converts a class id into the respective Program ID. (By using a registry lookup)
405 *
406 * RETURNS
407 * S_OK on success
408 * riid associated with the progid
409 */
410 HRESULT WINAPI ProgIDFromCLSID16(
411 REFCLSID clsid, /* [in] class id as found in registry */
412 LPOLESTR16 *lplpszProgID/* [out] associated Program ID */
413 ) {
414 static const WCHAR wszProgID[] = {'P','r','o','g','I','D',0};
415 HKEY hkey;
416 HRESULT ret;
417 LONG len;
418 char *buffer;
419
420 ret = COM_OpenKeyForCLSID(clsid, wszProgID, KEY_READ, &hkey);
421 if (FAILED(ret))
422 return ret;
423
424 if (RegQueryValueA(hkey, NULL, NULL, &len))
425 ret = REGDB_E_READREGDB;
426
427 if (ret == S_OK)
428 {
429 buffer = HeapAlloc(GetProcessHeap(), 0, len);
430 if (RegQueryValueA(hkey, NULL, buffer, &len))
431 ret = REGDB_E_READREGDB;
432
433 if (ret == S_OK)
434 {
435 ret = _xmalloc16(len, (SEGPTR*)lplpszProgID);
436 if (ret == S_OK)
437 strcpy(MapSL((SEGPTR)*lplpszProgID),buffer);
438 }
439 HeapFree(GetProcessHeap(), 0, buffer);
440 }
441 RegCloseKey(hkey);
442 return ret;
443 }
444
445 /***********************************************************************
446 * LookupETask (COMPOBJ.94)
447 */
448 HRESULT WINAPI LookupETask16(HTASK16 *hTask,LPVOID p) {
449 FIXME("(%p,%p),stub!\n",hTask,p);
450 if ((*hTask = GetCurrentTask()) == hETask) {
451 memcpy(p, Table_ETask, sizeof(Table_ETask));
452 }
453 return 0;
454 }
455
456 /***********************************************************************
457 * SetETask (COMPOBJ.95)
458 */
459 HRESULT WINAPI SetETask16(HTASK16 hTask, LPVOID p) {
460 FIXME("(%04x,%p),stub!\n",hTask,p);
461 hETask = hTask;
462 return 0;
463 }
464
465 /***********************************************************************
466 * CALLOBJECTINWOW (COMPOBJ.201)
467 */
468 HRESULT WINAPI CallObjectInWOW(LPVOID p1,LPVOID p2) {
469 FIXME("(%p,%p),stub!\n",p1,p2);
470 return 0;
471 }
472
473 /******************************************************************************
474 * CoRegisterClassObject [COMPOBJ.5]
475 *
476 * Don't know where it registers it ...
477 */
478 HRESULT WINAPI CoRegisterClassObject16(
479 REFCLSID rclsid,
480 LPUNKNOWN pUnk,
481 DWORD dwClsContext, /* [in] CLSCTX flags indicating the context in which to run the executable */
482 DWORD flags, /* [in] REGCLS flags indicating how connections are made */
483 LPDWORD lpdwRegister
484 ) {
485 FIXME("(%s,%p,0x%08x,0x%08x,%p),stub\n",
486 debugstr_guid(rclsid),pUnk,dwClsContext,flags,lpdwRegister
487 );
488 return 0;
489 }
490
491 /******************************************************************************
492 * CoRevokeClassObject [COMPOBJ.6]
493 *
494 */
495 HRESULT WINAPI CoRevokeClassObject16(DWORD dwRegister) /* [in] token on class obj */
496 {
497 FIXME("(0x%08x),stub!\n", dwRegister);
498 return 0;
499 }
500
501 /******************************************************************************
502 * CoFileTimeToDosDateTime [COMPOBJ.30]
503 */
504 BOOL16 WINAPI CoFileTimeToDosDateTime16(const FILETIME *ft, LPWORD lpDosDate, LPWORD lpDosTime)
505 {
506 return FileTimeToDosDateTime(ft, lpDosDate, lpDosTime);
507 }
508
509 /******************************************************************************
510 * CoDosDateTimeToFileTime [COMPOBJ.31]
511 */
512 BOOL16 WINAPI CoDosDateTimeToFileTime16(WORD wDosDate, WORD wDosTime, FILETIME *ft)
513 {
514 return DosDateTimeToFileTime(wDosDate, wDosTime, ft);
515 }
516
517 /******************************************************************************
518 * CoRegisterMessageFilter [COMPOBJ.27]
519 */
520 HRESULT WINAPI CoRegisterMessageFilter16(
521 LPMESSAGEFILTER lpMessageFilter,
522 LPMESSAGEFILTER *lplpMessageFilter
523 ) {
524 FIXME("(%p,%p),stub!\n",lpMessageFilter,lplpMessageFilter);
525 return 0;
526 }
527
528 /******************************************************************************
529 * CoLockObjectExternal [COMPOBJ.63]
530 */
531 HRESULT WINAPI CoLockObjectExternal16(
532 LPUNKNOWN pUnk, /* [in] object to be locked */
533 BOOL16 fLock, /* [in] do lock */
534 BOOL16 fLastUnlockReleases /* [in] ? */
535 ) {
536 FIXME("(%p,%d,%d),stub!\n",pUnk,fLock,fLastUnlockReleases);
537 return S_OK;
538 }
539
540 /***********************************************************************
541 * CoGetState [COMPOBJ.115]
542 */
543 HRESULT WINAPI CoGetState16(LPDWORD state)
544 {
545 FIXME("(%p),stub!\n", state);
546
547 *state = 0;
548 return S_OK;
549 }
550
551 /***********************************************************************
552 * DllEntryPoint [COMPOBJ.116]
553 *
554 * Initialization code for the COMPOBJ DLL
555 *
556 * RETURNS:
557 */
558 BOOL WINAPI COMPOBJ_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, WORD ds, WORD HeapSize, DWORD res1, WORD res2)
559 {
560 TRACE("(%08x, %04x, %04x, %04x, %08x, %04x)\n", Reason, hInst, ds, HeapSize, res1, res2);
561 return TRUE;
562 }
563
564 /***********************************************************************
565 * CoMemAlloc [COMPOBJ.151]
566 */
567 SEGPTR WINAPI CoMemAlloc(DWORD size, DWORD dwMemContext, DWORD x) {
568 HRESULT hres;
569 SEGPTR segptr;
570
571 /* FIXME: check context handling */
572 TRACE("(%d, 0x%08x, 0x%08x)\n", size, dwMemContext, x);
573 hres = _xmalloc16(size, &segptr);
574 if (hres != S_OK)
575 return 0;
576 return segptr;
577 }
578
579 /******************************************************************************
580 * CLSIDFromProgID [COMPOBJ.61]
581 *
582 * Converts a program ID into the respective GUID.
583 *
584 * PARAMS
585 * progid [I] program id as found in registry
586 * riid [O] associated CLSID
587 *
588 * RETURNS
589 * Success: S_OK
590 * Failure: CO_E_CLASSSTRING - the given ProgID cannot be found.
591 */
592 HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid)
593 {
594 char *buf,buf2[80];
595 LONG buf2len;
596 HRESULT err;
597 HKEY xhkey;
598
599 buf = HeapAlloc(GetProcessHeap(),0,strlen(progid)+8);
600 sprintf(buf,"%s\\CLSID",progid);
601 if ((err=RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&xhkey))) {
602 HeapFree(GetProcessHeap(),0,buf);
603 return CO_E_CLASSSTRING;
604 }
605 HeapFree(GetProcessHeap(),0,buf);
606 buf2len = sizeof(buf2);
607 if ((err=RegQueryValueA(xhkey,NULL,buf2,&buf2len))) {
608 RegCloseKey(xhkey);
609 return CO_E_CLASSSTRING;
610 }
611 RegCloseKey(xhkey);
612 return CLSIDFromString16(buf2,riid);
613 }
614
615 /***********************************************************************
616 * CoGetClassObject [COMPOBJ.7]
617 *
618 */
619 HRESULT WINAPI CoGetClassObject16(
620 REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo,
621 REFIID iid, LPVOID *ppv)
622 {
623 FIXME(", stub!\n\tCLSID:\t%s,\n\tIID:\t%s\n", debugstr_guid(rclsid), debugstr_guid(iid));
624
625 if (pServerInfo) {
626 FIXME("\tpServerInfo: name=%s\n",debugstr_w(pServerInfo->pwszName));
627 FIXME("\t\tpAuthInfo=%p\n",pServerInfo->pAuthInfo);
628 }
629 return E_NOTIMPL;
630 }
631
632 /***********************************************************************
633 * CoCreateInstance [COMPOBJ.13]
634 */
635 HRESULT WINAPI CoCreateInstance16(
636 REFCLSID rclsid,
637 LPUNKNOWN pUnkOuter,
638 DWORD dwClsContext,
639 REFIID iid,
640 LPVOID *ppv)
641 {
642 FIXME("(%s, %p, %x, %s, %p), stub!\n",
643 debugstr_guid(rclsid), pUnkOuter, dwClsContext, debugstr_guid(iid),
644 ppv
645 );
646 return E_NOTIMPL;
647 }
648
649 /***********************************************************************
650 * CoDisconnectObject [COMPOBJ.15]
651 */
652 HRESULT WINAPI CoDisconnectObject16( LPUNKNOWN lpUnk, DWORD reserved )
653 {
654 FIXME("(%p, 0x%08x): stub!\n", lpUnk, reserved);
655 return E_NOTIMPL;
656 }
657
658 /***********************************************************************
659 * DllGetClassObject [OLE2.4]
660 */
661 HRESULT WINAPI DllGetClassObject16(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
662 {
663 FIXME("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
664 return E_NOTIMPL;
665 }
666
667 /******************************************************************************
668 * GetRunningObjectTable (OLE2.30)
669 */
670 HRESULT WINAPI
671 GetRunningObjectTable16(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot)
672 {
673 FIXME("(%d,%p),stub!\n",reserved,pprot);
674 return E_NOTIMPL;
675 }