Pass a string from C# to a C++ DLL in .NET (and get a pointer to the string's chars)
By George MacGyver at May 16 2022