Code:

#include <direct.h>

void SetPathToExe(void)
{
TCHAR exePath[MAX_PATH+1] ;

::GetModuleFileName( ::GetModuleHandle(0), exePath, sizeof( exePath )-1 ) ;
_chdir( exePath ) ;
}




Then just call 'SetPathToExe() ;'


Kindly
~Roland

Last edited by rstralberg; 03/18/08 12:17.

Roland Strålberg Gamestudio/A7 Commercial rstralberg@msn.com