Use segmented lpvtbl pointer for IMalloc16 interface, not linear one.
This commit is contained in:
parent
c22ca7af80
commit
b9da4576c6
|
@ -208,7 +208,7 @@ IMalloc16_Constructor() {
|
||||||
|
|
||||||
This = (IMalloc16Impl*)SEGPTR_NEW(IMalloc16Impl);
|
This = (IMalloc16Impl*)SEGPTR_NEW(IMalloc16Impl);
|
||||||
if (!msegvt16) {
|
if (!msegvt16) {
|
||||||
This->lpvtbl = msegvt16 = SEGPTR_NEW(ICOM_VTABLE(IMalloc16));
|
msegvt16 = SEGPTR_NEW(ICOM_VTABLE(IMalloc16));
|
||||||
|
|
||||||
#define VTENT(x) msegvt16->fn##x = (void*)WIN32_GetProcAddress16(hcomp,"IMalloc16_"#x);assert(msegvt16->fn##x)
|
#define VTENT(x) msegvt16->fn##x = (void*)WIN32_GetProcAddress16(hcomp,"IMalloc16_"#x);assert(msegvt16->fn##x)
|
||||||
VTENT(QueryInterface);
|
VTENT(QueryInterface);
|
||||||
|
@ -220,8 +220,8 @@ IMalloc16_Constructor() {
|
||||||
VTENT(GetSize);
|
VTENT(GetSize);
|
||||||
VTENT(DidAlloc);
|
VTENT(DidAlloc);
|
||||||
VTENT(HeapMinimize);
|
VTENT(HeapMinimize);
|
||||||
msegvt16 = (ICOM_VTABLE(IMalloc16)*)SEGPTR_GET(msegvt16);
|
|
||||||
#undef VTENT
|
#undef VTENT
|
||||||
|
This->lpvtbl = (ICOM_VTABLE(IMalloc16)*)SEGPTR_GET(msegvt16);
|
||||||
}
|
}
|
||||||
This->ref = 1;
|
This->ref = 1;
|
||||||
/* FIXME: implement multiple heaps */
|
/* FIXME: implement multiple heaps */
|
||||||
|
|
Loading…
Reference in New Issue