2008/12/5 Andreas Goebel <[EMAIL PROTECTED]>:
> Simon Hammett schrieb:
>>
>> 2008/12/5 Andreas Goebel <[EMAIL PROTECTED]>:
>>
>>>
>>> Simon Hammett schrieb:
>>>
>>>>
>>>> On windows you can call GetModuleFileName which retrieves the fully
>>>> qualified path to the dll/exe
>>>> in which the calling function resides.
>>>>
>>>>
>>>
>>> Sadly no, it returns the path to firefox.exe, already tried that.
>>>
>>
>> The only way I can think of that GetModuleFileName would fail is if
>> people start moving code around in memory. Seems unlikely firefox
>> would do that.
>>
>> Try EnumProcessModules then to get the module handle to your dll.
>> Then you can use GetModuleFileName with the correct handle.
>>
>>
>
> I´ll have to stop working on that till tonight. Maybe you could give me a
> code-snippet, I am no expert-windows-api-programmer, I prefer using
> wxWidgets.
>

http://msdn.microsoft.com/en-us/library/ms682631(VS.85).aspx

That's the doc for the function and there is example code linked to as well.

If you ever need info for windows programming, always check out msdn.
Not a big fan of MS, but their documentation is usually pretty good;
once you can work out what they've called the feature you are
interested in is called anyway.

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