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