2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Set the home directory for a program (PROGDIR:)
8 #include "dos_intern.h"
9 #include <proto/exec.h>
11 /*****************************************************************************
14 #include <proto/dos.h>
16 AROS_LH1(BPTR
, SetProgramDir
,
19 AROS_LHA(BPTR
, lock
, D1
),
22 struct DosLibrary
*, DOSBase
, 99, Dos
)
25 This function will set a shared lock on the directory that the
26 current program was loaded from. This can be accessed through
27 the path PROGDIR:. The use of this path is to allow the program
28 to easily access files which are supplied with the program.
31 lock - The lock to set as the new program directory. NULL
35 This function will return the old program directory lock.
38 This function will not duplicate the lock, so you should not
50 *****************************************************************************/
57 pr
= (struct Process
*)FindTask(NULL
);
58 oldLock
= pr
->pr_HomeDir
;
59 pr
->pr_HomeDir
= lock
;