#include "stdafx.h"

#include<windows.h>

#include<iostream>

 

int _tmain(int argc, _TCHAR* argv[])

{

  TCHAR * filePath=TEXT("F:\\安装软件\\DiffMerge_4.1.0.534.stable_x86.zip");

  HANDLE hr=CreateFile(filePath,0,0,0,OPEN_EXISTING,0,0);

  DWORD size=0;

  if(hr==INVALID_HANDLE_VALUE)

  {

    size=0;

  }

  else

  {

  size=GetFileSize(hr,0);

  }

  CloseHandle(hr);

  std::cout<<size<<std::endl;

  return 0;

}

相关文章:

  • 2021-08-15
  • 2021-12-07
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
猜你喜欢
  • 2021-08-20
  • 2022-12-23
  • 2021-10-08
  • 2021-09-23
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案