通过 GetFileSize API 函数获取文件大小;
HANDLE hFile;
DWORD dwFileSize = 0;
char szData[30];
hFile = CreateFile("e:\test1.wav",GENERIC_READ,FILE_SHARE_READ,NULL,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
dwFileSize = GetFileSize(hFile,NULL);
CloseHandle(hFile);
sprintf(szData,"File Size : %d",dwFileSize);
MessageBox(NULL,szData,"FileSize",MB_ICONINFORMATION);