[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FT_NWSEMUNLOCK()
"Unlock" a semaphore locked by FT_NWSEMLOCK()
------------------------------------------------------------------------------
Syntax
FT_NWSEMUNLOCK( <nHandle> ) -> lRet
Arguments
<nHandle> is the semaphore handle returned from FT_NWSEMLOCK()
Returns
lRet == .t. if you successfully unlock the semaphore, .f. if
you don't. If this call fails, it could be that you're passing
an invalid semaphore handle.
Description
This call unlocks a semaphore prevsiously locked via FT_NWSEMLOCK().
It is important that you get a valid semaphore handle from
FT_NWSEMLOCK() before you use this call. Make sure when you call
FT_NWSEMLOCK() that you pass a numeric parameter in for the handle
BY REFERENCE.
Examples
LOCAL nHandle := 0
IF FT_NWSEMLOCK( "k:\apps\error.log", @nHandle )
// Note, you aren't actually LOCKING this file, you are
// just locking a semaphore by the same name. As long as
// all apps that might be using this file are cooperating
// with the same kind of semaphore lock, you can effectively
// control access to the file.
ELSE
QOUT("Couldn't lock file.")
ENDIF
* Processing, then:
FT_NWSEMUNLOCK( nHandle )
Source: NWSEM.PRG
Author: Glenn Scott
See Also:
FT_NWSEMOPEN()
FT_NWSEMEX()
FT_NWSEMWAIT()
FT_NWSEMSIG()
FT_NWSEMLOCK()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson