The DllLib class contains the following methods:
addrOf returns the address of a native structure wrapped by an @dll.struct object.
addrOfPinnedObject returns the address of the object's data while an object is pinned.
allocCoTaskMem allocates a native memory block by invoking the Win32 function CoTaskMemAlloc.
allocHGlobal allocates a native memory block using GlobalAlloc (GMEM_FIXED).
copy copies a number of bytes from a Java array to the destination indicated by a raw native pointer.
copyUni copies a number of characters to a Java array from the source indicated by a raw native pointer.
freeCoTaskMem frees a native memory block by invoking the Win32 function CoTaskMemFree.
freeHGlobal frees a native memory block by invoking the Win32 function GlobalFree.
freePinnedHandle frees a previously-allocated pinned handle.
getLastWin32Error returns the Microsoft® Win32® error code set by the last DLL-imported method (declared with the setLastError modifier) invoked on the current thread.
getPinnedHandle pins an object.
getPinnedObject retrieves the object that is encapsulated by a pinned handle.
isStruct determines whether a class represents a native structure.
numParamBytes prelinks the specified method and returns the number of bytes of memory required to store the method's parameters.
offsetOf returns the offset (measured in bytes) of a member of a native structure.
prelink preloads the native library and performs a type analysis on an @dll.import method to ensure that the types are compatible with DLL calling.
prelinkAll calls the prelink method on all methods of a class.
propagateStructFields propagates the fields from the native memory block to the Java object or from the Java object to the native memory block.
ptrToString converts a native string to a java.lang.String object.
ptrToStringAnsi converts a native string in ANSI format to a java.lang.String object.
ptrToStringUni converts a native string in Unicode format to a java.lang.String object.
ptrToStruct maps a raw pointer onto a structure.
read1 reads one byte of data from the memory location that is specified by a base address and an offset.
read2 reads two bytes of data from the memory location that is specified by a base address and an offset.
read4 reads four bytes of data from the memory location that is specified by a base address and an offset.
read8 reads eight bytes of data from the memory location that is specified by a base address and an offset.
release frees the native memory associated with an object declared using the @dll.struct compiler directive, if that memory would normally have been released by garbage collection.
resize reallocates the native memory block represented by an object declared using the @dll.struct directive.
sizeOf returns the size in bytes of the native structure represented by the specified class.
stringToCoTaskMem copies a string into a native memory block by using either ANSI or Unicode format depending on the auto mode setting.
stringToCoTaskMemAnsi copies a string into a native memory block in ANSI format.
stringToCoTaskMemUni copies a string into a native memory block in Unicode format.
stringToHGlobal copies a string into a native memory block, using either ANSI or Unicode format, depending on the auto mode setting.
stringToHGlobalAnsi copies a string into a native memory block in ANSI format.
stringToHGlobalUni copies a string into a native memory block in Unicode format.
throwWin32Exception throws a Win32Exception using the error code set by the last DLL-imported method (declared with the setLastError modifier) that is invoked on the current thread.
write1 writes one byte of data to the memory location that is specified by a base address and an offset.
write2 writes two bytes of data to the memory location that is specified by a base address and an offset.
write4 writes four bytes of data to the memory location that is specified by a base address and an offset.
write8 writes eight bytes of data to the memory location that is specified by a base address and an offset.