Microsoft SDK for Java

stringToCoTaskMemAnsi

This method of the DllLib class copies a string into a native memory block in ANSI format. The memory block is allocated by using the Win32 function CoTaskMemAlloc.

Syntax

public static int stringToCoTaskMemAnsi(String s);

Return Value

Returns a pointer to the block that contains the specified string in ANSI format.

Parameters

s The string to copy.

Remarks

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

stringToCoTaskMemAnsi was added as of versions 2437 through 2925 of the Microsoft virtual machine.

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