Ok.... next one to try then ...
I have added a verify ...

Code:

#include <windows.h>
#include <stdio.h>
#define MAX_PATH 260

void SetPathToExe(void)
{
char exePath[MAX_PATH] ;

GetModuleFileName( GetModuleHandle(0), exePath, (MAX_PATH-1) ) ;
_chdir( exePath ) ;

// verify
_getcwd(exePath, (MAX_PATH-1) ) ;
printf( "%s\n", exePath ) ;
}




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