FT_NWSEMEX

FT_NWSEMEX()
 Examine a NetWare semaphore's value and open count

 Syntax

       FT_NWSEMEX( <nHandle>, <@nValue>, <@nOpenCnt> ) -> nRc

 Arguments

      <nHandle> is the semaphore handle, returned from a previous call
      to FT_NWSEMOPEN().

      <@nValue> will get the current semaphore value.  THIS NUMERIC
      ARGUMENT MUST BE PASSED BY REFERENCE!

      <@nOpenCnt> will get the current number of workstations
      that have opened the semaphore.  THIS NUMERIC ARGUMENT MUST BE
      PASSED BY REFERENCE!

 Returns

      nRc, a numeric, as follows:

            0 - success
          255 - invalid semaphore handle

      In addition, nValue will be set to the semaphore's current value,
      and nOpenCnt will be set to the number of stations that have
      opened the semaphore.

 Description

      See the description for FT_NWSEMOPEN().

 Examples

    nInitVal := 2
    nHandle  := 0
    nOpenCnt := 0

    FT_NWSEMOPEN( "Semaphore Test", nInitVal, @nHandle, @nOpenCnt )

    nRc := FT_NWSEMWAIT( nHandle )
        IF nRc == 254
       QOUT( "All slots for this resource are currently in use" )
       QUIT
    ENDIF

    FT_NWSEMEX( nHandle, @nValue, @nOpenCnt )
    QOUT( "Semaphore test -> Open at [" + ;
          ALLTRIM(STR(nOpenCnt))        + ;
          "] stations, value is ["      + ;
          ALLTRIM(STR(nValue)) + "]" )

 Source: NWSEM.PRG

 Author: Glenn Scott

See Also: FT_NWSEMOPEN() FT_NWSEMWAIT() FT_NWSEMSIG() FT_NWSEMCLOSE() FT_NWSEMLOCK()


7 responses to “FT_NWSEMEX

  1. Pingback: FT_NWSEMWAIT | Viva Clipper !

  2. Pingback: FT_NWSEMUNLOCK | Viva Clipper !

  3. Pingback: FT_NWSEMSIG | Viva Clipper !

  4. Pingback: FT_NWSEMOPEN | Viva Clipper !

  5. Pingback: FT_NWSEMLOCK | Viva Clipper !

  6. Pingback: FT_NWSEMCLOSE | Viva Clipper !

  7. Pingback: FT NetWare | Viva Clipper !

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.