I'm going insane. I cannot figure out what function to call to delete the files in a folder.
All I get is an error: GetLastError = 6: "Invalid Handle". Oh thank yo that's useful.Code:const wchar_t g_wsz_DriverBackupFolder[] = L"C:\\Sample\\*\0\0\0\0"; SHFILEOPSTRUCT info; memset(&info, 0, sizeof(info)); info.wFunc = FO_DELETE; info.fFlags = FOF_NOCONFIRMATION | FOF_SILENT; info.pFrom = g_wsz_DriverBackupFolder; if (0 != SHFileOperation(&info)) { DWORD dwError = GetLastError(); DWORD dwError1 = GetLastError(); DWORD dwError2 = GetLastError(); DWORD dwError3 = GetLastError(); }
I don't want any nag screens or anything asking me how I feel. I just want the contents to be gone. I also have no patience at this point whatsoever so please don't answer with a riddle or broken code fragment. I will just blow my top and since I'm not videoing this I won't even be able to post to YouTube whatever funny destructive thing I end up doing.




Reply With Quote