<div dir="ltr"><div><div>Hi,<br><br>First, I already asked for the same thing at the forum where  I've been told to post here for my question<br>Link here : <a href="http://forum.winehq.org/viewtopic.php?f=8&t=18675">http://forum.winehq.org/viewtopic.php?f=8&t=18675</a><br>
<br>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:<br>
winegcc -mwindows -o <a href="http://mylib.dll.so">mylib.dll.so</a> mylib_main.c -I${WINE_ROOT}/include -shared mylib.spec<br>winebuild -w --def -o libmylib.def --export mylib.spec<br><br>Now I have <a href="http://mylib.dll.so">mylib.dll.so</a> and I want to override mylib.dll<br>
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.<br>
<br>Is this because of the way I build my library ? Or maybe I forget a step to link it properly ?<br></div><div><br>In attachment, a tar with the sources and binaries<br>myapp.exe                       :    the Windows executable<br>
mylib.dll                           :    the Windows library<br></div>mylib_main.c , mylib.spec :    the sources to build the Winelib library</div></div>