Commit 34b783c1 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

msisip: Implement MsiSIPIsMyTypeOfFile.

parent 8fbd2c85
......@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = msisip.dll
IMPORTS = crypt32 kernel32
IMPORTS = crypt32 ole32 kernel32
C_SRCS = \
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;
}
5 stub MsiSIPIsMyTypeOfFile
5 stdcall MsiSIPIsMyTypeOfFile(wstr ptr)
6 stub MsiSIPGetSignedDataMsg
7 stub MsiSIPPutSignedDataMsg
8 stub MsiSIPRemoveSignedDataMsg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment