2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: dos.library function DupLock()
8 #include <proto/exec.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
14 #include <proto/dos.h>
16 AROS_LH1(BPTR
, DupLock
,
19 AROS_LHA(BPTR
, lock
, D1
),
22 struct DosLibrary
*, DOSBase
, 16, Dos
)
25 Clone a lock on a file or directory. This will only work on shared
32 The new lock or NULL in case of an error. IoErr() will give additional
33 information in that case.
36 This function is identical to DupLockFromFH().
46 *****************************************************************************/
48 /*****************************************************************************
51 #include <clib/dos_protos.h>
53 AROS_LH1(BPTR, DupLockFromFH,
56 AROS_LHA(BPTR, fh, D1),
59 struct DosLibrary *, DOSBase, 62, Dos)
62 Try to get a lock on the object selected by the filehandle.
68 The new lock or 0 in case of an error. IoErr() will give additional
69 information in that case.
72 This function is identical to DupLock().
82 *****************************************************************************/
83 /*AROS alias DupLockFromFH DupLock */
86 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
90 /* Use Lock() to clone the handle. cd to it first. */
91 old
= CurrentDir(lock
);
92 new=Lock("",SHARED_LOCK
);