Question

I have CreateFile() to create a hidden file type but the problem that it keeps returning invalid handle.

file = CreateFileW(_T("hey.txt"),
                   GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
                   0, 0);
error = GetLastError();
WriteFile(file, buff, sizeof(buff),
          &dwRet, NULL);

Any idea?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top