Re: [AD] get_executable_name() in Windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Allegro's get_executable_name() uses GetCommandLine() in Windows. Why?

The original author probaby didn't know of this Win32 function.

> Maybe there is a reason for not using GetModuleFileName() that eludes me
> (my knowledge of the Win32 API is very limited); if not, please consider
> using it, or change the documentation to reflect that you're not
> guaranteed to get the full path in Windows.

I actually noticed too that GetModuleFileName() wasn't used, but I thought
this was for a valid reason: it would return the name of the DLL instead of
that of the executable for the dynamically linked version of the library. It
seems I was wrong.

Could you try to implement your solution and test it with a dynamically
linked version of the library under Windows XP ? If all works fine, post a
patch here and I will apply it.

--
Eric Botcazou



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/