Juan Lang : msisip: Implement MsiSIPIsMyTypeOfFile.

Alexandre Julliard julliard at winehq.org
Fri Aug 1 05:33:53 CDT 2008


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Jul 31 08:51:02 2008 -0700

msisip: Implement MsiSIPIsMyTypeOfFile.

---

 dlls/msisip/Makefile.in |    2 +-
 dlls/msisip/main.c      |   34 ++++++++++++++++++++++++++++++++++
 dlls/msisip/msisip.spec |    2 +-
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/dlls/msisip/Makefile.in b/dlls/msisip/Makefile.in
index 51f6ee9..13bcfdd 100644
--- a/dlls/msisip/Makefile.in
+++ b/dlls/msisip/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = msisip.dll
-IMPORTS   = crypt32 kernel32
+IMPORTS   = crypt32 ole32 kernel32
 
 C_SRCS = \
 	main.c
diff --git a/dlls/msisip/main.c b/dlls/msisip/main.c
index 04ba033..e47c297 100644
--- a/dlls/msisip/main.c
+++ b/dlls/msisip/main.c
@@ -22,6 +22,8 @@
 #include "winbase.h"
 #include "wincrypt.h"
 #include "mssip.h"
+#define COBJMACROS
+#include "objbase.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(msisip);
@@ -93,3 +95,35 @@ HRESULT WINAPI DllUnregisterServer(void)
     CryptSIPRemoveProvider(&mySubject);
     return S_OK;
 }
+
+/***********************************************************************
+ *              MsiSIPIsMyTypeOfFile (MSISIP.@)
+ */
+BOOL WINAPI MsiSIPIsMyTypeOfFile(WCHAR *name, GUID *subject)
+{
+    static const WCHAR msi[] = { '.','m','s','i',0 };
+    static const WCHAR msp[] = { '.','m','s','p',0 };
+    BOOL ret = FALSE;
+
+    TRACE("(%s, %p)\n", debugstr_w(name), subject);
+
+    if (lstrlenW(name) < lstrlenW(msi))
+        return FALSE;
+    else if (lstrcmpiW(name + lstrlenW(name) - lstrlenW(msi), msi) &&
+     lstrcmpiW(name + lstrlenW(name) - lstrlenW(msp), msp))
+        return FALSE;
+    else
+    {
+        IStorage *stg = NULL;
+        HRESULT r = StgOpenStorage(name, NULL,
+         STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg);
+
+        if (SUCCEEDED(r))
+        {
+            IStorage_Release(stg);
+            *subject = mySubject;
+            ret = TRUE;
+        }
+    }
+    return ret;
+}
diff --git a/dlls/msisip/msisip.spec b/dlls/msisip/msisip.spec
index cfe1799..1e1f444 100644
--- a/dlls/msisip/msisip.spec
+++ b/dlls/msisip/msisip.spec
@@ -1,4 +1,4 @@
-5 stub MsiSIPIsMyTypeOfFile
+5 stdcall MsiSIPIsMyTypeOfFile(wstr ptr)
 6 stub MsiSIPGetSignedDataMsg
 7 stub MsiSIPPutSignedDataMsg
 8 stub MsiSIPRemoveSignedDataMsg




More information about the wine-cvs mailing list