winapi - C Windows Add Default Search path for files (fopen...) -
i have written little interpreter can run scripts. convenience, associated file type (.apol) interpreter located in "c:\apol\interpeter.exe" whenever double click .apol file script interpreter pop , run file.
but heres problem. lets assume script looks following:
f = openfile("data.txt") //pseudocode
of course, windows in directory of "c:\apol\" first file, want, windows in directory of scipt file instead of interpreter, somehow possible set up?
you want use universal naming convention path syntax in call fopen. see fopen file windows network location
also want find out script file user clicked on, located:
int winapi winmain( hinstance hinstance, hinstance hprevinstance, lpstr lpcmdline, int nshowcmd );
the lpcmdline has information you.
Comments
Post a Comment