GetFileSize

[DllImport("Kernel32.dll", SetLastError = true)][return: MarshalAs(UnmanagedType.U4)]
public static extern uint GetFileSize(
   SafeFileHandle hFile,
   out uint lpFileSizeHigh
);

Microsoft documentation: Link

Last updated