Welcome, Guest. Please login or register.

Author Topic: It's all double-DOS to me...  (Read 2356 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: It's all double-DOS to me...
« on: April 10, 2004, 12:18:17 AM »

Man, read the autodocs !!!!!!

Well, one way to do it is this:

char filename[256];
strcpy (filename,filereq->fr_Drawer);
AddPart (filename,filereq->fr_File,256);
f = Open(filename,MODE_OLDFILE);

Another way is this:

lock = Lock (filereq->fr_Drawer);
olddir = CurrentDir (lock);
f = Open (filereq->fr_File);
...
Close (f);
CurrentDir (olddir);
Unlock (lock);

As you can see you should store the result of CurrentDir and change it back before you leave.

SetCurrentDir() just sets the string which is displayed in the Shell prompt if you let it display the current path. It does not change the current directory.

Bye,
Thomas