2008/12/5 Ralph Kern <[EMAIL PROTECTED]>:
> Simon Hammett schrieb:
>> If you pass a null handle to GetModuleFileName it uses the return address
>> on the stack to work out which dll the calling function is in.
>> It should always work for any function linked in an exe or dll.
>>
>
> Sorry, Simon, you are wrong:
>
> Quote from MSDN GetModuleFileName():
> http://msdn.microsoft.com/en-us/library/ms683199(VS.85).aspx
>> If this parameter is NULL, GetModuleHandle returns a handle to the file used 
>> to create the calling process (.exe file).
>
> If you pass NULL, it refers to the .exe (firefox.exe), not to the DLL on
> the stack.
>
> regards Ralph

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.

-- 
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