>
> Nuts, I must be confusing it with one of the debug help functions.
> Easiest way is to do it DllMain then, you get passed the handle to your dll.
> Then just store the handle or the path.
>

Knew there was a relatively straight forward way of doing it:

wchar_t buff[256];

buff[0] = '\0';

HMODULE  module;

if( TRUE == GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
reinterpret_cast< LPCWSTR >(&DllMain), &module) )
      GetModuleFileName(module, buff, 256);

You need _WIN32_WINNT as 0x0501 or later though

-- 
The truth is out there. Usually in header files.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to