Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ StringToBSTR()

static unsafe IntPtr System.Runtime.InteropServices.Marshal.StringToBSTR ( string? s)
inlinestatic

Definition at line 1531 of file Marshal.cs.

1532 {
1533 if (s == null)
1534 {
1535 return IntPtr.Zero;
1536 }
1537 IntPtr intPtr = AllocBSTR(s.Length);
1538 s.CopyTo(new Span<char>((void*)intPtr, s.Length));
1539 return intPtr;
1540 }
static IntPtr AllocBSTR(int length)
Definition Marshal.cs:1730

References System.Runtime.InteropServices.Marshal.AllocBSTR(), System.s, and System.IntPtr.Zero.

Referenced by System.Runtime.InteropServices.Variant.CopyFromIndirect(), and Internal.Runtime.InteropServices.LicenseInteropProxy.GetCurrentContextInfo().