This site is no longer active and is available for archival purposes only. Registration and login is disabled.

GetModuleFileName returns empty string?


GetModuleFileName returns empty string?

Postby hhhau » Feb 20, 2003 @ 3:04am

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!
hhhau
pm Member
 
Posts: 10
Joined: Dec 19, 2002 @ 4:01am
Location: Netherlands


Postby Sm!rk » Feb 20, 2003 @ 12:51pm

User avatar
Sm!rk
pm Member
 
Posts: 172
Joined: Dec 16, 2002 @ 4:40pm


Postby hhhau » Feb 20, 2003 @ 12:55pm

hhhau
pm Member
 
Posts: 10
Joined: Dec 19, 2002 @ 4:01am
Location: Netherlands


Postby hhhau » Feb 20, 2003 @ 1:56pm

hhhau
pm Member
 
Posts: 10
Joined: Dec 19, 2002 @ 4:01am
Location: Netherlands


Postby hhhau » Feb 20, 2003 @ 3:15pm

hhhau
pm Member
 
Posts: 10
Joined: Dec 19, 2002 @ 4:01am
Location: Netherlands


Postby Sm!rk » Feb 20, 2003 @ 5:40pm

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.
User avatar
Sm!rk
pm Member
 
Posts: 172
Joined: Dec 16, 2002 @ 4:40pm


Postby Pejo Software - Per » Feb 20, 2003 @ 10:08pm

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby Sm!rk » Feb 20, 2003 @ 11:57pm

User avatar
Sm!rk
pm Member
 
Posts: 172
Joined: Dec 16, 2002 @ 4:40pm


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron