Copies the contents of a managed String object into native heap. (source and destination are both UNICODE). The method allocates the required, native heap memory.
[Visual Basic] Public Shared Function StringToHGlobalUni( _ ByVal s As String _ ) As Integer [C#] public static int StringToHGlobalUni( string s ); [C++] public: static int StringToHGlobalUni( String* s ); [JScript] public static function StringToHGlobalUni( s : String ) : int;
Address, in native heap, to where the string was copied
Exception Type | Condition |
---|---|
System.Runtime.InteropServices.OutOfMemoryException | if the method could not allocate enough native heap memory |
Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace