<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 6:34 PM, Maxime Sednaoui <span dir="ltr"><<a href="mailto:maximeseddev@gmail.com" target="_blank">maximeseddev@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><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" target="_blank">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" target="_blank">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" target="_blank">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></div></div></div></blockquote><div><br></div>Hi,<br><br>I'm not an expert on this, but anyway: the docs say:<br>

"If you have problems then set the WINEDEBUG=+module environment variable before running wine to see what is actually happening."<br></div><div class="gmail_quote"><br></div><div class="gmail_quote" style>So I would suggest to try that first. </div>

<div class="gmail_quote" style>Second, it might be that your dll is loaded, but that it crashes inside? Have you got a trace of the crash? Or have you ran winedbg/wine with gdb to analyze the crash?</div><div class="gmail_quote" style>

<br></div><div class="gmail_quote" style>Regards,</div><div class="gmail_quote" style><br></div><div class="gmail_quote" style>Matijn</div></div></div>