Commit bf081542 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleaut32: Added MEMBERID_NIL handling to ICreateTypeInfo_LayOut.

parent 17652291
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment