Page 1 of 1

Getting the current directory in windows CE

PostPosted: May 2, 2002 @ 5:09am
by DillRye
Someone suggested I should use this:

TCHAR junk[50];
GetModuleFileName( NULL, junk, 50 );

I had it write out to a file for testing and it just said the path was "\".

I was wondering if maybe I did this wrong, or if theres a different way of doing it.

PostPosted: May 2, 2002 @ 6:27am
by Dan East

PostPosted: May 2, 2002 @ 7:32am
by DillRye
I tried word, and then notepad.

TCHAR junk[50];
GetModuleFileName( NULL, junk, 50 );
FILE *input;
input=fopen("error.txt","w");
fprintf(input,"%s",junk);
fclose(input);

That exact code there outputs to error.txt a "\" and thats it....

PostPosted: May 2, 2002 @ 12:42pm
by Dan East