2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 Desc: Set the home directory for a program (PROGDIR:)
8 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <proto/exec.h>
13 /*****************************************************************************
16 #include <proto/dos.h>
18 AROS_LH1(BPTR
, SetProgramDir
,
21 AROS_LHA(BPTR
, lock
, D1
),
24 struct DosLibrary
*, DOSBase
, 99, Dos
)
27 This function will set a shared lock on the directory that the
28 current program was loaded from. This can be accessed through
29 the path PROGDIR:. The use of this path is to allow the program
30 to easily access files which are supplied with the program.
33 lock - The lock to set as the new program directory. NULL
37 This function will return the old program directory lock.
40 This function will not duplicate the lock, so you should not
52 *****************************************************************************/
59 pr
= (struct Process
*)FindTask(NULL
);
61 ASSERT_VALID_PROCESS(pr
);
63 oldLock
= pr
->pr_HomeDir
;
64 pr
->pr_HomeDir
= lock
;