https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.ptrtostructure?view=net-10.0&redirectedfrom=MSDN
Marshal.PtrToStructure Method (System.Runtime.InteropServices) | Microsoft Learn
Marshals data from an unmanaged block of memory to a managed object.
marshalmethodsystemruntimemicrosoft