Original Post
Im creating a function to find the size of a file.
BOOL WINAPI GetFileSizeEx( HANDLE hFile, PLARGE_INTEGER lpFileSize )
{
char temp;
lpFileSize = 0;
FILE *File = (hFile);
while(!feof(File))
{
temp=fgetc(File);
lpFileSize++;
}
if(ferror(File))
{
return false;
}
return true;
}
As you can obviously tell....it doesn''t work. I get errors. It sucks. Anybody know what cast I can use to do this?
FILE *File = const_cast(hFile);
this gives me an error saying I need to make my own conversion, because reinterpret_cast and const_cast can not do it. Anybody have a clue?
error C2440: ''initializing'' : cannot convert from ''void *'' to ''struct _iobuf *''
if that helps....