This method of the DllLib class copies a string into a native memory block in ANSI format. The memory block is allocated by using GlobalAlloc (GMEM_FIXED).
public static int stringToHGlobalAnsi(String s);
Returns a pointer to the block that contains the specified string in ANSI format.
s | The string to copy. |
You can use the freeHGlobal method to release the block from Java.
stringToHGlobalAnsi was added as of versions 2437 through 2925 of the Microsoft virtual machine.