[osg-submissions] Plugin DLL search order fix for Win32
Robert Osfield
robert.osfield at gmail.com
Thu Aug 23 06:48:16 PDT 2007
Thanks J-S, changes now merged and submitted to SVN.
Good job BTW, the changes look very thorough and well commented :-)
On 8/23/07, Jean-Sébastien Guay <jean-sebastien.guay at polymtl.ca> wrote:
> Hello Robert,
>
> As discussed yesterday on the osg-users list, I have altered
> src/osgDB/FileUtils.cpp to implement the official Windows DLL search
> order as described on the page
> http://msdn2.microsoft.com/en-us/library/ms682586.aspx . As mentioned,
> the search order is now:
> 1. The directory from which the application loaded.
> 2. The system directory. (C:\Windows\System32 by default, gotten using the
> GetSystemDirectory function)
> 3. The 16-bit system directory. (C:\Windows\System by default, gotten by
> adding "\System" to the path gotten in the next step...)
> 4. The Windows directory. (C:\Windows by default, gotten using the
> GetWindowsDirectory function)
> 5. The current directory. (".")
> 6. The directories that are listed in the PATH environment variable. (as
> before)
>
> The first four directories are obtained using Win32 API calls, so they
> should work correctly even on non-standard Windows installs.
>
> The changes are well commented and should be clear, even to someone
> not familiar with the Win32 API.
>
> I have tested in a few scenarios and it works as expected. Serge Lages
> has also tested the changes and confirmed they worked as described. I
> have not had any other reports though (positive or negative).
>
> I also fixed the issue with a trailing semicolon on the PATH adding an
> empty string to the end of the search paths, as this was an
> inconsistent side effect rather than a desirable effect. This change
> will take effect on other platforms as well, but since it tests for an
> empty string in the last item added to the search paths, it should
> have no adverse effect.
>
> Attached is the modified src/osgDB/FileUtils.cpp , zipped up just to be sure.
>
> Thanks,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay jean-sebastien.guay at polymtl.ca
> http://whitestar02.webhop.org/
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
>
More information about the osg-submissions
mailing list