sfc: (2/2) forward SfcIsFileProtected to sfc_os.dll

Detlef Riekenberg wine.dev at web.de
Tue Jan 16 13:35:33 CST 2007


sfc.dll is just a forwarder to sfc_os.dll since XP

The native importlib is still "sfc.lib" 
(Thanks Francois)


Changelog:
- sfc: forward SfcIsFileProtected to sfc_os.dll



-- 
 
By by ... Detlef

-------------- next part --------------
>From 577054dfd5ec0e4d937d55622fdfda4d8be5db21 Mon Sep 17 00:00:00 2001
From: Detlef Riekenberg <wine.dev at web.de>
Date: Tue, 16 Jan 2007 20:15:16 +0100
Subject: [PATCH] sfc: forward SfcIsFileProtected to sfc_os.dll
---
 dlls/sfc/sfc.spec   |    2 +-
 dlls/sfc/sfc_main.c |   47 +++++++++++++++++------------------------------
 2 files changed, 18 insertions(+), 31 deletions(-)

diff --git a/dlls/sfc/sfc.spec b/dlls/sfc/sfc.spec
index bd71d4d..20d0da5 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 6563365..c148f26 100644
--- a/dlls/sfc/sfc_main.c
+++ b/dlls/sfc/sfc_main.c
@@ -20,49 +20,36 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+/*
+ * Moved to sfc_os.dll since XP
+ *
+ */
+ 
 #include <stdarg.h>
 
 #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;
 }
+
-- 
1.4.1



More information about the wine-patches mailing list