Docs » Autodocs » dos.library » GetProgramDir
GetProgramDir -- Returns a lock on the directory the program was loaded from (V36)
lock = GetProgramDir() D0 BPTR GetProgramDir(void)
Returns a shared lock on the directory the program was loaded from. This can be used for a program to find data files, etc, that are stored with the program, or to find the program file itself. NULL returns are valid, and may occur, for example, when running a program from the resident list. You should NOT unlock the lock.
lock - A lock on the directory the current program was loaded from, or NULL if loaded from resident list, etc.
Should return a lock for things loaded via resident. Perhaps should return currentdir if NULL.
SetProgramDir(), Open()
|