public class Handle
extends com.jniwrapper.Pointer.Void
Modifier and Type | Field and Description |
---|---|
static int |
INFINITE_TIMEOUT
Specifies the infinite timeout value for
waitFor(Handle, long) function. |
static int |
INVALID_HANDLE_VALUE
Specifies invalid handle value.
|
static int |
STATUS_ABANDONED_WAIT_0
Specifies the abandoned status value of
waitFor(Handle, long) or waitFor(Handle) functions. |
static int |
STATUS_TIMEOUT
Specifies the timeout status value of
waitFor(Handle, long) or waitFor(Handle) functions. |
static int |
STATUS_WAIT_0
Specifies the status value of
waitFor(Handle, long) or waitFor(Handle) functions. |
Constructor and Description |
---|
Handle()
Constucts a blank handle instance.
|
Handle(long value)
Constructs a handle with the passed value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
static boolean |
closeHandle(Handle handle)
Closes the opened object handle.
|
boolean |
equals(java.lang.Object obj) |
static long |
waitFor(Handle handle)
Causes the current thread to wait on this handle infinitely.
|
static long |
waitFor(Handle handle,
long timeout)
Causes the current thread to wait on this handle the specified number of milliseconds.
This function is the wrapper for WaitForSingleObject Windows API function. |
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write
public static final int INFINITE_TIMEOUT
waitFor(Handle, long)
function.public static final int STATUS_WAIT_0
waitFor(Handle, long)
or waitFor(Handle)
functions.public static final int STATUS_ABANDONED_WAIT_0
waitFor(Handle, long)
or waitFor(Handle)
functions.public static final int STATUS_TIMEOUT
waitFor(Handle, long)
or waitFor(Handle)
functions.public static final int INVALID_HANDLE_VALUE
public Handle()
public Handle(long value)
value
- handle value.public java.lang.Object clone()
clone
in class com.jniwrapper.Pointer.Void
public boolean equals(java.lang.Object obj)
equals
in class com.jniwrapper.Pointer.Void
public static long waitFor(Handle handle, long timeout)
WaitForSingleObject
Windows API function.handle
- handle to wait fortimeout
- Time-out interval, in millisecondspublic static long waitFor(Handle handle)
handle
- handle to wait forpublic static boolean closeHandle(Handle handle)
CloseHandle
Windows API function.handle
- handle to an opened object