2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: GetProgramDir() - Get the lock for PROGDIR:
8 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <proto/exec.h>
13 /*****************************************************************************
16 #include <proto/dos.h>
18 AROS_LH0(BPTR
, GetProgramDir
,
24 struct DosLibrary
*, DOSBase
, 100, Dos
)
27 This function will return the shared lock on the directory that
28 the current process was loaded from. You can use this to help
29 you find data files which were supplied with your program.
31 A NULL return is possible, which means that you may be running
32 from the Resident list.
34 You should NOT under any circumstance UnLock() this lock.
39 A shared lock on the directory the program was started from.
51 *****************************************************************************/
55 struct Process
*me
= (struct Process
*)FindTask(NULL
);
56 ASSERT_VALID_PROCESS(me
);
57 return me
->pr_HomeDir
;