win32 __PHYSFS_platformCalcBaseDir

Ryan C. Gordon icculus at
Wed Aug 29 01:04:57 EDT 2001

> Here you could use GetModuleHandle and GetModuleFileName to work out the
> executables directory.

(According to MSDN, you can just pass a NULL to GetModuleFileName() and
skip the call to GetModuleHandle() this inaccurate?)

The MSDN docs I'm looking at:

My concerns with this:
1) The MSDN docs say something about the "application's version number".
Where is that set?

2) There's no way to determine ahead of time how big the string
GetModuleFileName() returns will be. We could just allocate _MAX_PATH
chars, but that's obnoxious.

3) ...we have to cut the filename off the path, which is trivial,
but annoying.

Still, this could all be more efficient than the calls to SearchPath()...


More information about the physfs mailing list