Commit b2ed2528 authored by Alexandre Julliard's avatar Alexandre Julliard

Finished separation of ole32.

parent 9717845a
...@@ -4,7 +4,7 @@ SRCDIR = @srcdir@ ...@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = ddraw MODULE = ddraw
SOVERSION = 1.0 SOVERSION = 1.0
IMPORTS = ole32 user32 x11drv gdi32 kernel32 IMPORTS = user32 x11drv gdi32 kernel32
MESA_SRCS = \ MESA_SRCS = \
d3dcommon.c \ d3dcommon.c \
......
name ddraw name ddraw
type win32 type win32
import ole32.dll
import user32.dll import user32.dll
import x11drv.dll import x11drv.dll
import gdi32.dll import gdi32.dll
......
...@@ -3,9 +3,10 @@ TOPOBJDIR = ../.. ...@@ -3,9 +3,10 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = ole32 MODULE = ole32
SOVERSION = 1.0
ALTNAMES = ole2 ole2nls ole2conv ole2prox ole2thk storage compobj ALTNAMES = ole2 ole2nls ole2conv ole2prox ole2thk storage compobj
IMPORTS = advapi32 user32 gdi32 rpcrt4 kernel32 ntdll
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
antimoniker.c \ antimoniker.c \
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "heap.h" #include "heap.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/obj_base.h" #include "wine/obj_base.h"
#include "local.h"
#include "module.h" #include "module.h"
#include "debugtools.h" #include "debugtools.h"
...@@ -99,10 +98,6 @@ typedef struct ...@@ -99,10 +98,6 @@ typedef struct
ICOM_VFIELD(IMalloc16); ICOM_VFIELD(IMalloc16);
DWORD ref; DWORD ref;
/* IMalloc16 fields */ /* IMalloc16 fields */
/* Gmm, I think one is not enough, we should probably manage a list of
* heaps
*/
HGLOBAL16 heap;
} IMalloc16Impl; } IMalloc16Impl;
/****************************************************************************** /******************************************************************************
...@@ -142,28 +137,28 @@ ULONG WINAPI IMalloc16_fnRelease(IMalloc16* iface) { ...@@ -142,28 +137,28 @@ ULONG WINAPI IMalloc16_fnRelease(IMalloc16* iface) {
/****************************************************************************** /******************************************************************************
* IMalloc16_Alloc [COMPOBJ.503] * IMalloc16_Alloc [COMPOBJ.503]
*/ */
LPVOID WINAPI IMalloc16_fnAlloc(IMalloc16* iface,DWORD cb) { SEGPTR WINAPI IMalloc16_fnAlloc(IMalloc16* iface,DWORD cb) {
ICOM_THIS(IMalloc16Impl,iface); ICOM_THIS(IMalloc16Impl,iface);
TRACE("(%p)->Alloc(%ld)\n",This,cb); TRACE("(%p)->Alloc(%ld)\n",This,cb);
return (LPVOID)PTR_SEG_OFF_TO_SEGPTR(This->heap,LOCAL_Alloc(This->heap,0,cb)); return MapLS( HeapAlloc( GetProcessHeap(), HEAP_WINE_SEGPTR, cb ) );
} }
/****************************************************************************** /******************************************************************************
* IMalloc16_Realloc [COMPOBJ.504] * IMalloc16_Realloc [COMPOBJ.504]
*/ */
LPVOID WINAPI IMalloc16_fnRealloc(IMalloc16* iface,LPVOID pv,DWORD cb) { SEGPTR WINAPI IMalloc16_fnRealloc(IMalloc16* iface,SEGPTR pv,DWORD cb) {
ICOM_THIS(IMalloc16Impl,iface); ICOM_THIS(IMalloc16Impl,iface);
TRACE("(%p)->Realloc(%p,%ld)\n",This,pv,cb); TRACE("(%p)->Realloc(%08lx,%ld)\n",This,pv,cb);
return (LPVOID)PTR_SEG_OFF_TO_SEGPTR(This->heap,LOCAL_ReAlloc(This->heap,0,LOWORD(pv),cb)); return MapLS( HeapReAlloc( GetProcessHeap(), HEAP_WINE_SEGPTR, PTR_SEG_TO_LIN(pv), cb ) );
} }
/****************************************************************************** /******************************************************************************
* IMalloc16_Free [COMPOBJ.505] * IMalloc16_Free [COMPOBJ.505]
*/ */
VOID WINAPI IMalloc16_fnFree(IMalloc16* iface,LPVOID pv) { VOID WINAPI IMalloc16_fnFree(IMalloc16* iface,SEGPTR pv) {
ICOM_THIS(IMalloc16Impl,iface); ICOM_THIS(IMalloc16Impl,iface);
TRACE("(%p)->Free(%p)\n",This,pv); TRACE("(%p)->Free(%08lx)\n",This,pv);
LOCAL_Free(This->heap,LOWORD(pv)); HeapFree( GetProcessHeap(), HEAP_WINE_SEGPTR, PTR_SEG_TO_LIN(pv) );
} }
/****************************************************************************** /******************************************************************************
...@@ -172,7 +167,7 @@ VOID WINAPI IMalloc16_fnFree(IMalloc16* iface,LPVOID pv) { ...@@ -172,7 +167,7 @@ VOID WINAPI IMalloc16_fnFree(IMalloc16* iface,LPVOID pv) {
DWORD WINAPI IMalloc16_fnGetSize(const IMalloc16* iface,LPVOID pv) { DWORD WINAPI IMalloc16_fnGetSize(const IMalloc16* iface,LPVOID pv) {
ICOM_CTHIS(IMalloc16Impl,iface); ICOM_CTHIS(IMalloc16Impl,iface);
TRACE("(%p)->GetSize(%p)\n",This,pv); TRACE("(%p)->GetSize(%p)\n",This,pv);
return LOCAL_Size(This->heap,LOWORD(pv)); return HeapSize( GetProcessHeap(), HEAP_WINE_SEGPTR, PTR_SEG_TO_LIN(pv) );
} }
/****************************************************************************** /******************************************************************************
...@@ -221,9 +216,6 @@ IMalloc16_Constructor() { ...@@ -221,9 +216,6 @@ IMalloc16_Constructor() {
} }
ICOM_VTBL(This) = (ICOM_VTABLE(IMalloc16)*)SEGPTR_GET(msegvt16); ICOM_VTBL(This) = (ICOM_VTABLE(IMalloc16)*)SEGPTR_GET(msegvt16);
This->ref = 1; This->ref = 1;
/* FIXME: implement multiple heaps */
This->heap = GlobalAlloc16(GMEM_MOVEABLE,64000);
LocalInit16(This->heap,0,64000);
return (LPMALLOC16)SEGPTR_GET(This); return (LPMALLOC16)SEGPTR_GET(This);
} }
......
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