Re: Plugin problem with Firefox 4

Benjamin Smedberg <[email protected]>
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
On 4/26/2011 2:54 AM, imag wrote:
> Hello
>
> I have a plugin which loads separate DLL with LoadLibrary() Windows
> API.
> It works OK up to Firefox 3.6.x but somehow LoadLibrary() call fails
> (return NULL) in Firefox 4.
> In the plugin code there is _chdir() call to move to the directory
> where the DLL to load exists, but looks like the current directory is
> not contained in the DLL search.
>
> There is a workaround for this, use LoadLibraryEx() to explicitly set
> DLL search path, but wondering why the issue happened. Whatever
> changed about plugin in Firefox 4?
This was an intentional change made in a security bug which is not yet 
public. Instead of loading the library with a raw filename 
LoadLibrary("my.dll") you should construct a full path using 
LoadLibrary("C:\full\path\to\my.dll");

--BDS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.