newObjects ActiveX Pack1 Mutex
 

See also object creation information - ClassID/ProgID 

Overview | Reference

Overview

Mutex object.  

Reference

method.gif (107 bytes) Create Syntax:
object.Create([owned [, name]])

Initializes the Mutex object. Must be called before any other usage.

owned - Boolean, default is False. If True the Mutex is owned by the calling thread.

name - name of the Mutex, default is unnamed (empty string does the same).

method.gif (107 bytes) ReleaseMutex Syntax:
object.ReleaseMutex

Releases the ownership over the Mutex object and leaves it to be obtained by other waiting threads.

method.gif (107 bytes) Wait Syntax:
b = object.Wait([timeout])

Waits the specified time to obtain the ownership over the Mutex object.

Returns: True if the wait operation is successful and False if the Timeout has been exceeded.

timeout - (long) milliseconds to wait. Default is infinite (-1).

Valid Syntax:
b = object.Valid

Checks if the object is valid - initialized. If the Create method has not been called yet it will return False, otherwise True will be returned. Rarely needed but in applications with code spread through many files (such as ASP applications) it may be useful to resolve some application design problems.

IsOwned Syntax:
b = object.IsSet

Like Wait but waits 0 milliseconds and returns the state of the Mutex object (Boolean). 

...

newObjects Copyright 2001-2006 newObjects [ ]