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.StringToHGlobalUni

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;

Parameters

s
Managed String object to be copied.

Return Value

Address, in native heap, to where the string was copied

Exceptions

Exception Type Condition
System.Runtime.InteropServices.OutOfMemoryException if the method could not allocate enough native heap memory

See Also

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