Summary:
In Unicode enabled projects, this errors because CreateFile aliases
CreateFileW, which takes wchar_t* not char*.
Reviewed By: Orvid, yfeldblum
Differential Revision:
D4878424
fbshipit-source-id:
b44b369c0533e74163f68d95c2bf353584033731
return -1;
}
- HANDLE h = CreateFile(path,
- GENERIC_READ,
- FILE_SHARE_READ,
- nullptr,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- nullptr);
+ HANDLE h = CreateFileA(
+ path,
+ GENERIC_READ,
+ FILE_SHARE_READ,
+ nullptr,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS,
+ nullptr);
if (h == INVALID_HANDLE_VALUE) {
return -1;
}