NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Marshal.StringToCoTaskMemAuto

Copies the contents of a string to a block of memory allocated from the unmanaged COM task allocator. The characters of the string are copied as either ANSI or Unicode characters, depending on the operating system where the code is executing. On Windows 95 or Windows 98, the characters are copied as ANSI characters. On Windows NT 4.0 or Windows 2000, the characters are copied as Unicode characters.

[Visual Basic]
Public Shared Function StringToCoTaskMemAuto( _
   ByVal s As String _
) As Integer
[C#]
public static int StringToCoTaskMemAuto(
   string s
);
[C++]
public: static int StringToCoTaskMemAuto(
   String* s
);
[JScript]
public static function StringToCoTaskMemAuto(
   s : String
) : int;

Parameters

s
[To be supplied.]

See Also

Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace