I'm trying to use the GetFileSize(); on a directory... but I can't get it to work...
But that didn't seem to work... I added this:
hDir = CreateFile(theDir, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
dirSize = GetFileSize(hDir, NULL);
Which I got off MSDN... That said 'The handle is invalid.' Why though?
if(dirSize == INVALID_FILE_SIZE)
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL);
MessageBox(hwndDlg, (LPCTSTR) lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION);