Function NnetSemOpn() Foundation

Opens a semaphore and initializes it.

Syntax
NnetSemOpn( <cSemaphoreName>          , ;
            [<nSemaphoreValue>]       , ;  // Default: 1
            [<cFileServer|nConnectID>]  ;  // Default: NnetSname()
          ) --> nSemaphoreHandle
Return

Returns a numeric value which is used as the semaphore's handle. In case of an error 0 is returned.

Description

The value <nSemaphoreValue> must be a positive value up to 127. It is only assigned to the semaphore if <cSemaphoreName> does not exist on the file server (if it is opened the first time). The value indicates the maximum number of workstations which can have the semaphore open at the same time.

NnetSemVal() is used to retrieve the current value of a semaphore.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.