https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.ptrtostringansi?view=netframework-4.8
Marshal.PtrToStringAnsi Method (System.Runtime.InteropServices) | Microsoft Learn
Allocates a managed String and copies all or part of an unmanaged ANSI (on Windows) or UTF-8 (on Unix) string into it.
marshalmethodsystemruntimemicrosoft