public StreamBridge(IntPtr stream) { _stream = stream; #if NETSTANDARD _methods = Marshal.PtrToStructure <IGR_Stream>(_stream); #else _methods = (IGR_Stream)Marshal.PtrToStructure(_stream, typeof(IGR_Stream)); #endif }
public static void DestroyStreamPtr(IntPtr stream) { #if NETSTANDARD IGR_Stream igr = Marshal.PtrToStructure <IGR_Stream>(stream); #else IGR_Stream igr = (IGR_Stream)Marshal.PtrToStructure(stream, typeof(IGR_Stream)); #endif igr.Close(stream); }