Build and override a simple winelib DLL
Maxime Sednaoui
maximeseddev at gmail.com
Fri Apr 5 11:34:02 CDT 2013
Hi,
First, I already asked for the same thing at the forum where I've been
told to post here for my question
Link here : http://forum.winehq.org/viewtopic.php?f=8&t=18675
I have a Windows executable that load a really simple DLL (it is a test)
and I want to create a Winelib DLL that will override the Windows DLL.
Basically, I created mylib_main.c and mylib.spec to build the Winelib DLL
with the command:
winegcc -mwindows -o mylib.dll.so mylib_main.c -I${WINE_ROOT}/include
-shared mylib.spec
winebuild -w --def -o libmylib.def --export mylib.spec
Now I have mylib.dll.so and I want to override mylib.dll
What should I do ? I removed the Windows library but then I got a Page
Fault when the function is called. I also tried to configure the override
with winecfg or set environment variables like WINEDLLPATH or add a DllMain
in my library. I don't understand how to proceed.
Is this because of the way I build my library ? Or maybe I forget a step to
link it properly ?
In attachment, a tar with the sources and binaries
myapp.exe : the Windows executable
mylib.dll : the Windows library
mylib_main.c , mylib.spec : the sources to build the Winelib library
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130405/e02e118b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myapp.tar.bz2
Type: application/x-bzip2
Size: 8895 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130405/e02e118b/attachment-0001.bin>
More information about the wine-devel
mailing list