Re: [AD] get_executable_name() in Windows

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


Thursday, September 19, 2002, 08:48:58, Eric Botcazou wrote:

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

Yes. I modified Allegro, and the dynamically linked version does return path
to executable. However, I noticed on MSDN that GetCommandLine() supports
Unicode for 9x, while GetModuleFileName() does not. I guess this could be the
reason it's not used? Not that GetCommandLineW() is used, but I guess this was
the intention, seeing as MessageBoxW() is used further down.

Or, maybe unicode names aren't important for files? I don't know much about
Unicode. I guess the alternatives are:

1) Keep current implementation, but use GetCommandLineW(); fix the fact that
'.exe' is stripped in some cases; change the docs

2) Use GetModuleFileName()

3) I should shut up because I don't know what I'm talking about :-)

-- 
Sincerely,
Daniel Schlyder



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