This commit is contained in:
Birunthan Mohanathas
2011-11-08 19:02:31 +00:00
parent dfd53fb158
commit 852163bf68
4 changed files with 25 additions and 23 deletions

View File

@ -1034,6 +1034,24 @@ ULONGLONG CSystem::GetTickCount64()
}
}
/*
** IsFileWritable
**
** Checks if file is writable.
**
*/
bool CSystem::IsFileWritable(LPCWSTR file)
{
HANDLE hFile = CreateFile(file, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
return false;
}
CloseHandle(hFile);
return true;
}
/*
** RmLoadLibrary
**