Hi, I need some help. I've search through docs, and winelib-howto, but didn't find what i need. I want to use libntdll functionality (and some other winapi functions) in a linux console app. The app. is basically a linux program, i just have to call some functions provided in win32 .dll form (no source). I tried: int main(){ void* handle=LoadLibraryA("test.dll"); int (*myfunc)(int x)=GetProcAddress(handle,"MyProc"); int ret=myfunc(123); ... } it's compiled with -lntdll (it also links to libwine.so automagically) but when running it, I got only Invalid Heap: 00000000 message. i think i should call some Init() function before using wine functions. but i was unable to find which one... :( i don't want to use the documented way, so making WinMain() and let wine to handle main() and call my program as an library/function. libloader.a in avifile/mplayer/xine provides such functionality, but it lacks of many function implementations so it's unusable (yet) for me :( thanks, A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
On Wed, Mar 20, 2002 at 08:35:50PM +0100, Arpi wrote:
Hi,
I need some help. I've search through docs, and winelib-howto, but didn't find what i need.
I want to use libntdll functionality (and some other winapi functions) in a linux console app. The app. is basically a linux program, i just have to call some functions provided in win32 .dll form (no source).
I tried:
int main(){ void* handle=LoadLibraryA("test.dll"); int (*myfunc)(int x)=GetProcAddress(handle,"MyProc"); int ret=myfunc(123); ... }
it's compiled with -lntdll (it also links to libwine.so automagically)
but when running it, I got only Invalid Heap: 00000000 message. Common mistake #1: no .spec file. (I guess)
Make sure you're doing it *the exact same way* as all the Winelib programs in programs/*/ are doing it. Good luck ! -- Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany Tel. +49 7159 800604 http://home.nexgo.de/andi.mohr/
participants (2)
-
Andreas Mohr -
Arpi