Page 1 of 1

GetModuleFileName returns empty string?

PostPosted: Feb 20, 2003 @ 3:04am
by hhhau
Hi everyone,

I have a question about getting the application path. When I call the function GetModuleFileName as follows:

GetModuleFileName( NULL, strPath, 100);

strPath is empty after the call. I have declared strPath as follows:

TCHAR strPath[100];

The function call is in my InitMusic() which is in my CGapiApplication derived class.

Am I doing something stupid again? :lol:

Thanks in advance for your answers!

PostPosted: Feb 20, 2003 @ 12:51pm
by Sm!rk

PostPosted: Feb 20, 2003 @ 12:55pm
by hhhau

PostPosted: Feb 20, 2003 @ 1:56pm
by hhhau

PostPosted: Feb 20, 2003 @ 3:15pm
by hhhau

PostPosted: Feb 20, 2003 @ 5:40pm
by Sm!rk
As a guess what I think just happened is that you can only support ppc2002 now. That function is not present in 2000, at least in my docs it says unsupported. So that may be why it wasn't working. But at any rate you aren't even checking the return value, which is generally unwise.

PostPosted: Feb 20, 2003 @ 10:08pm
by Pejo Software - Per

PostPosted: Feb 20, 2003 @ 11:57pm
by Sm!rk