FT_NWSEMUNLOCK

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()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.