Detlef Riekenberg : sfc: Forward SfcIsFileProtected to sfc_os.dll.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 17 05:21:40 CST 2007


Module: wine
Branch: master
Commit: 544153689a616f591b4425f0056432e34345d833
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=544153689a616f591b4425f0056432e34345d833

Author: Detlef Riekenberg <wine.dev at web.de>
Date:   Tue Jan 16 20:35:33 2007 +0100

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 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..58957c8 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 <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;
 }




More information about the wine-cvs mailing list