Copies the contents of a string to block of memory allocated from the unmanaged COM task allocator. The characters of the string are copied as ANSI characters.
[Visual Basic] Public Shared Function StringToCoTaskMemAnsi( _ ByVal s As String _ ) As Integer [C#] public static int StringToCoTaskMemAnsi( string s ); [C++] public: static int StringToCoTaskMemAnsi( String* s ); [JScript] public static function StringToCoTaskMemAnsi( s : String ) : int;
An integer representing a pointer to the block of memory allocated for the string.
Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace