
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetsemopn()</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
NNETSEMOPN()
Opens and initializes a semaphore
------------------------------------------------------------------------------
Syntax
NNETSEMOPN(<cName>,[<nValue>],[<cServer>|<nConId>]),
--> nHandle
Netware: 2.2 and 3.11
Arguments
<cName> Designates the name of the semaphore that is opened.
<nValue> Designates a start value between -128 and 127 for the
semaphore <cName>. The default value is 1. The file server accepts the
assignment only if <cName> is created by the function call.
<nHandle> Designates the semaphore handle that has been returned by
NNETSEMOPN() when the semaphore is opened.
<cServer> Designates the name of the file server on which <cName>
is created. Your workstation must be attached to <cServer>.
<nConId> Designates the connection ID for your workstation on
<cServer>.
Returns
NNETSEMOPN() returns the handle of the semaphore that has been opened.
The handle is used by the file server to manage the semaphores. If an
error occurs, the function returns 0.
Description
NOVELL NET SEMAPHOR OPEN
NNETSEMOPN() allows you to open an existing semaphore or to create a new
semaphore. If the specified semaphore does not exist on the file
server, the semaphore is created and entered into the file server's
semaphore table. The new semaphore can be assigned a start value by
passing <nValue>.
The function returns the handle used by the file server for the
semaphore <cName>. Handles are used to save variables because they are
needed as identification characteristics for other operations. Once a
semaphore has been opened successfully, it is exclusively addressed with
the handle returned by NNETSEMOPN().
Examples
. Create semaphore SUPERACC, and check to see if the semaphore
has been opened successfully with the handle:
nHandle=NNETSEMOPN("superacc")
IF nHandle=0
? 'Error during opening the semaphore!'
ENDIF
. Create semaphore TEST and assign a start value of 3, if it
does not already exist:
nHandle=NNETSEMOPN("test",3)
See Also: NNETSEMCLO()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson