2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: GetProgramDir() - Get the lock for PROGDIR:
8 #include "dos_intern.h"
9 #include <proto/exec.h>
11 /*****************************************************************************
14 #include <proto/dos.h>
16 AROS_LH0(BPTR
, GetProgramDir
,
22 struct DosLibrary
*, DOSBase
, 100, Dos
)
25 This function will return the shared lock on the directory that
26 the current process was loaded from. You can use this to help
27 you find data files which were supplied with your program.
29 A NULL return is possible, which means that you may be running
30 from the Resident list.
32 You should NOT under any circumstance UnLock() this lock.
37 A shared lock on the directory the program was started from.
49 *****************************************************************************/
53 return ((struct Process
*)FindTask(NULL
))->pr_HomeDir
;