string newname = string(tempnam(NULL, NULL)) + ext;
string oldname = testFilePath(filename) + ext;
#ifdef _WIN32
- CopyFile(oldname.c_str(), newname.c_str(), FALSE);
- SetFileAttributes(newname.c_str(), GetFileAttributes(newname.c_str()) & ~FILE_ATTRIBUTE_READONLY);
+ CopyFileA(oldname.c_str(), newname.c_str(), FALSE);
+ SetFileAttributesA(newname.c_str(), GetFileAttributesA(newname.c_str()) & ~FILE_ATTRIBUTE_READONLY);
#else
char buffer[4096];
int bytes;