From 544153689a616f591b4425f0056432e34345d833 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Tue, 16 Jan 2007 20:35:33 +0100 Subject: [PATCH] sfc: Forward SfcIsFileProtected to sfc_os.dll. --- dlls/sfc/sfc.spec | 2 +- dlls/sfc/sfc_main.c | 46 ++++++++++++++++----------------------------- 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/dlls/sfc/sfc.spec b/dlls/sfc/sfc.spec index bd71d4d6b81..20d0da57788 100644 --- a/dlls/sfc/sfc.spec +++ b/dlls/sfc/sfc.spec @@ -1,2 +1,2 @@ @ stub SfcGetNextProtectedFile -@ stdcall SfcIsFileProtected(ptr wstr) +@ stdcall SfcIsFileProtected(ptr wstr) sfc_os.SfcIsFileProtected diff --git a/dlls/sfc/sfc_main.c b/dlls/sfc/sfc_main.c index 6563365790a..58957c89371 100644 --- a/dlls/sfc/sfc_main.c +++ b/dlls/sfc/sfc_main.c @@ -20,49 +20,35 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +/* + * Moved to sfc_os.dll since XP + * + */ + #include #include "windef.h" #include "winbase.h" #include "winerror.h" -#include "sfc.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(sfc); /****************************************************************** - * SfcIsFileProtected [SFC.@] - * - * Check, if the given File is protected by the System - * - * PARAMS - * RpcHandle [I] This must be NULL - * ProtFileName [I] Filename with Path to check - * - * RETURNS - * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND - * Success: TRUE, when the File is Protected - * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND, - * when the File is not Protected - * - * - * BUGS - * We return always the Result for: "File is not Protected" - * + * DllMain */ -BOOL WINAPI SfcIsFileProtected(HANDLE RpcHandle, LPCWSTR ProtFileName) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - static BOOL reported = FALSE; + TRACE("(%p, %d, %p)\n",hinstDLL, fdwReason, lpvReserved); - if (reported) { - TRACE("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName)); - } - else + switch(fdwReason) { - FIXME("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName)); - reported = TRUE; - } + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ - SetLastError(ERROR_FILE_NOT_FOUND); - return FALSE; + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls( hinstDLL ); + break; + } + return TRUE; }