Hello, I do not understand why I have an error (the one I mention in the title) on the next line
const char* filename = InFile;
the code is a bit extensive I'll leave the main
int main(int argc, char * argv[]){
FILE* InFile = fopen(argv[1], "rb");
const char* filename = InFile;
DWORD crc = GetFileCRC32(filename);
DWORD wSize = GetFileSize(InFile, NULL);
printf("crc32: %lu %lu", crc, wSize);
fclose(InFile);
}
update, how can I weigh a file to this function to generate the crc32?
DWORD GetFileCRC32(const char* c_szFileName)
{
HANDLE hFile = CreateFile(c_szFileName, // name of the file
GENERIC_READ, // desired access
FILE_SHARE_READ, // share mode
NULL, // security attributes
OPEN_EXISTING, // creation disposition
FILE_ATTRIBUTE_NORMAL, // flags and attr
NULL); // template file
if (INVALID_HANDLE_VALUE == hFile)
return 0;
DWORD dwRetCRC32=GetHFILECRC32(hFile);
CloseHandle(hFile);
return dwRetCRC32;
}