In The Hand LtdIn The Hand
StringToHGlobalUni Method (s)
NamespacesInTheHand.Runtime.InteropServicesMarshalHelperStringToHGlobalUni(String)
.NET Components for Mobility
Copies the contents of a managed String into unmanaged memory.
Declaration Syntax
C#Visual Basic
public static IntPtr StringToHGlobalUni(
	string s
)
Public Shared Function StringToHGlobalUni ( _
	s As String _
) As IntPtr
Parameters
s (String)
A managed string to be copied.
Return Value
The address, in unmanaged memory, to where the s was copied, or 0 if null string was supplied.
Remarks
StringToHGlobalUni is useful for custom marshaling or for use when mixing managed and unmanaged code. Since this method allocates the unmanaged memory required for a string, always free the memory by calling FreeHGlobal(IntPtr). This method provides the opposite functionality of PtrToStringUni(IntPtr).

Assembly: InTheHand (Module: InTheHand) Version: 7.0.0.0