Did you look for the current directory? I'd guess the Plugin Manager
sets it to the plugin dir.
No.
Otherwise if you can't get the DLL instance of your plugin to pass to
GetModuleFileName(), you can try another trick:
HINSTANCE handle =LoadLibrary( name of your plugin dll here );
if (handle)
{
GetModuleFileName(handle, filename, sizeof(filename));
PathRemoveFileSpec(filename);
FreeLibrary(handle);
}
This should work because the list of loaded DLLs is searched first by
LoadLibrary().
This works! Only one should not free the handle, as the lib is
(probably) not loaded again, this gives a crash.
I have then used Luigis way of extracting the path, as I do not have the
header to PathRemoveFileSpec.
I´ll pack this in the late evening, seems to be working now.
Thanks for your help,
Andreas
regards Ralph
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org