Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Refactor DdlImports - System.Reflection.Metadata - additional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
madmir committed Aug 27, 2019
1 parent dae38fb commit 2857de1
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal static unsafe bool TryReadFile(Stream stream, byte* buffer, long start,

try
{
result = ReadFile(handle, buffer, size, out bytesRead, IntPtr.Zero);
result = Interop.Kernel32.ReadFile(handle, buffer, size, out bytesRead, IntPtr.Zero);
}
catch
{
Expand All @@ -125,15 +125,5 @@ internal static unsafe bool TryReadFile(Stream stream, byte* buffer, long start,

return true;
}

[DllImport(@"kernel32.dll", EntryPoint = "ReadFile", ExactSpelling = true, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern unsafe bool ReadFile(
SafeHandle fileHandle,
byte* buffer,
int byteCount,
out int bytesRead,
IntPtr overlapped
);
}
}

0 comments on commit 2857de1

Please sign in to comment.