void DLL_EXPORT Replace(LPCTSTR OriginalFile, LPCTSTR FileToReplace, LPCTSTR BackupOfFileToReplace)
{
HGLOBAL LoadResource(HMODULE hModule, HRSRC hResInfo);
try
{
BOOL WINAPI ReplaceFile(OriginalFile, FileToReplace, BackupOfFileToReplace);
MessageBox(NULL, "Done", "Alert", 0);
}
catch (...){}
}
The above is my code and it gives me errors like:
In function 'void Replace(LPCTSTR, LPCTSTR, LPCTSTR)':|
warning: '__stdcall__' attribute only applies to function types [-Wattributes]|
error: expression list treated as compound expression in initializer [-fpermissive]|
warning: left operand of comma operator has no effect [-Wunused-value]|
warning: right operand of comma operator has no effect [-Wunused-value]|
error: invalid conversion from 'LPCTSTR {aka const char*}' to 'BOOL {aka int}' [-fpermissive]|
warning: unused variable 'ReplaceFile' [-Wunused-variable]|
||=== Build finished: 2 errors, 4 warnings ===|
I've googled everything and cannot for the life of me figure out why it's giving me these errors.. I have all the right includes, everything! Any help is appreciated.