FILE *fp; fp=fopen(path,"wb"); fseek(fp,0,SEEK_END); int length=ftell(fp); fclose(fp); length就是长度
The GetFileSize function retrieves the size, in bytes, of the specified file. DWORD GetFileSize( HANDLE hFile, // handle of file to get size of LPDWORD lpFileSizeHigh // address of high-order word for file size ); The FindFirstFile function searches a directory for a file whose name matches the specified filename. FindFirstFile examines subdirectory names as well as filenames. HANDLE FindFirstFile( LPCTSTR lpFileName, // pointer to name of file to search for LPWIN32_FIND_DATA lpFindFileData // pointer to returned information ); 两个都可以。
DWORD GetFileSize(HANDLE hFile,LPDWORD lpFileSizeHigh)
fp=fopen(path,"wb");
fseek(fp,0,SEEK_END);
int length=ftell(fp);
fclose(fp);
length就是长度
LPDWORD lpFileSizeHigh // address of high-order word for file size
);
The FindFirstFile function searches a directory for a file whose name matches the specified filename. FindFirstFile examines subdirectory names as well as filenames. HANDLE FindFirstFile( LPCTSTR lpFileName, // pointer to name of file to search for
LPWIN32_FIND_DATA lpFindFileData // pointer to returned information
);
两个都可以。