Last active
August 9, 2019 16:34
-
-
Save adaskar/35d99e005296dd376a45cd23d746c833 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define KEYWORD L"APIHook" | |
static BOOL WINAPI MY_DeleteFileW(_In_ LPCWSTR lpFileName) | |
{ | |
// Dosya isminde KEYWORD(L"APIHook") var mi? | |
// Var ise, LastError'u ERROR_ACCESS_DENIED yap ve hata don. | |
if (wcsstr(lpFileName, KEYWORD)) { | |
SetLastError(ERROR_ACCESS_DENIED); | |
return FALSE; | |
} | |
// Yok ise, gercek DeleteFileW i cagir. | |
return MS_DeleteFileW(lpFileName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment