0

I have a rather simple program that computes the CRC32 of files. It works for almost any file, but certain files in the System32 folder are inaccessible.

  1. The program is written in C++.
  2. The files that I have issues with are found using fHandle = ::FindFirstFileEx(m_szPathname, FindExInfoStandard, &fData, FindExSearchNameMatch, NULL, FIND_FIRST_EX_CASE_SENSITIVE);
  3. When FindFirstFile was used those files are not found.
  4. For only those files, CreateFile returns an error, and GetLastError indicates that the file does not exist. HANDLE fHandle = CreateFile(szPathname, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
  5. When I perform a ShellExecute to use cmd.exe to DIR or COPY such files I get different results than if I do the exact same thing from a shell launched from the Start Menu. Specifically once again those files are not found.

There has got to be some sort of magic involved, but I haven't found anything online that speaks to what that magic might be.

Ike
  • 1
  • It would help to be more specific as to which files or at least some of which files you are having trouble with? Are you aware of the [File System Redirector](https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector). 32-bit applications will not see the same files as 64-bit applications. – Appleoddity Jul 29 '19 at 17:13
  • Your results may vary from mine. Here on my desktop one file that had that issue was irftp.exe, or C:\windows\system32\irftp.exe. I see nothing remarkable about that file to explain why it would be different than say ipconfig.exe. OMG! And even today I get a different result. Now FindFirstFileEx does not find it! – Ike Jul 30 '19 at 20:11

0 Answers0