<div>I agree but there is a wayaround this if libvlc and libvlc-control remain in the same directory in the future which is very likely I assume. If we want to go to that much trouble is debatable but here is the solution I believe would work:</div>

<div> </div>
<div>1. Use delay load when linking libvlc to libvlc-control (see here: <a href="http://www.codeproject.com/KB/DLL/Delay_Loading_Dll.aspx">http://www.codeproject.com/KB/DLL/Delay_Loading_Dll.aspx</a> and here: <a href="http://msdn2.microsoft.com/en-us/library/151kt790(VS.80).aspx">http://msdn2.microsoft.com/en-us/library/151kt790(VS.80).aspx</a></div>

<div> </div>
<div>2. When libvlc-control starts, before any calls to libvlc is done, do:</div>
<div>             - GetModuleFilename and extract the path portion</div>
<div>             - Do a LoadLibray of libvlc using that path.</div>
<div> </div>
<div>3. Now that libvlc is already loaded, the first call to libvlc should find it already in memory and not search for it on disk.</div>
<div> </div>
<div>4. When libvlc-control unload`s, do a UnloadLibrary of libvlc<br></div>
<div>Jacques Boileau<br></div>
<div class="gmail_quote">On Fri, Apr 4, 2008 at 9:22 AM, Remi Denis-Courmont <<a href="mailto:rdenis@simphalempin.com">rdenis@simphalempin.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">hmm, that does not work, I think. LibVLC!could learn its install path and infer the locations of plugins (and even shared data files) from it. Because it calls dlopen or the non-portable equivalent for these. I did file an enhancement ticket for this a while ago.<br>
<br>However, it is NOT possible for LibVLC-control to learn the location of LibVLC. The earlier is linked to the latter at build link-time, not run-time. It is hence the OS loader that needs to know the path, not LibVLC-control.<br>
<br>Remi Denis<br><br>-- message original --<br>Sujet:  Re: [vlc-devel] Enhancement Request...<br>De:     jboileau <<a href="mailto:jboileau@gmail.com">jboileau@gmail.com</a>><br>Date:           04.04.2008 13:03<br>

<div>
<div></div>
<div class="Wj3C7c"><br>Well we don't really package anything. The application I work on is<br>embedded and I create compact flash images to hold everything. So its<br>not a really big problem for me and its transparent to the end user. I<br>
offer my experience mostly to help if it can. I see all the hard work<br>you guys put in, its the least I can when I read emails I can comment<br>on to do so.<br><br>But the only way to package everything up to not have the path problem<br>
would be to put VLC in the same directory as our application. Which I<br>would rather not. It is nice to have VLC in its own directory and our<br>stuff in another. Easier to update one without the other. And easier<br>in the development stage. Visual Studio creates directories for<br>
release and debug builds. I would have to add post-build steps to copy<br>the VLC files to the target dir when I run the app from the IDE. Do I<br>want this copy to happen every time I build? No way!<br><br>It ain't a big deal to do a set current dir to the VLC install dir so<br>
that the VLC DLLs can find each other. I could also add the VLC dir to<br>the environment path. But it would also be easy to have<br>libvlc-control.dll know its dir and use it to find libvlc.dll. This<br>problem is very minor and easily circumventable in my environment. I<br>
am sure there are more important issues.<br><br>Jacques Boileau<br><br>On Thu, Apr 3, 2008 at 9:05 PM, Pierre d'Herbemont <<a href="mailto:pdherbemont@free.fr">pdherbemont@free.fr</a>> wrote:<br>><br>> On Apr 3, 2008, at 8:48 PM, jboileau wrote:<br>
> > Hi,<br>> ><br>> > I can probably help since I develop on Windows. It is true that there<br>> > is problem loading libvlc-control.dll on Windows. Personaly for the<br>> > moment I am reading the VLC install path from the registry, do a set<br>
> > current dir to there, load libvlc and finally load libvlc-control (see<br>> > code below). This is the only way I have found to make it work without<br>> > problems.<br>><br>> Why don't you package libvlc and plugin with your own app?<br>
><br>><br>> Pierre.<br>> _______________________________________________<br></div></div>
<div class="Ih2E3d">> vlc-devel mailing list<br>> To unsubscribe or modify your subscription options:<br>> <a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
><br><br><br><br></div><font color="#888888">--<br>Jacques Boileau<br></font>
<div>
<div></div>
<div class="Wj3C7c">_______________________________________________<br>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br>_______________________________________________<br>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jacques Boileau