StringToHGlobalAuto()

Marshal::StringToHGlobalAuto(const String&) method

Copies the contents of a specified string into unmanaged memory, converting to ANSI format if required.

static IntPtr System::Runtime::InteropServices::Marshal::StringToHGlobalAuto(const String &s)

Arguments

ParameterTypeDescription
sconst String&A string to be copied.

Return Value

The address, in unmanaged memory.

See Also