|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jniwrapper.Parameter
com.jniwrapper.Pointer.Void
com.jniwrapper.win32.Handle
com.jniwrapper.win32.system.LocalMemoryBlock
This class represents a local memory block and corresponds to the HLOCAL native type.
| Field Summary |
| Fields inherited from class com.jniwrapper.win32.Handle |
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0 |
| Fields inherited from class com.jniwrapper.Parameter |
LICENSE_TYPE, V |
| Constructor Summary | |
LocalMemoryBlock()
Creates a LocalMemoryBlock object. |
|
LocalMemoryBlock(Handle handle)
Creates a LocalMemoryBlock object that references the memory that handles references. |
|
LocalMemoryBlock(int size,
MemoryAllocationAttributes attributes)
Allocates a local memory block of the specified size. |
|
| Method Summary | |
void |
free()
Frees the allocated memory. |
static void |
localFree(com.jniwrapper.Parameter localMemoryBlock)
Frees the allocated memory. |
Handle |
lock()
Locks the memory block and returns a pointer to the allocated memory. |
int |
size()
Returns the size of the allocated memory block. |
int |
unlock()
Decrements the lock count for the memory block. |
| Methods inherited from class com.jniwrapper.win32.Handle |
clone, closeHandle, equals, waitFor, waitFor |
| Methods inherited from class com.jniwrapper.Pointer.Void |
asFunction, asFunction, asTypedPointer, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
| Methods inherited from class com.jniwrapper.Parameter |
|
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LocalMemoryBlock()
public LocalMemoryBlock(Handle handle)
handle - handle to the local memory block
public LocalMemoryBlock(int size,
MemoryAllocationAttributes attributes)
size - the size of the allocated memoryattributes - allocation attributes| Method Detail |
public void free()
java.lang.RuntimeException - if failed to free the memory block.public static void localFree(com.jniwrapper.Parameter localMemoryBlock)
java.lang.RuntimeException - if failed to free the memory block.public int size()
public Handle lock()
public int unlock()
GetLastError function returns NO_ERROR, the memory block is unlocked.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||