[vlc-devel] link with external DLL
Geoffroy Couprie
geo.couprie at gmail.com
Mon May 17 16:32:15 CEST 2010
Hello,
2010/5/17 Rémi Denis-Courmont <remi at remlab.net>:
>
> On Mon, 17 May 2010 16:35:02 +0300, "Yair Han" <YairH at optibase.com> wrote:
>> I am writing a new KLV module. The module will load external library
>> that translate the KLV according to the required standard. The
>> architecture is very similar to ZVBI or QuickTime, just use external
>> dll. How can I direct the VLC to load the external dll from a designated
>> directory without adding it to windows path?
Please read http://msdn.microsoft.com/en-us/library/ms682586%28VS.85%29.aspx
You have two ways:
-providing the full path to the DLL to LoadLibrary
-put the library in the DLL search path. The easiest way would be to
put it in the same folder as the executable.
>
> There are two ways. The old way provides the full path to the DLL to the
> LoadLibraryW call. VLC does that currently. The newer way calls a dedicated
> Win32 API function that register an extra DLL path. I forget the exact name
> and it requires Windows XP SP2 or something, which is why VLC did not use
> it.
It is named SafeDllSearchMode. Basically, it changes the directory lookup order.
Best regards,
Geoffroy
More information about the vlc-devel
mailing list