rpcrt4: Fix NdrFullPointerQueryRefId to make more tests pass.
This commit is contained in:
parent
767631d853
commit
7af506b2b4
|
@ -145,8 +145,17 @@ int WINAPI NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
|
|||
|
||||
expand_pointer_table_if_necessary(pXlatTables, RefId);
|
||||
|
||||
pXlatTables->NextRefId = max(RefId + 1, pXlatTables->NextRefId);
|
||||
|
||||
if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
|
||||
{
|
||||
*ppPointer = pXlatTables->RefIdToPointer.XlatTable[RefId];
|
||||
if (QueryType)
|
||||
return pXlatTables->RefIdToPointer.StateTable[RefId];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
*ppPointer = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -762,21 +762,17 @@ static void test_fullpointer_xlat(void)
|
|||
|
||||
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId);
|
||||
ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret);
|
||||
todo_wine {
|
||||
ok(RefId == 0x3, "RefId should be 0x1 instead of 0x%lx\n", RefId);
|
||||
}
|
||||
ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
|
||||
|
||||
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId);
|
||||
ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret);
|
||||
todo_wine {
|
||||
ok(RefId == 0x3, "RefId should be 0x1 instead of 0x%lx\n", RefId);
|
||||
}
|
||||
ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
|
||||
|
||||
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 0, &RefId);
|
||||
todo_wine {
|
||||
ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret);
|
||||
ok(RefId == 0x3, "RefId should be 0x1 instead of 0x%lx\n", RefId);
|
||||
}
|
||||
ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
|
||||
|
||||
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebabe, 0, &RefId);
|
||||
ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret);
|
||||
|
@ -784,9 +780,7 @@ static void test_fullpointer_xlat(void)
|
|||
|
||||
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 0, &RefId);
|
||||
ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret);
|
||||
todo_wine {
|
||||
ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%lx\n", RefId);
|
||||
}
|
||||
|
||||
/* "freeing" phase */
|
||||
|
||||
|
|
Loading…
Reference in New Issue