Piotr Caban : oleaut32: Added MEMBERID_NIL handling to ICreateTypeInfo_LayOut.
Alexandre Julliard
julliard at winehq.org
Mon Feb 22 08:46:51 CST 2010
Module: wine
Branch: master
Commit: bf0815424b56636cc0ffb0023a2ee03e72744c6d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf0815424b56636cc0ffb0023a2ee03e72744c6d
Author: Piotr Caban <piotr at codeweavers.com>
Date: Mon Feb 22 01:58:39 2010 +0100
oleaut32: Added MEMBERID_NIL handling to ICreateTypeInfo_LayOut.
---
dlls/oleaut32/tests/typelib.c | 4 ++++
dlls/oleaut32/typelib2.c | 21 +++++++++++++++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 2a04ae9..e75d320 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -1041,6 +1041,10 @@ static void test_CreateTypeLib(void) {
hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
ok(hres == S_OK, "got %08x\n", hres);
+ funcdesc.memid = MEMBERID_NIL;
+ hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
+ ok(hres == S_OK, "got %08x\n", hres);
+
ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti);
diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c
index 6eb13af..e1a36b2 100644
--- a/dlls/oleaut32/typelib2.c
+++ b/dlls/oleaut32/typelib2.c
@@ -1994,8 +1994,25 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(
i = 0;
This->typeinfo->cbSizeVft = 0;
for(iter=This->typedata->next->next; iter!=This->typedata->next; iter=iter->next) {
- if(iter->indice == MEMBERID_NIL)
- FIXME("MEMBERID_NIL handling not yet implemented\n");
+ /* Assign MEMBERID if MEMBERID_NIL was specified */
+ if(iter->indice == MEMBERID_NIL) {
+ iter->indice = 0x60000000 + i;
+
+ for(iter2=This->typedata->next->next; iter2!=This->typedata->next; iter2=iter2->next) {
+ if(iter == iter2) continue;
+ if(iter2->indice == iter->indice) {
+ iter->indice = 0x5fffffff + This->typeinfo->cElement + i;
+
+ for(iter2=This->typedata->next->next; iter2!=This->typedata->next; iter2=iter2->next) {
+ if(iter == iter2) continue;
+ if(iter2->indice == iter->indice)
+ return E_ACCESSDENIED;
+ }
+
+ break;
+ }
+ }
+ }
typedata[i] = iter;
More information about the wine-cvs
mailing list