itss: Convert protocol registration to the IRegistrar format.

This commit is contained in:
Alexandre Julliard 2010-12-13 21:18:15 +01:00
parent 889ac56f50
commit 41eb98e4b7
6 changed files with 113 additions and 136 deletions

View File

@ -10,6 +10,8 @@ C_SRCS = \
protocol.c \
storage.c
IDL_R_SRCS = itss.idl
RC_SRCS = rsrc.rc
@MAKE_DLL_RULES@

View File

@ -33,6 +33,7 @@
#include "winuser.h"
#include "winreg.h"
#include "ole2.h"
#include "rpcproxy.h"
#include "advpub.h"
#include "wine/unicode.h"
@ -387,65 +388,12 @@ HRESULT WINAPI DllCanUnloadNow(void)
return dll_count ? S_FALSE : S_OK;
}
#define INF_SET_ID(id) \
do \
{ \
static CHAR name[] = #id; \
\
pse[i].pszName = name; \
clsids[i++] = &id; \
} while (0)
#define INF_SET_CLSID(clsid) INF_SET_ID(CLSID_ ## clsid)
static HRESULT register_server(BOOL do_register)
{
HRESULT hres;
HMODULE hAdvpack;
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
STRTABLEA strtable;
STRENTRYA pse[4];
static CLSID const *clsids[4];
DWORD i = 0;
static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
INF_SET_CLSID(ITStorage);
INF_SET_CLSID(MSFSStore);
INF_SET_CLSID(MSITStore);
INF_SET_CLSID(ITSProtocol);
strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
strtable.pse = pse;
for(i=0; i < strtable.cEntries; i++) {
pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, 39);
sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
}
hAdvpack = LoadLibraryW(wszAdvpack);
pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable);
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
HeapFree(GetProcessHeap(), 0, pse[i].pszValue);
return hres;
}
#undef INF_SET_CLSID
#undef INF_SET_ID
/***********************************************************************
* DllRegisterServer (ITSS.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return register_server(TRUE);
return __wine_register_resources( hInst, NULL );
}
/***********************************************************************
@ -453,5 +401,5 @@ HRESULT WINAPI DllRegisterServer(void)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return register_server(FALSE);
return __wine_unregister_resources( hInst, NULL );
}

55
dlls/itss/itss.idl Normal file
View File

@ -0,0 +1,55 @@
/*
* COM Classes for itss
*
* Copyright 2010 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
[
helpstring("Microsoft InfoTech Protocol for IE 3.0"),
threading(both),
progid("MSITFS1.0"),
vi_progid("MSITFS"),
uuid(9d148290-b9c8-11d0-a4cc-0000f80149f6)
]
coclass MSITStore { interface IParseDisplayName; }
[
helpstring("Microsoft InfoTech Protocol for IE 4.0"),
threading(both),
progid("MSITFS1.0"),
vi_progid("MSITFS"),
uuid(9d148291-b9c8-11d0-a4cc-0000f80149f6)
]
coclass ITSProtocol { interface IInternetProtocolInfo; }
[
helpstring("Microsoft InfoTech IStorage for Win32 Files"),
threading(both),
progid("MSITFS1.0"),
vi_progid("MSITFS"),
uuid(d54eee56-aaab-11d0-9e1d-00a0c922e6ec)
]
coclass MSFSStore { }
[
helpstring("Microsoft InfoTech IStorage System"),
threading(both),
progid("MSITFS1.0"),
vi_progid("MSITFS"),
uuid(5d02926a-212e-11d0-9df9-00a0c922e6ec)
]
coclass ITStorage { interface IITStorage; }

View File

@ -1,79 +0,0 @@
[version]
Signature="$CHICAGO$"
[RegisterDll]
AddReg=Classes.Reg, Misc.Reg
[UnregisterDll]
DelReg=Classes.Reg, Misc.Reg
[Classes.Reg]
;; ITStorage
HKCR,"CLSID\%CLSID_ITStorage%",,,"Microsoft InfoTech IStorage System"
HKCR,"CLSID\%CLSID_ITStorage%\InProcServer32",,,"itss.dll"
HKCR,"CLSID\%CLSID_ITStorage%\InProcServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_ITStorage%\NotInsertable",,16
HKCR,"CLSID\%CLSID_ITStorage%\ProgID",,,"MSITFS1.0"
HKCR,"CLSID\%CLSID_ITStorage%\VersionIndependentProgID",,,"MSITFS"
HKCR,"MSITFS",,,"Microsoft InfoTech IStorage System"
HKCR,"MSITFS\CLSID",,,"%CLSID_ITStorage%"
HKCR,"MSITFS\CurVer",,,"MSITFS1.0"
;; ITSProtocol for IE 3.0
HKCR,"CLSID\%CLSID_MSITStore%",,,"Microsoft InfoTech Protocol for IE 3.0"
HKCR,"CLSID\%CLSID_MSITStore%\InProcServer32",,,"itss.dll"
HKCR,"CLSID\%CLSID_MSITStore%\InProcServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_MSITStore%\NotInsertable",,16
HKCR,"CLSID\%CLSID_MSITStore%\ProgID",,,"MSITFS1.0"
HKCR,"CLSID\%CLSID_MSITStore%\VersionIndependentProgID",,,"MSITFS"
HKCR,"MSITStore",,,"Microsoft InfoTech Protocol for IE 3.0"
HKCR,"MSITStore\CLSID",,,"%CLSID_MSITStore%"
HKCR,"MSITStore\CurVer",,,"MSITStore1.0"
;; ITSProtocol for IE 4.0
HKCR,"CLSID\%CLSID_ITSProtocol%",,,"Microsoft InfoTech Protocol for IE 4.0"
HKCR,"CLSID\%CLSID_ITSProtocol%\InProcServer32",,,"itss.dll"
HKCR,"CLSID\%CLSID_ITSProtocol%\InProcServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_ITSProtocol%\NotInsertable",,16
HKCR,"CLSID\%CLSID_ITSProtocol%\ProgID",,,"MSITFS1.0"
HKCR,"CLSID\%CLSID_ITSProtocol%\VersionIndependentProgID",,,"MSITFS"
HKCR,"ITSProtocol","Microsoft InfoTech Protocols for IE 4.0"
HKCR,"ITSProtocol\CLSID",,,"%CLSID_ITSProtocol%"
HKCR,"ITSProtocol\CurVer",,,"ITSProtocol1.0"
;; MSFSStore
HKCR,"CLSID\%CLSID_MSFSStore%",,,"Microsoft InfoTech IStorage for Win32 Files"
HKCR,"CLSID\%CLSID_MSFSStore%\InProcServer32",,,"itss.dll"
HKCR,"CLSID\%CLSID_MSFSStore%\InProcServer32","ThreadingModel",,"Both"
HKCR,"CLSID\%CLSID_MSFSStore%\NotInsertable",,16
HKCR,"CLSID\%CLSID_MSFSStore%\ProgID",,,"MSITFS1.0"
HKCR,"CLSID\%CLSID_MSFSStore%\VersionIndependentProgID",,,"MSITFS"
HKCR,"MSFSStore",,,"Microsoft InfoTech IStorage for Win32 Files"
HKCR,"MSFSStore\CLSID",,,"%CLSID_MSFSStore%"
HKCR,"MSFSStore\CurVer",,,"MSFSStore1.0"
[Misc.Reg]
HKCR,".its",,,"ITS File"
HKCR,"ITS FILE",,,"Internet Document Set"
HKCR,"ITS FILE\DefaultIcon",,,"itss.dll,0"
;; HKCR "ITS FILE\shell\open\command",,,"FIXME"
HKCR,"PROTOCOLS\Handler\its",,,"its: Asychronous Pluggable Protocol Handler"
HKCR,"PROTOCOLS\Handler\its","CLSID",,"%CLSID_ITSProtocol%"
HKCR,"PROTOCOLS\Handler\ms-its",,,"ms-its: Asychronous Pluggable Protocol Handler"
HKCR,"PROTOCOLS\Handler\ms-its","CLSID",,"%CLSID_ITSProtocol%"
HKCR,"PROTOCOLS\Name-Space Handler\mk",,,"NameSpace Filter for MK:@MSITStore:..."
HKCR,"PROTOCOLS\Name-Space Handler\mk\*","CLSID",,"%CLSID_ITSProtocol%"

51
dlls/itss/itss.rgs Normal file
View File

@ -0,0 +1,51 @@
HKCR
{
ForceRemove '.its' = s 'ITS File'
ForceRemove 'ITS FILE' = s 'Internet Document Set'
{
DefaultIcon = s '%MODULE%,0'
}
ForceRemove MSITStore = s 'Microsoft InfoTech Protocol for IE 3.0'
{
CLSID = s '{9D148290-B9C8-11D0-A4CC-0000F80149F6}'
CurVer = s 'MSITStore1.0'
}
ForceRemove ITSProtocol = s 'Microsoft InfoTech Protocols for IE 4.0'
{
CLSID = s '{9D148291-B9C8-11D0-A4CC-0000F80149F6}'
CurVer = s 'ITSProtocol1.0'
}
ForceRemove MSFSStore = s 'Microsoft InfoTech IStorage for Win32 Files'
{
CLSID = s '{D54EEE56-AAAB-11D0-9E1D-00A0C922E6EC}'
CurVer = s 'MSFSStore1.0'
}
NoRemove PROTOCOLS
{
NoRemove Handler
{
ForceRemove its = s 'its: Asychronous Pluggable Protocol Handler'
{
val CLSID = s '{9D148291-B9C8-11D0-A4CC-0000F80149F6}'
}
ForceRemove ms-its = s 'ms-its: Asychronous Pluggable Protocol Handler'
{
val CLSID = s '{9D148291-B9C8-11D0-A4CC-0000F80149F6}'
}
}
NoRemove 'Name-Space Handler'
{
ForceRemove mk = s 'NameSpace Filter for MK:@MSITStore:...'
{
'*' { val CLSID = s '{9D148291-B9C8-11D0-A4CC-0000F80149F6}' }
}
}
}
NoRemove CLSID
{
'{5D02926A-212E-11D0-9DF9-00A0C922E6EC}' { NotInsertable }
'{9D148290-B9C8-11D0-A4CC-0000F80149F6}' { NotInsertable }
'{9D148291-B9C8-11D0-A4CC-0000F80149F6}' { NotInsertable }
'{D54EEE56-AAAB-11D0-9E1D-00A0C922E6EC}' { NotInsertable }
}
}

View File

@ -16,5 +16,5 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* @makedep: itss.inf */
REGINST REGINST itss.inf
/* @makedep: itss.rgs */
1 WINE_REGISTRY itss.rgs