Implemented MJPG handler.
[wine/multimedia.git] / dlls / oleaut32 / disptype.c
blob29863d92c8f1b1c485efa74d118ef0243cc41dc4
1 /*
2 * Copyright 2001 Hidenori Takeshima
4 * FIXME - stub
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "config.h"
23 #include "winerror.h"
24 #include "winnls.h" /* for PRIMARYLANGID */
25 #include "winreg.h" /* for HKEY_LOCAL_MACHINE */
26 #include "winuser.h"
27 #include "oleauto.h"
29 #include "typelib.h"
31 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(ole);
34 typedef struct CTypeInfo2Impl
36 ICOM_VFIELD(ITypeInfo2);
37 UINT ref;
39 INTERFACEDATA ifd;
40 LCID lcid;
41 } CTypeInfo2Impl;
43 static OLECHAR* olestrdup(OLECHAR* psz)
45 OLECHAR* pret;
46 DWORD cb;
48 cb = (lstrlenW(psz)+1) * sizeof(OLECHAR);
49 pret = (OLECHAR*)HeapAlloc( GetProcessHeap(), 0, cb );
50 if ( pret != NULL )
51 memcpy( pret, psz, cb );
52 return pret;
55 static HRESULT CTypeInfo2Impl_Construct(
56 CTypeInfo2Impl* This,INTERFACEDATA* pifd,LCID lcid)
58 DWORD n,k;
59 METHODDATA* pmdst;
60 const METHODDATA* pmsrc;
61 PARAMDATA* pPdst;
62 const PARAMDATA* pPsrc;
64 This->ifd.pmethdata = (METHODDATA*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(METHODDATA)*pifd->cMembers);
65 if ( This->ifd.pmethdata == NULL ) return E_OUTOFMEMORY;
66 This->ifd.cMembers = pifd->cMembers;
67 for ( n = 0; n < pifd->cMembers; n++ )
69 pmdst = &This->ifd.pmethdata[n];
70 pmsrc = &pifd->pmethdata[n];
72 pmdst->szName = olestrdup(pmsrc->szName);
73 if ( pmdst->szName == NULL ) return E_OUTOFMEMORY;
74 pmdst->ppdata = NULL;
75 pmdst->dispid = pmsrc->dispid;
76 pmdst->iMeth = pmsrc->iMeth;
77 pmdst->cc = pmsrc->cc;
78 pmdst->cArgs = pmsrc->cArgs;
79 pmdst->wFlags = pmsrc->wFlags;
80 pmdst->vtReturn = pmsrc->vtReturn;
82 if ( pmsrc->cArgs <= 0 ) continue;
83 pmdst->ppdata = (PARAMDATA*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(PARAMDATA)*pmsrc->cArgs);
84 if ( pmdst->ppdata == NULL ) return E_OUTOFMEMORY;
86 for ( k = 0; k < pmsrc->cArgs; k++ )
88 pPdst = &pmdst->ppdata[k];
89 pPsrc = &pmsrc->ppdata[k];
90 pPdst->szName = olestrdup(pPsrc->szName);
91 if ( pPdst->szName == NULL ) return E_OUTOFMEMORY;
92 pPdst->vt = pPsrc->vt;
96 This->lcid = lcid;
98 return S_OK;
101 static void CTypeInfo2Impl_Destruct(CTypeInfo2Impl* This)
103 DWORD n,k;
104 METHODDATA* pm;
105 PARAMDATA* pP;
107 if ( This->ifd.pmethdata != NULL )
109 for ( n = 0; n < This->ifd.cMembers; n++ )
111 pm = &This->ifd.pmethdata[n];
112 if ( pm->szName != NULL )
113 HeapFree(GetProcessHeap(),0,pm->szName);
114 if ( pm->ppdata == NULL ) continue;
116 for ( k = 0; k < pm->cArgs; k++ )
118 pP = &pm->ppdata[k];
119 if ( pP->szName != NULL )
120 HeapFree(GetProcessHeap(),0,pP->szName);
122 HeapFree(GetProcessHeap(),0,pm->ppdata);
124 HeapFree(GetProcessHeap(),0,This->ifd.pmethdata);
125 This->ifd.pmethdata = NULL;
129 /****************************************************************************/
131 static const METHODDATA* CTypeInfo2Impl_SearchMethodByName(
132 CTypeInfo2Impl* This,const OLECHAR* pName)
134 DWORD n;
135 METHODDATA* pm;
137 for ( n = 0; n < This->ifd.cMembers; n++ )
139 pm = &This->ifd.pmethdata[n];
140 if ( !lstrcmpiW(pm->szName,pName) )
141 return pm;
144 return NULL;
147 static const METHODDATA* CTypeInfo2Impl_SearchMethodByDispIDAndFlags(
148 CTypeInfo2Impl* This,DISPID dispid,UINT16 wFlags)
150 DWORD n;
151 METHODDATA* pm;
153 for ( n = 0; n < This->ifd.cMembers; n++ )
155 pm = &This->ifd.pmethdata[n];
156 if ( (pm->dispid == dispid) && (pm->wFlags & wFlags) )
157 return pm;
160 return NULL;
164 static int CTypeInfo2Impl_SearchParamByName(
165 const METHODDATA* pm,const OLECHAR* pName)
167 PARAMDATA* pP;
168 DWORD k;
170 for ( k = 0; k < pm->cArgs; k++ )
172 pP = &pm->ppdata[k];
173 if ( !lstrcmpiW(pP->szName,pName) )
174 return (int)k;
177 return -1;
181 /****************************************************************************/
183 static HRESULT WINAPI CTypeInfo2Impl_fnQueryInterface(
184 ITypeInfo2* iface,REFIID riid,void** ppvobj)
186 ICOM_THIS(CTypeInfo2Impl,iface);
188 TRACE("(%p)->(IID: %s)\n",This,debugstr_guid(riid));
190 *ppvobj = NULL;
191 if ( IsEqualIID(riid, &IID_IUnknown) ||
192 IsEqualIID(riid, &IID_ITypeInfo) ||
193 IsEqualIID(riid, &IID_ITypeInfo2) )
195 *ppvobj = (void*)iface;
196 ITypeInfo2_AddRef(iface);
197 return S_OK;
200 return E_NOINTERFACE;
203 static ULONG WINAPI CTypeInfo2Impl_fnAddRef(ITypeInfo2* iface)
205 ICOM_THIS(CTypeInfo2Impl,iface);
207 return ++ This->ref;
210 static ULONG WINAPI CTypeInfo2Impl_fnRelease(ITypeInfo2* iface)
212 ICOM_THIS(CTypeInfo2Impl,iface);
214 if ( -- This->ref > 0 ) return This->ref;
216 ++ This->ref;
217 CTypeInfo2Impl_Destruct(This);
218 HeapFree(GetProcessHeap(),0,This);
219 return 0;
222 static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeAttr(
223 ITypeInfo2* iface,LPTYPEATTR* ppTypeAttr)
225 ICOM_THIS(CTypeInfo2Impl,iface);
226 TYPEATTR* pta;
228 FIXME("(%p)\n",This);
230 if ( ppTypeAttr == NULL )
231 return E_POINTER;
232 pta = (TYPEATTR*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(TYPEATTR));
233 if ( pta == NULL ) return E_OUTOFMEMORY;
235 /* FIXME!!! */
236 pta->lcid = This->lcid;
237 pta->memidConstructor = MEMBERID_NIL;
238 pta->memidDestructor = MEMBERID_NIL;
239 pta->lpstrSchema = NULL;
240 pta->cbSizeInstance = 0;
241 pta->typekind = 0;
242 pta->cFuncs = This->ifd.cMembers;
243 pta->cVars = 0;
244 pta->cImplTypes = 1;
245 pta->cbSizeVft = sizeof(DWORD)*This->ifd.cMembers;
246 pta->cbAlignment = sizeof(DWORD);
247 pta->wTypeFlags = 0;
248 pta->wMajorVerNum = 1;
249 pta->wMinorVerNum = 0;
250 ZeroMemory( &pta->idldescType, sizeof(pta->idldescType) );
252 *ppTypeAttr = pta;
253 return S_OK;
256 static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeComp(
257 ITypeInfo2* iface,ITypeComp** ppTComp)
259 ICOM_THIS(CTypeInfo2Impl,iface);
261 FIXME("(%p) stub!\n",This);
263 return E_NOTIMPL;
266 static HRESULT WINAPI CTypeInfo2Impl_fnGetFuncDesc(
267 ITypeInfo2* iface,UINT index,LPFUNCDESC* ppFuncDesc)
269 ICOM_THIS(CTypeInfo2Impl,iface);
271 FIXME("(%p) stub!\n",This);
273 return E_NOTIMPL;
276 static HRESULT WINAPI CTypeInfo2Impl_fnGetVarDesc(
277 ITypeInfo2* iface,UINT index,LPVARDESC* ppVarDesc)
279 ICOM_THIS(CTypeInfo2Impl,iface);
281 FIXME("(%p) stub!\n",This);
283 return E_NOTIMPL;
286 static HRESULT WINAPI CTypeInfo2Impl_fnGetNames(
287 ITypeInfo2* iface, MEMBERID memid,BSTR* rgBstrNames,
288 UINT cMaxNames, UINT* pcNames)
290 ICOM_THIS(CTypeInfo2Impl,iface);
292 FIXME("(%p) stub!\n",This);
294 return E_NOTIMPL;
297 static HRESULT WINAPI CTypeInfo2Impl_fnGetRefTypeOfImplType(
298 ITypeInfo2* iface,UINT index,HREFTYPE* pRefType)
300 ICOM_THIS(CTypeInfo2Impl,iface);
302 FIXME("(%p) stub!\n",This);
304 return E_NOTIMPL;
307 static HRESULT WINAPI CTypeInfo2Impl_fnGetImplTypeFlags(
308 ITypeInfo2* iface,UINT index,INT* pImplTypeFlags)
310 ICOM_THIS(CTypeInfo2Impl,iface);
312 FIXME("(%p) stub!\n",This);
314 return E_NOTIMPL;
317 static HRESULT WINAPI CTypeInfo2Impl_fnGetIDsOfNames(
318 ITypeInfo2* iface,LPOLESTR* rgszNames,UINT cNames,MEMBERID* pMemId)
320 ICOM_THIS(CTypeInfo2Impl,iface);
321 const METHODDATA* pm;
322 DWORD n;
323 int index;
325 TRACE("(%p,%s,%u,%p)\n",This,debugstr_w(*rgszNames),cNames,pMemId);
327 if ( rgszNames == NULL || pMemId == NULL ) return E_POINTER;
328 if ( cNames <= 0 ) return E_INVALIDARG;
329 for ( n = 0; n < cNames; n++ )
331 if ( rgszNames[n] == NULL ) return E_POINTER;
334 pm = CTypeInfo2Impl_SearchMethodByName(This,rgszNames[0]);
335 if ( pm == NULL ) return DISP_E_UNKNOWNNAME;
336 pMemId[0] = (MEMBERID)pm->dispid;
338 for ( n = 1; n < cNames; n++ )
340 index = CTypeInfo2Impl_SearchParamByName(pm,rgszNames[n]);
341 if ( index < 0 ) return DISP_E_UNKNOWNNAME;
342 pMemId[n] = (MEMBERID)index;
345 return S_OK;
348 static HRESULT WINAPI CTypeInfo2Impl_fnInvoke(
349 ITypeInfo2* iface,VOID* punk,MEMBERID memid,
350 UINT16 wFlags,DISPPARAMS* pDispParams,VARIANT* pVarResult,
351 EXCEPINFO* pExcepInfo,UINT* pArgErr)
353 ICOM_THIS(CTypeInfo2Impl,iface);
354 const METHODDATA* pm;
355 DWORD res;
356 HRESULT hr;
357 int n;
358 DWORD cargs;
359 DWORD* pargs = NULL;
360 VARIANT varError;
361 VARIANT varRet;
363 FIXME("(%p,%p,%ld,%08x,%p,%p,%p,%p)\n",
364 This,punk,(long)memid,(int)wFlags,
365 pDispParams,pVarResult,pExcepInfo,pArgErr);
367 if ( punk == NULL || pArgErr == NULL )
368 return E_POINTER;
370 pm = CTypeInfo2Impl_SearchMethodByDispIDAndFlags(
371 This,memid,wFlags);
372 if ( pm == NULL )
374 ERR("did not find member id %ld, flags %d!\n", (long)memid, (int)wFlags);
375 return DISP_E_MEMBERNOTFOUND;
378 cargs = pm->cArgs + 1;
379 pargs = (DWORD*)HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD)*(pm->cArgs+2) );
380 if ( pargs == NULL ) { hr = E_OUTOFMEMORY; goto err_invoke; }
382 V_VT(&varError) = VT_ERROR;
383 pargs[0] = (DWORD)punk;
384 for ( n = 1; n <= (int)pm->cArgs; n++ )
385 pargs[n] = (DWORD)&varError; /* FIXME? */
387 if ( (int)pDispParams->cArgs > (int)pm->cArgs )
389 hr = E_FAIL; /* FIXME? */
390 goto err_invoke;
393 for ( n = 1; n <= (int)pm->cArgs; n++ )
395 if ( n <= (int)pDispParams->cNamedArgs )
397 /* FIXME - handle named args. */
398 /* FIXME - check types. */
400 /* pDispParams->rgdispidNamedArgs */
401 /* pDispParams->cNamedArgs */
402 FIXME("named args - %d\n",n);
403 pargs[n] = V_UNION(&pDispParams->rgvarg[pDispParams->cArgs-n],lVal);
405 else
407 /* FIXME - check types. */
408 pargs[n] = V_UNION(&pDispParams->rgvarg[pDispParams->cArgs-n],lVal);
412 VariantInit( &varRet );
413 if ( pm->vtReturn != VT_EMPTY &&
414 (!(wFlags & (DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF))) )
416 if ( pVarResult != NULL )
418 pargs[cargs] = (DWORD)pVarResult;
420 else
422 pargs[cargs] = (DWORD)(&varRet);
424 cargs ++;
427 res = _invoke(
428 (*(DWORD***)punk)[pm->iMeth],
429 pm->cc, cargs, pargs );
430 VariantClear( &varRet );
432 if ( res == (DWORD)-1 ) /* FIXME? */
434 hr = E_FAIL;
435 goto err_invoke;
438 hr = S_OK;
439 err_invoke:
440 HeapFree( GetProcessHeap(), 0, pargs );
442 return hr;
445 static HRESULT WINAPI CTypeInfo2Impl_fnGetDocumentation(
446 ITypeInfo2* iface,
447 MEMBERID memid, BSTR* pBstrName, BSTR* pBstrDocString,
448 DWORD* pdwHelpContext, BSTR* pBstrHelpFile)
450 ICOM_THIS(CTypeInfo2Impl,iface);
452 FIXME("(%p) stub!\n",This);
454 return E_NOTIMPL;
457 static HRESULT WINAPI CTypeInfo2Impl_fnGetDllEntry(
458 ITypeInfo2* iface,MEMBERID memid,
459 INVOKEKIND invKind,BSTR* pBstrDllName,BSTR* pBstrName,
460 WORD* pwOrdinal)
462 ICOM_THIS(CTypeInfo2Impl,iface);
464 FIXME("(%p) stub!\n",This);
466 return E_NOTIMPL;
469 static HRESULT WINAPI CTypeInfo2Impl_fnGetRefTypeInfo(
470 ITypeInfo2* iface,HREFTYPE hRefType,ITypeInfo** ppTInfo)
472 ICOM_THIS(CTypeInfo2Impl,iface);
474 FIXME("(%p) stub!\n",This);
476 return E_NOTIMPL;
479 static HRESULT WINAPI CTypeInfo2Impl_fnAddressOfMember(
480 ITypeInfo2 *iface,
481 MEMBERID memid,INVOKEKIND invKind,PVOID* ppv)
483 ICOM_THIS(CTypeInfo2Impl,iface);
485 FIXME("(%p) stub!\n",This);
487 return E_NOTIMPL;
490 static HRESULT WINAPI CTypeInfo2Impl_fnCreateInstance(
491 ITypeInfo2* iface,
492 IUnknown* punk,REFIID riid,VOID** ppvObj)
494 ICOM_THIS(CTypeInfo2Impl,iface);
496 FIXME("(%p) stub!\n",This);
498 return E_NOTIMPL;
501 static HRESULT WINAPI CTypeInfo2Impl_fnGetMops(
502 ITypeInfo2* iface,MEMBERID memid,BSTR* pBstrMops)
504 ICOM_THIS(CTypeInfo2Impl,iface);
506 FIXME("(%p) stub!\n",This);
508 return E_NOTIMPL;
511 static HRESULT WINAPI CTypeInfo2Impl_fnGetContainingTypeLib(
512 ITypeInfo2* iface,ITypeLib** ppTLib,UINT* pIndex)
514 ICOM_THIS(CTypeInfo2Impl,iface);
516 FIXME("(%p) stub!\n",This);
518 return E_NOTIMPL;
521 static HRESULT WINAPI CTypeInfo2Impl_fnReleaseTypeAttr(
522 ITypeInfo2* iface,TYPEATTR* pTypeAttr)
524 ICOM_THIS(CTypeInfo2Impl,iface);
526 FIXME("(%p)\n",This);
528 if ( pTypeAttr != NULL )
529 HeapFree(GetProcessHeap(),0,pTypeAttr);
531 return S_OK;
534 static HRESULT WINAPI CTypeInfo2Impl_fnReleaseFuncDesc(
535 ITypeInfo2* iface,FUNCDESC* pFuncDesc)
537 ICOM_THIS(CTypeInfo2Impl,iface);
539 FIXME("(%p) stub!\n",This);
541 return E_NOTIMPL;
544 static HRESULT WINAPI CTypeInfo2Impl_fnReleaseVarDesc(
545 ITypeInfo2* iface,VARDESC* pVarDesc)
547 ICOM_THIS(CTypeInfo2Impl,iface);
549 FIXME("(%p) stub!\n",This);
551 return E_NOTIMPL;
554 static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeKind(
555 ITypeInfo2* iface,TYPEKIND* pTypeKind)
557 ICOM_THIS(CTypeInfo2Impl,iface);
559 FIXME("(%p) stub!\n",This);
561 return E_NOTIMPL;
564 static HRESULT WINAPI CTypeInfo2Impl_fnGetTypeFlags(
565 ITypeInfo2* iface,UINT* pTypeFlags)
567 ICOM_THIS(CTypeInfo2Impl,iface);
569 FIXME("(%p) stub!\n",This);
571 return E_NOTIMPL;
574 static HRESULT WINAPI CTypeInfo2Impl_fnGetFuncIndexOfMemId(
575 ITypeInfo2* iface,
576 MEMBERID memid,INVOKEKIND invKind,UINT* pFuncIndex)
578 ICOM_THIS(CTypeInfo2Impl,iface);
580 FIXME("(%p) stub!\n",This);
582 return E_NOTIMPL;
585 static HRESULT WINAPI CTypeInfo2Impl_fnGetVarIndexOfMemId(
586 ITypeInfo2* iface,
587 MEMBERID memid,UINT* pVarIndex)
589 ICOM_THIS(CTypeInfo2Impl,iface);
591 FIXME("(%p) stub!\n",This);
593 return E_NOTIMPL;
596 static HRESULT WINAPI CTypeInfo2Impl_fnGetCustData(
597 ITypeInfo2* iface,REFGUID guid,VARIANT* pVarVal)
599 ICOM_THIS(CTypeInfo2Impl,iface);
601 FIXME("(%p) stub!\n",This);
603 return E_NOTIMPL;
606 static HRESULT WINAPI CTypeInfo2Impl_fnGetFuncCustData(
607 ITypeInfo2* iface,UINT index,REFGUID guid,VARIANT* pVarVal)
609 ICOM_THIS(CTypeInfo2Impl,iface);
611 FIXME("(%p) stub!\n",This);
613 return E_NOTIMPL;
616 static HRESULT WINAPI CTypeInfo2Impl_fnGetParamCustData(
617 ITypeInfo2* iface,UINT indexFunc,UINT indexParam,
618 REFGUID guid,VARIANT* pVarVal)
620 ICOM_THIS(CTypeInfo2Impl,iface);
622 FIXME("(%p) stub!\n",This);
624 return E_NOTIMPL;
627 static HRESULT WINAPI CTypeInfo2Impl_fnGetVarCustData(
628 ITypeInfo2* iface,UINT index,REFGUID guid,VARIANT* pVarVal)
630 ICOM_THIS(CTypeInfo2Impl,iface);
632 FIXME("(%p) stub!\n",This);
634 return E_NOTIMPL;
637 static HRESULT WINAPI CTypeInfo2Impl_fnGetImplTypeCustData(
638 ITypeInfo2 * iface,UINT index,REFGUID guid,VARIANT* pVarVal)
640 ICOM_THIS(CTypeInfo2Impl,iface);
642 FIXME("(%p) stub!\n",This);
644 return E_NOTIMPL;
647 static HRESULT WINAPI CTypeInfo2Impl_fnGetDocumentation2(
648 ITypeInfo2* iface,MEMBERID memid,LCID lcid,
649 BSTR* pbstrHelpString,DWORD* pdwHelpStringContext,BSTR* pbstrHelpStringDll)
651 ICOM_THIS(CTypeInfo2Impl,iface);
653 FIXME("(%p) stub!\n",This);
655 return E_NOTIMPL;
658 static HRESULT WINAPI CTypeInfo2Impl_fnGetAllCustData(
659 ITypeInfo2* iface,CUSTDATA* pCustData)
661 ICOM_THIS(CTypeInfo2Impl,iface);
663 FIXME("(%p) stub!\n",This);
665 return E_NOTIMPL;
668 static HRESULT WINAPI CTypeInfo2Impl_fnGetAllFuncCustData(
669 ITypeInfo2* iface,UINT index,CUSTDATA* pCustData)
671 ICOM_THIS(CTypeInfo2Impl,iface);
673 FIXME("(%p) stub!\n",This);
675 return E_NOTIMPL;
678 static HRESULT WINAPI CTypeInfo2Impl_fnGetAllParamCustData(
679 ITypeInfo2* iface,UINT indexFunc,UINT indexParam,CUSTDATA* pCustData)
681 ICOM_THIS(CTypeInfo2Impl,iface);
683 FIXME("(%p) stub!\n",This);
685 return E_NOTIMPL;
688 static HRESULT WINAPI CTypeInfo2Impl_fnGetAllVarCustData(
689 ITypeInfo2* iface,UINT index,CUSTDATA* pCustData)
691 ICOM_THIS(CTypeInfo2Impl,iface);
693 FIXME("(%p) stub!\n",This);
695 return E_NOTIMPL;
698 static HRESULT WINAPI CTypeInfo2Impl_fnGetAllImplTypeCustData(
699 ITypeInfo2* iface,UINT index,CUSTDATA* pCustData)
701 ICOM_THIS(CTypeInfo2Impl,iface);
703 FIXME("(%p) stub!\n",This);
705 return E_NOTIMPL;
708 static ICOM_VTABLE(ITypeInfo2) itypeinfo2 =
710 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
712 /* IUnknown */
713 CTypeInfo2Impl_fnQueryInterface,
714 CTypeInfo2Impl_fnAddRef,
715 CTypeInfo2Impl_fnRelease,
716 /* ITypeInfo */
717 CTypeInfo2Impl_fnGetTypeAttr,
718 CTypeInfo2Impl_fnGetTypeComp,
719 CTypeInfo2Impl_fnGetFuncDesc,
720 CTypeInfo2Impl_fnGetVarDesc,
721 CTypeInfo2Impl_fnGetNames,
722 CTypeInfo2Impl_fnGetRefTypeOfImplType,
723 CTypeInfo2Impl_fnGetImplTypeFlags,
724 CTypeInfo2Impl_fnGetIDsOfNames,
725 CTypeInfo2Impl_fnInvoke,
726 CTypeInfo2Impl_fnGetDocumentation,
727 CTypeInfo2Impl_fnGetDllEntry,
728 CTypeInfo2Impl_fnGetRefTypeInfo,
729 CTypeInfo2Impl_fnAddressOfMember,
730 CTypeInfo2Impl_fnCreateInstance,
731 CTypeInfo2Impl_fnGetMops,
732 CTypeInfo2Impl_fnGetContainingTypeLib,
733 CTypeInfo2Impl_fnReleaseTypeAttr,
734 CTypeInfo2Impl_fnReleaseFuncDesc,
735 CTypeInfo2Impl_fnReleaseVarDesc,
736 /* ITypeInfo2 */
737 CTypeInfo2Impl_fnGetTypeKind,
738 CTypeInfo2Impl_fnGetTypeFlags,
739 CTypeInfo2Impl_fnGetFuncIndexOfMemId,
740 CTypeInfo2Impl_fnGetVarIndexOfMemId,
741 CTypeInfo2Impl_fnGetCustData,
742 CTypeInfo2Impl_fnGetFuncCustData,
743 CTypeInfo2Impl_fnGetParamCustData,
744 CTypeInfo2Impl_fnGetVarCustData,
745 CTypeInfo2Impl_fnGetImplTypeCustData,
746 CTypeInfo2Impl_fnGetDocumentation2,
747 CTypeInfo2Impl_fnGetAllCustData,
748 CTypeInfo2Impl_fnGetAllFuncCustData,
749 CTypeInfo2Impl_fnGetAllParamCustData,
750 CTypeInfo2Impl_fnGetAllVarCustData,
751 CTypeInfo2Impl_fnGetAllImplTypeCustData,
754 /*****************************************************************************/
756 HRESULT WINAPI CreateDispTypeInfo(
757 INTERFACEDATA* pifd,
758 LCID lcid,
759 ITypeInfo** ppinfo )
761 HRESULT hr;
762 CTypeInfo2Impl* This;
764 if ( ppinfo == NULL )
765 return E_POINTER;
767 This = (CTypeInfo2Impl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(CTypeInfo2Impl));
768 if ( This == NULL ) return E_OUTOFMEMORY;
769 ICOM_VTBL(This) = &itypeinfo2;
770 This->ref = 1;
772 hr = CTypeInfo2Impl_Construct(This,pifd,lcid);
773 if ( FAILED(hr) )
775 IUnknown_Release((IUnknown*)This);
776 return hr;
778 *ppinfo = (ITypeInfo*)This;
780 return S_OK;