Jonathan Wilson jonwil@tpgi.com.au writes:
ReactOS uses linker magic. My point is that there is no valid reason for the WINE code in kernel32 not to use RtlAllocateHeap since the WINE kernel32 code is only intended to run on ReactOS (where RtlAllocateHeap is available) and WINE (where RtlAllocateHeap is available). Therefore, re-writing wine kernel32 to call RtlAllocateHeap instead of HeapAlloc and perhaps changing WINE to do the linker forwarding foo (if such a thing is possible) is a good solution.
There's no reason whatsoever to do that. HeapAlloc is a kernel function and it's perfectly OK to use it in kernel. It requires a bit of magic to link properly but that's not a problem.
As for libwine_unicode, I havent looked but I suspect that on real windows, most of what libwine_unicode does is inside ntdll.dll somewhere. Therefore, lets put the libwine_unicode code into wine ntdll.dll, add the forwarding hooks needed from kernel32.dll that call ntdll.dll and then make WINE apps call kernel32.dll instead of libwine_unicode.
It won't work, libwine_unicode is used in places that don't have access to ntdll (like the tools or the wine server).