Microsoft SDK for Java

stringToHGlobal

This method of the DllLib class copies a string into a native memory block, using either ANSI or Unicode format, depending on the auto mode setting. The memory block is allocated by using GlobalAlloc (GMEM_FIXED).

Syntax

public static int stringToHGlobal(String s);

Return Value

Returns a pointer to the block that contains the specified string.

Parameters

s The string to copy.

Remarks

You can use the freeHGlobal method to release the block from Java.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.