* Sync to Wine 1.3.37.

svn path=/trunk/; revision=55248
This commit is contained in:
Amine Khaldi 2012-01-27 17:05:33 +00:00
parent 75035a17de
commit dc4400d15d
12 changed files with 334 additions and 257 deletions

View file

@ -72,25 +72,25 @@ struct chmUnitInfo
WCHAR path[CHM_MAX_PATHLEN+1];
};
struct chmFile* chm_openW(const WCHAR *filename);
struct chmFile *chm_dup(struct chmFile *oldHandle);
struct chmFile* chm_openW(const WCHAR *filename) DECLSPEC_HIDDEN;
struct chmFile *chm_dup(struct chmFile *oldHandle) DECLSPEC_HIDDEN;
/* close an ITS archive */
void chm_close(struct chmFile *h);
void chm_close(struct chmFile *h) DECLSPEC_HIDDEN;
/* resolve a particular object from the archive */
#define CHM_RESOLVE_SUCCESS (0)
#define CHM_RESOLVE_FAILURE (1)
int chm_resolve_object(struct chmFile *h,
const WCHAR *objPath,
struct chmUnitInfo *ui);
struct chmUnitInfo *ui) DECLSPEC_HIDDEN;
/* retrieve part of an object from the archive */
LONGINT64 chm_retrieve_object(struct chmFile *h,
struct chmUnitInfo *ui,
unsigned char *buf,
LONGUINT64 addr,
LONGINT64 len);
LONGINT64 len) DECLSPEC_HIDDEN;
/* enumerate the objects in the .chm archive */
typedef int (*CHM_ENUMERATOR)(struct chmFile *h,
@ -109,6 +109,6 @@ int chm_enumerate_dir(struct chmFile *h,
const WCHAR *prefix,
int what,
CHM_ENUMERATOR e,
void *context);
void *context) DECLSPEC_HIDDEN;
#endif /* INCLUDED_CHMLIB_H */

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"
@ -67,14 +68,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
* ITSS ClassFactory
*/
typedef struct {
const IClassFactoryVtbl *lpVtbl;
IClassFactory IClassFactory_iface;
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
} IClassFactoryImpl;
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
{
return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
}
static HRESULT WINAPI
ITSSCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IClassFactory))
@ -104,7 +110,7 @@ static ULONG WINAPI ITSSCF_Release(LPCLASSFACTORY iface)
static HRESULT WINAPI ITSSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
REFIID riid, LPVOID *ppobj)
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
HRESULT hres;
LPUNKNOWN punk;
@ -140,9 +146,9 @@ static const IClassFactoryVtbl ITSSCF_Vtbl =
ITSSCF_LockServer
};
static const IClassFactoryImpl ITStorage_factory = { &ITSSCF_Vtbl, ITSS_create };
static const IClassFactoryImpl MSITStore_factory = { &ITSSCF_Vtbl, ITS_IParseDisplayName_create };
static const IClassFactoryImpl ITSProtocol_factory = { &ITSSCF_Vtbl, ITSProtocol_create };
static const IClassFactoryImpl ITStorage_factory = { { &ITSSCF_Vtbl }, ITSS_create };
static const IClassFactoryImpl MSITStore_factory = { { &ITSSCF_Vtbl }, ITS_IParseDisplayName_create };
static const IClassFactoryImpl ITSProtocol_factory = { { &ITSSCF_Vtbl }, ITSProtocol_create };
/***********************************************************************
* DllGetClassObject (ITSS.@)
@ -171,17 +177,22 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
/*****************************************************************************/
typedef struct {
const IITStorageVtbl *vtbl_IITStorage;
IITStorage IITStorage_iface;
LONG ref;
} ITStorageImpl;
static inline ITStorageImpl *impl_from_IITStorage(IITStorage *iface)
{
return CONTAINING_RECORD(iface, ITStorageImpl, IITStorage_iface);
}
static HRESULT WINAPI ITStorageImpl_QueryInterface(
IITStorage* iface,
REFIID riid,
void** ppvObject)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IITStorage))
{
@ -197,7 +208,7 @@ static HRESULT WINAPI ITStorageImpl_QueryInterface(
static ULONG WINAPI ITStorageImpl_AddRef(
IITStorage* iface)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
TRACE("%p\n", This);
return InterlockedIncrement(&This->ref);
}
@ -205,7 +216,7 @@ static ULONG WINAPI ITStorageImpl_AddRef(
static ULONG WINAPI ITStorageImpl_Release(
IITStorage* iface)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
ULONG ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
@ -223,7 +234,7 @@ static HRESULT WINAPI ITStorageImpl_StgCreateDocfile(
DWORD reserved,
IStorage** ppstgOpen)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
TRACE("%p %s %u %u %p\n", This,
debugstr_w(pwcsName), grfMode, reserved, ppstgOpen );
@ -239,7 +250,7 @@ static HRESULT WINAPI ITStorageImpl_StgCreateDocfileOnILockBytes(
DWORD reserved,
IStorage** ppstgOpen)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -248,7 +259,7 @@ static HRESULT WINAPI ITStorageImpl_StgIsStorageFile(
IITStorage* iface,
const WCHAR* pwcsName)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -257,7 +268,7 @@ static HRESULT WINAPI ITStorageImpl_StgIsStorageILockBytes(
IITStorage* iface,
ILockBytes* plkbyt)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -271,7 +282,7 @@ static HRESULT WINAPI ITStorageImpl_StgOpenStorage(
DWORD reserved,
IStorage** ppstgOpen)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
TRACE("%p %s %p %d %p\n", This, debugstr_w( pwcsName ),
pstgPriority, grfMode, snbExclude );
@ -289,7 +300,7 @@ static HRESULT WINAPI ITStorageImpl_StgOpenStorageOnILockBytes(
DWORD reserved,
IStorage** ppstgOpen)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -301,7 +312,7 @@ static HRESULT WINAPI ITStorageImpl_StgSetTimes(
const FILETIME* patime,
const FILETIME* pmtime)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -310,7 +321,7 @@ static HRESULT WINAPI ITStorageImpl_SetControlData(
IITStorage* iface,
PITS_Control_Data pControlData)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -319,7 +330,7 @@ static HRESULT WINAPI ITStorageImpl_DefaultControlData(
IITStorage* iface,
PITS_Control_Data* ppControlData)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -329,7 +340,7 @@ static HRESULT WINAPI ITStorageImpl_Compact(
const WCHAR* pwcsName,
ECompactionLev iLev)
{
ITStorageImpl *This = (ITStorageImpl *)iface;
ITStorageImpl *This = impl_from_IITStorage(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
@ -359,7 +370,7 @@ static HRESULT ITSS_create(IUnknown *pUnkOuter, LPVOID *ppObj)
return CLASS_E_NOAGGREGATION;
its = HeapAlloc( GetProcessHeap(), 0, sizeof(ITStorageImpl) );
its->vtbl_IITStorage = &ITStorageImpl_Vtbl;
its->IITStorage_iface.lpVtbl = &ITStorageImpl_Vtbl;
its->ref = 1;
TRACE("-> %p\n", its);
@ -377,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 );
}
/***********************************************************************
@ -443,5 +401,5 @@ HRESULT WINAPI DllRegisterServer(void)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return register_server(FALSE);
return __wine_unregister_resources( hInst );
}

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%"

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

@ -0,0 +1,69 @@
HKCR
{
NoRemove Interface
{
}
NoRemove CLSID
{
'{9D148290-B9C8-11D0-A4CC-0000F80149F6}' = s 'Microsoft InfoTech Protocol for IE 3.0'
{
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
ProgId = s 'MSITFS1.0'
VersionIndependentProgId = s 'MSITFS'
}
'{9D148291-B9C8-11D0-A4CC-0000F80149F6}' = s 'Microsoft InfoTech Protocol for IE 4.0'
{
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
ProgId = s 'MSITFS1.0'
VersionIndependentProgId = s 'MSITFS'
}
'{D54EEE56-AAAB-11D0-9E1D-00A0C922E6EC}' = s 'Microsoft InfoTech IStorage for Win32 Files'
{
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
ProgId = s 'MSITFS1.0'
VersionIndependentProgId = s 'MSITFS'
}
'{5D02926A-212E-11D0-9DF9-00A0C922E6EC}' = s 'Microsoft InfoTech IStorage System'
{
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
ProgId = s 'MSITFS1.0'
VersionIndependentProgId = s 'MSITFS'
}
}
'MSITFS1.0' = s 'Microsoft InfoTech Protocol for IE 3.0'
{
CLSID = s '{9D148290-B9C8-11D0-A4CC-0000F80149F6}'
}
'MSITFS' = s 'Microsoft InfoTech Protocol for IE 3.0'
{
CLSID = s '{9D148290-B9C8-11D0-A4CC-0000F80149F6}'
CurVer = s 'MSITFS1.0'
}
'MSITFS1.0' = s 'Microsoft InfoTech Protocol for IE 4.0'
{
CLSID = s '{9D148291-B9C8-11D0-A4CC-0000F80149F6}'
}
'MSITFS' = s 'Microsoft InfoTech Protocol for IE 4.0'
{
CLSID = s '{9D148291-B9C8-11D0-A4CC-0000F80149F6}'
CurVer = s 'MSITFS1.0'
}
'MSITFS1.0' = s 'Microsoft InfoTech IStorage for Win32 Files'
{
CLSID = s '{D54EEE56-AAAB-11D0-9E1D-00A0C922E6EC}'
}
'MSITFS' = s 'Microsoft InfoTech IStorage for Win32 Files'
{
CLSID = s '{D54EEE56-AAAB-11D0-9E1D-00A0C922E6EC}'
CurVer = s 'MSITFS1.0'
}
'MSITFS1.0' = s 'Microsoft InfoTech IStorage System'
{
CLSID = s '{5D02926A-212E-11D0-9DF9-00A0C922E6EC}'
}
'MSITFS' = s 'Microsoft InfoTech IStorage System'
{
CLSID = s '{5D02926A-212E-11D0-9DF9-00A0C922E6EC}'
CurVer = s 'MSITFS1.0'
}
}

View file

@ -29,18 +29,16 @@ extern HRESULT ITSS_StgOpenStorage(
DWORD grfMode,
SNB snbExclude,
DWORD reserved,
IStorage** ppstgOpen);
IStorage** ppstgOpen) DECLSPEC_HIDDEN;
extern HRESULT ITS_IParseDisplayName_create(
IUnknown *pUnkOuter,
LPVOID *ppObj);
LPVOID *ppObj) DECLSPEC_HIDDEN;
extern HRESULT ITSProtocol_create(IUnknown *pUnkOuter, LPVOID *ppobj);
extern HRESULT ITSProtocol_create(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
extern LONG dll_count;
extern LONG dll_count DECLSPEC_HIDDEN;
static inline void ITSS_LockModule(void) { InterlockedIncrement(&dll_count); }
static inline void ITSS_UnlockModule(void) { InterlockedDecrement(&dll_count); }
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
#endif /* __WINE_ITS_STORAGE_PRIVATE__ */

View file

@ -43,19 +43,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(itss);
/*****************************************************************************/
typedef struct {
const IMonikerVtbl *vtbl_ITS_IMoniker;
IMoniker IMoniker_iface;
LONG ref;
LPWSTR szHtml;
WCHAR szFile[1];
} ITS_IMonikerImpl;
static inline ITS_IMonikerImpl *impl_from_IMoniker(IMoniker *iface)
{
return CONTAINING_RECORD(iface, ITS_IMonikerImpl, IMoniker_iface);
}
/*** IUnknown methods ***/
static HRESULT WINAPI ITS_IMonikerImpl_QueryInterface(
IMoniker* iface,
REFIID riid,
void** ppvObject)
{
ITS_IMonikerImpl *This = (ITS_IMonikerImpl *)iface;
ITS_IMonikerImpl *This = impl_from_IMoniker(iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IParseDisplayName))
@ -72,7 +77,7 @@ static HRESULT WINAPI ITS_IMonikerImpl_QueryInterface(
static ULONG WINAPI ITS_IMonikerImpl_AddRef(
IMoniker* iface)
{
ITS_IMonikerImpl *This = (ITS_IMonikerImpl *)iface;
ITS_IMonikerImpl *This = impl_from_IMoniker(iface);
TRACE("%p\n", This);
return InterlockedIncrement(&This->ref);
}
@ -80,7 +85,7 @@ static ULONG WINAPI ITS_IMonikerImpl_AddRef(
static ULONG WINAPI ITS_IMonikerImpl_Release(
IMoniker* iface)
{
ITS_IMonikerImpl *This = (ITS_IMonikerImpl *)iface;
ITS_IMonikerImpl *This = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
@ -96,7 +101,7 @@ static HRESULT WINAPI ITS_IMonikerImpl_GetClassID(
IMoniker* iface,
CLSID* pClassID)
{
ITS_IMonikerImpl *This = (ITS_IMonikerImpl *)iface;
ITS_IMonikerImpl *This = impl_from_IMoniker(iface);
TRACE("%p %p\n", This, pClassID);
*pClassID = CLSID_ITStorage;
@ -155,7 +160,7 @@ static HRESULT WINAPI ITS_IMonikerImpl_BindToStorage(
REFIID riid,
void** ppvObj)
{
ITS_IMonikerImpl *This = (ITS_IMonikerImpl *)iface;
ITS_IMonikerImpl *This = impl_from_IMoniker(iface);
DWORD grfMode = STGM_SIMPLE | STGM_READ | STGM_SHARE_EXCLUSIVE;
HRESULT r;
IStorage *stg = NULL;
@ -279,7 +284,7 @@ static HRESULT WINAPI ITS_IMonikerImpl_GetDisplayName(
IMoniker* pmkToLeft,
LPOLESTR* ppszDisplayName)
{
ITS_IMonikerImpl *This = (ITS_IMonikerImpl *)iface;
ITS_IMonikerImpl *This = impl_from_IMoniker(iface);
static const WCHAR szFormat[] = {
'm','s','-','i','t','s',':','%','s',':',':','%','s',0 };
DWORD len = sizeof szFormat / sizeof(WCHAR);
@ -352,7 +357,7 @@ static HRESULT ITS_IMoniker_create( IMoniker **ppObj, LPCWSTR name, DWORD n )
sz = sizeof(ITS_IMonikerImpl) + strlenW( name )*sizeof(WCHAR);
itsmon = HeapAlloc( GetProcessHeap(), 0, sz );
itsmon->vtbl_ITS_IMoniker = &ITS_IMonikerImpl_Vtbl;
itsmon->IMoniker_iface.lpVtbl = &ITS_IMonikerImpl_Vtbl;
itsmon->ref = 1;
strcpyW( itsmon->szFile, name );
itsmon->szHtml = &itsmon->szFile[n];
@ -362,7 +367,7 @@ static HRESULT ITS_IMoniker_create( IMoniker **ppObj, LPCWSTR name, DWORD n )
TRACE("-> %p %s %s\n", itsmon,
debugstr_w(itsmon->szFile), debugstr_w(itsmon->szHtml) );
*ppObj = (IMoniker*) itsmon;
*ppObj = &itsmon->IMoniker_iface;
ITSS_LockModule();
return S_OK;
@ -371,16 +376,21 @@ static HRESULT ITS_IMoniker_create( IMoniker **ppObj, LPCWSTR name, DWORD n )
/*****************************************************************************/
typedef struct {
const IParseDisplayNameVtbl *vtbl_ITS_IParseDisplayName;
IParseDisplayName IParseDisplayName_iface;
LONG ref;
} ITS_IParseDisplayNameImpl;
static inline ITS_IParseDisplayNameImpl *impl_from_IParseDisplayName(IParseDisplayName *iface)
{
return CONTAINING_RECORD(iface, ITS_IParseDisplayNameImpl, IParseDisplayName_iface);
}
static HRESULT WINAPI ITS_IParseDisplayNameImpl_QueryInterface(
IParseDisplayName* iface,
REFIID riid,
void** ppvObject)
{
ITS_IParseDisplayNameImpl *This = (ITS_IParseDisplayNameImpl *)iface;
ITS_IParseDisplayNameImpl *This = impl_from_IParseDisplayName(iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IParseDisplayName))
@ -397,7 +407,7 @@ static HRESULT WINAPI ITS_IParseDisplayNameImpl_QueryInterface(
static ULONG WINAPI ITS_IParseDisplayNameImpl_AddRef(
IParseDisplayName* iface)
{
ITS_IParseDisplayNameImpl *This = (ITS_IParseDisplayNameImpl *)iface;
ITS_IParseDisplayNameImpl *This = impl_from_IParseDisplayName(iface);
TRACE("%p\n", This);
return InterlockedIncrement(&This->ref);
}
@ -405,7 +415,7 @@ static ULONG WINAPI ITS_IParseDisplayNameImpl_AddRef(
static ULONG WINAPI ITS_IParseDisplayNameImpl_Release(
IParseDisplayName* iface)
{
ITS_IParseDisplayNameImpl *This = (ITS_IParseDisplayNameImpl *)iface;
ITS_IParseDisplayNameImpl *This = impl_from_IParseDisplayName(iface);
ULONG ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
@ -428,12 +438,12 @@ static HRESULT WINAPI ITS_IParseDisplayNameImpl_ParseDisplayName(
const DWORD prefix_len = (sizeof szPrefix/sizeof szPrefix[0])-1;
DWORD n;
ITS_IParseDisplayNameImpl *This = (ITS_IParseDisplayNameImpl *)iface;
ITS_IParseDisplayNameImpl *This = impl_from_IParseDisplayName(iface);
TRACE("%p %s %p %p\n", This,
debugstr_w( pszDisplayName ), pchEaten, ppmkOut );
if( strncmpW( pszDisplayName, szPrefix, prefix_len ) )
if( strncmpiW( pszDisplayName, szPrefix, prefix_len ) )
return MK_E_SYNTAX;
/* search backwards for a double colon */
@ -469,7 +479,7 @@ HRESULT ITS_IParseDisplayName_create(IUnknown *pUnkOuter, LPVOID *ppObj)
return CLASS_E_NOAGGREGATION;
its = HeapAlloc( GetProcessHeap(), 0, sizeof(ITS_IParseDisplayNameImpl) );
its->vtbl_ITS_IParseDisplayName = &ITS_IParseDisplayNameImpl_Vtbl;
its->IParseDisplayName_iface.lpVtbl = &ITS_IParseDisplayNameImpl_Vtbl;
its->ref = 1;
TRACE("-> %p\n", its);

View file

@ -36,8 +36,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(itss);
typedef struct {
const IInternetProtocolVtbl *lpInternetProtocolVtbl;
const IInternetProtocolInfoVtbl *lpInternetProtocolInfoVtbl;
IInternetProtocol IInternetProtocol_iface;
IInternetProtocolInfo IInternetProtocolInfo_iface;
LONG ref;
@ -46,8 +46,15 @@ typedef struct {
struct chmUnitInfo chm_object;
} ITSProtocol;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PROTINFO(x) (&(x)->lpInternetProtocolInfoVtbl)
static inline ITSProtocol *impl_from_IInternetProtocol(IInternetProtocol *iface)
{
return CONTAINING_RECORD(iface, ITSProtocol, IInternetProtocol_iface);
}
static inline ITSProtocol *impl_from_IInternetProtocolInfo(IInternetProtocolInfo *iface)
{
return CONTAINING_RECORD(iface, ITSProtocol, IInternetProtocolInfo_iface);
}
static void release_chm(ITSProtocol *This)
{
@ -58,25 +65,23 @@ static void release_chm(ITSProtocol *This)
This->offset = 0;
}
#define PROTOCOL_THIS(iface) DEFINE_THIS(ITSProtocol, InternetProtocol, iface)
static HRESULT WINAPI ITSProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = PROTOCOL(This);
*ppv = &This->IInternetProtocol_iface;
}else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) {
TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv);
*ppv = PROTOCOL(This);
*ppv = &This->IInternetProtocol_iface;
}else if(IsEqualGUID(&IID_IInternetProtocol, riid)) {
TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv);
*ppv = PROTOCOL(This);
*ppv = &This->IInternetProtocol_iface;
}else if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) {
TRACE("(%p)->(IID_IInternetProtocolInfo %p)\n", This, ppv);
*ppv = PROTINFO(This);
*ppv = &This->IInternetProtocolInfo_iface;
}
if(*ppv) {
@ -90,7 +95,7 @@ static HRESULT WINAPI ITSProtocol_QueryInterface(IInternetProtocol *iface, REFII
static ULONG WINAPI ITSProtocol_AddRef(IInternetProtocol *iface)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
return ref;
@ -98,7 +103,7 @@ static ULONG WINAPI ITSProtocol_AddRef(IInternetProtocol *iface)
static ULONG WINAPI ITSProtocol_Release(IInternetProtocol *iface)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
@ -139,7 +144,7 @@ static HRESULT WINAPI ITSProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
DWORD grfPI, HANDLE_PTR dwReserved)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
BINDINFO bindinfo;
DWORD bindf = 0, len;
LPWSTR file_name, mime, object_name, p;
@ -252,7 +257,7 @@ static HRESULT WINAPI ITSProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
static HRESULT WINAPI ITSProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
FIXME("(%p)->(%p)\n", This, pProtocolData);
return E_NOTIMPL;
}
@ -260,14 +265,14 @@ static HRESULT WINAPI ITSProtocol_Continue(IInternetProtocol *iface, PROTOCOLDAT
static HRESULT WINAPI ITSProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason,
DWORD dwOptions)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
return E_NOTIMPL;
}
static HRESULT WINAPI ITSProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
TRACE("(%p)->(%08x)\n", This, dwOptions);
@ -276,14 +281,14 @@ static HRESULT WINAPI ITSProtocol_Terminate(IInternetProtocol *iface, DWORD dwOp
static HRESULT WINAPI ITSProtocol_Suspend(IInternetProtocol *iface)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
FIXME("(%p)\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI ITSProtocol_Resume(IInternetProtocol *iface)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
FIXME("(%p)\n", This);
return E_NOTIMPL;
}
@ -291,7 +296,7 @@ static HRESULT WINAPI ITSProtocol_Resume(IInternetProtocol *iface)
static HRESULT WINAPI ITSProtocol_Read(IInternetProtocol *iface, void *pv,
ULONG cb, ULONG *pcbRead)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
@ -307,14 +312,14 @@ static HRESULT WINAPI ITSProtocol_Read(IInternetProtocol *iface, void *pv,
static HRESULT WINAPI ITSProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove,
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
return E_NOTIMPL;
}
static HRESULT WINAPI ITSProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
TRACE("(%p)->(%08x)\n", This, dwOptions);
@ -323,15 +328,13 @@ static HRESULT WINAPI ITSProtocol_LockRequest(IInternetProtocol *iface, DWORD dw
static HRESULT WINAPI ITSProtocol_UnlockRequest(IInternetProtocol *iface)
{
ITSProtocol *This = PROTOCOL_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocol(iface);
TRACE("(%p)\n", This);
return S_OK;
}
#undef PROTOCOL_THIS
static const IInternetProtocolVtbl ITSProtocolVtbl = {
ITSProtocol_QueryInterface,
ITSProtocol_AddRef,
@ -348,32 +351,30 @@ static const IInternetProtocolVtbl ITSProtocolVtbl = {
ITSProtocol_UnlockRequest
};
#define PROTINFO_THIS(iface) DEFINE_THIS(ITSProtocol, InternetProtocolInfo, iface)
static HRESULT WINAPI ITSProtocolInfo_QueryInterface(IInternetProtocolInfo *iface,
REFIID riid, void **ppv)
{
ITSProtocol *This = PROTINFO_THIS(iface);
return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv);
ITSProtocol *This = impl_from_IInternetProtocolInfo(iface);
return IInternetProtocol_QueryInterface(&This->IInternetProtocol_iface, riid, ppv);
}
static ULONG WINAPI ITSProtocolInfo_AddRef(IInternetProtocolInfo *iface)
{
ITSProtocol *This = PROTINFO_THIS(iface);
return IInternetProtocol_AddRef(PROTOCOL(This));
ITSProtocol *This = impl_from_IInternetProtocolInfo(iface);
return IInternetProtocol_AddRef(&This->IInternetProtocol_iface);
}
static ULONG WINAPI ITSProtocolInfo_Release(IInternetProtocolInfo *iface)
{
ITSProtocol *This = PROTINFO_THIS(iface);
return IInternetProtocol_Release(PROTOCOL(This));
ITSProtocol *This = impl_from_IInternetProtocolInfo(iface);
return IInternetProtocol_Release(&This->IInternetProtocol_iface);
}
static HRESULT WINAPI ITSProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl,
PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult,
DWORD *pcchResult, DWORD dwReserved)
{
ITSProtocol *This = PROTINFO_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocolInfo(iface);
TRACE("(%p)->(%s %x %08x %p %d %p %d)\n", This, debugstr_w(pwzUrl), ParseAction,
dwParseFlags, pwzResult, cchResult, pcchResult, dwReserved);
@ -396,7 +397,7 @@ static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface,
LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, LPWSTR pwzResult,
DWORD cchResult, DWORD* pcchResult, DWORD dwReserved)
{
ITSProtocol *This = PROTINFO_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocolInfo(iface);
LPCWSTR base_end, ptr;
DWORD rel_len;
@ -441,7 +442,7 @@ static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface,
static HRESULT WINAPI ITSProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl1,
LPCWSTR pwzUrl2, DWORD dwCompareFlags)
{
ITSProtocol *This = PROTINFO_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocolInfo(iface);
FIXME("%p)->(%s %s %08x)\n", This, debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
return E_NOTIMPL;
}
@ -450,14 +451,12 @@ static HRESULT WINAPI ITSProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, LP
QUERYOPTION QueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD* pcbBuf,
DWORD dwReserved)
{
ITSProtocol *This = PROTINFO_THIS(iface);
ITSProtocol *This = impl_from_IInternetProtocolInfo(iface);
FIXME("(%p)->(%s %08x %08x %p %d %p %d)\n", This, debugstr_w(pwzUrl), QueryOption,
dwQueryFlags, pBuffer, cbBuffer, pcbBuf, dwReserved);
return E_NOTIMPL;
}
#undef PROTINFO_THIS
static const IInternetProtocolInfoVtbl ITSProtocolInfoVtbl = {
ITSProtocolInfo_QueryInterface,
ITSProtocolInfo_AddRef,
@ -478,11 +477,11 @@ HRESULT ITSProtocol_create(IUnknown *pUnkOuter, LPVOID *ppobj)
ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ITSProtocol));
ret->lpInternetProtocolVtbl = &ITSProtocolVtbl;
ret->lpInternetProtocolInfoVtbl = &ITSProtocolInfoVtbl;
ret->IInternetProtocol_iface.lpVtbl = &ITSProtocolVtbl;
ret->IInternetProtocolInfo_iface.lpVtbl = &ITSProtocolInfoVtbl;
ret->ref = 1;
*ppobj = PROTOCOL(ret);
*ppobj = &ret->IInternetProtocol_iface;
return S_OK;
}

View file

@ -16,5 +16,6 @@
* 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
2 WINE_REGISTRY itss_r.rgs

View file

@ -45,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(itss);
typedef struct _ITSS_IStorageImpl
{
const IStorageVtbl *vtbl_IStorage;
IStorage IStorage_iface;
LONG ref;
struct chmFile *chmfile;
WCHAR dir[1];
@ -59,20 +59,35 @@ struct enum_info
typedef struct _IEnumSTATSTG_Impl
{
const IEnumSTATSTGVtbl *vtbl_IEnumSTATSTG;
IEnumSTATSTG IEnumSTATSTG_iface;
LONG ref;
struct enum_info *first, *last, *current;
} IEnumSTATSTG_Impl;
typedef struct _IStream_Impl
{
const IStreamVtbl *vtbl_IStream;
IStream IStream_iface;
LONG ref;
ITSS_IStorageImpl *stg;
ULONGLONG addr;
struct chmUnitInfo ui;
} IStream_Impl;
static inline ITSS_IStorageImpl *impl_from_IStorage(IStorage *iface)
{
return CONTAINING_RECORD(iface, ITSS_IStorageImpl, IStorage_iface);
}
static inline IEnumSTATSTG_Impl *impl_from_IEnumSTATSTG(IEnumSTATSTG *iface)
{
return CONTAINING_RECORD(iface, IEnumSTATSTG_Impl, IEnumSTATSTG_iface);
}
static inline IStream_Impl *impl_from_IStream(IStream *iface)
{
return CONTAINING_RECORD(iface, IStream_Impl, IStream_iface);
}
static HRESULT ITSS_create_chm_storage(
struct chmFile *chmfile, const WCHAR *dir, IStorage** ppstgOpen );
static IStream_Impl* ITSS_create_stream(
@ -85,7 +100,7 @@ static HRESULT WINAPI ITSS_IEnumSTATSTG_QueryInterface(
REFIID riid,
void** ppvObject)
{
IEnumSTATSTG_Impl *This = (IEnumSTATSTG_Impl *)iface;
IEnumSTATSTG_Impl *This = impl_from_IEnumSTATSTG(iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IEnumSTATSTG))
@ -102,14 +117,14 @@ static HRESULT WINAPI ITSS_IEnumSTATSTG_QueryInterface(
static ULONG WINAPI ITSS_IEnumSTATSTG_AddRef(
IEnumSTATSTG* iface)
{
IEnumSTATSTG_Impl *This = (IEnumSTATSTG_Impl *)iface;
IEnumSTATSTG_Impl *This = impl_from_IEnumSTATSTG(iface);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI ITSS_IEnumSTATSTG_Release(
IEnumSTATSTG* iface)
{
IEnumSTATSTG_Impl *This = (IEnumSTATSTG_Impl *)iface;
IEnumSTATSTG_Impl *This = impl_from_IEnumSTATSTG(iface);
ULONG ref = InterlockedDecrement(&This->ref);
@ -134,7 +149,7 @@ static HRESULT WINAPI ITSS_IEnumSTATSTG_Next(
STATSTG* rgelt,
ULONG* pceltFetched)
{
IEnumSTATSTG_Impl *This = (IEnumSTATSTG_Impl *)iface;
IEnumSTATSTG_Impl *This = impl_from_IEnumSTATSTG(iface);
DWORD len, n;
struct enum_info *cur;
@ -186,7 +201,7 @@ static HRESULT WINAPI ITSS_IEnumSTATSTG_Skip(
IEnumSTATSTG* iface,
ULONG celt)
{
IEnumSTATSTG_Impl *This = (IEnumSTATSTG_Impl *)iface;
IEnumSTATSTG_Impl *This = impl_from_IEnumSTATSTG(iface);
DWORD n;
struct enum_info *cur;
@ -210,7 +225,7 @@ static HRESULT WINAPI ITSS_IEnumSTATSTG_Skip(
static HRESULT WINAPI ITSS_IEnumSTATSTG_Reset(
IEnumSTATSTG* iface)
{
IEnumSTATSTG_Impl *This = (IEnumSTATSTG_Impl *)iface;
IEnumSTATSTG_Impl *This = impl_from_IEnumSTATSTG(iface);
TRACE("%p\n", This );
@ -243,7 +258,7 @@ static IEnumSTATSTG_Impl *ITSS_create_enum( void )
IEnumSTATSTG_Impl *stgenum;
stgenum = HeapAlloc( GetProcessHeap(), 0, sizeof (IEnumSTATSTG_Impl) );
stgenum->vtbl_IEnumSTATSTG = &IEnumSTATSTG_vtbl;
stgenum->IEnumSTATSTG_iface.lpVtbl = &IEnumSTATSTG_vtbl;
stgenum->ref = 1;
stgenum->first = NULL;
stgenum->last = NULL;
@ -262,7 +277,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_QueryInterface(
REFIID riid,
void** ppvObject)
{
ITSS_IStorageImpl *This = (ITSS_IStorageImpl *)iface;
ITSS_IStorageImpl *This = impl_from_IStorage(iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IStorage))
@ -279,14 +294,14 @@ static HRESULT WINAPI ITSS_IStorageImpl_QueryInterface(
static ULONG WINAPI ITSS_IStorageImpl_AddRef(
IStorage* iface)
{
ITSS_IStorageImpl *This = (ITSS_IStorageImpl *)iface;
ITSS_IStorageImpl *This = impl_from_IStorage(iface);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI ITSS_IStorageImpl_Release(
IStorage* iface)
{
ITSS_IStorageImpl *This = (ITSS_IStorageImpl *)iface;
ITSS_IStorageImpl *This = impl_from_IStorage(iface);
ULONG ref = InterlockedDecrement(&This->ref);
@ -320,7 +335,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_OpenStream(
DWORD reserved2,
IStream** ppstm)
{
ITSS_IStorageImpl *This = (ITSS_IStorageImpl *)iface;
ITSS_IStorageImpl *This = impl_from_IStorage(iface);
IStream_Impl *stm;
DWORD len;
struct chmUnitInfo ui;
@ -364,7 +379,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_OpenStream(
if( !stm )
return E_FAIL;
*ppstm = (IStream*) stm;
*ppstm = &stm->IStream_iface;
return S_OK;
}
@ -390,7 +405,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_OpenStorage(
DWORD reserved,
IStorage** ppstg)
{
ITSS_IStorageImpl *This = (ITSS_IStorageImpl *)iface;
ITSS_IStorageImpl *This = impl_from_IStorage(iface);
static const WCHAR szRoot[] = { '/', 0 };
struct chmFile *chmfile;
WCHAR *path, *p;
@ -498,7 +513,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_EnumElements(
DWORD reserved3,
IEnumSTATSTG** ppenum)
{
ITSS_IStorageImpl *This = (ITSS_IStorageImpl *)iface;
ITSS_IStorageImpl *This = impl_from_IStorage(iface);
IEnumSTATSTG_Impl* stgenum;
TRACE("%p %d %p %d %p\n", This, reserved1, reserved2, reserved3, ppenum );
@ -515,7 +530,7 @@ static HRESULT WINAPI ITSS_IStorageImpl_EnumElements(
stgenum->current = stgenum->first;
*ppenum = (IEnumSTATSTG*) stgenum;
*ppenum = &stgenum->IEnumSTATSTG_iface;
return S_OK;
}
@ -607,12 +622,12 @@ static HRESULT ITSS_create_chm_storage(
len = strlenW( dir ) + 1;
stg = HeapAlloc( GetProcessHeap(), 0,
sizeof (ITSS_IStorageImpl) + len*sizeof(WCHAR) );
stg->vtbl_IStorage = &ITSS_IStorageImpl_Vtbl;
stg->IStorage_iface.lpVtbl = &ITSS_IStorageImpl_Vtbl;
stg->ref = 1;
stg->chmfile = chmfile;
strcpyW( stg->dir, dir );
*ppstgOpen = (IStorage*) stg;
*ppstgOpen = &stg->IStorage_iface;
ITSS_LockModule();
return S_OK;
@ -645,7 +660,7 @@ static HRESULT WINAPI ITSS_IStream_QueryInterface(
REFIID riid,
void** ppvObject)
{
IStream_Impl *This = (IStream_Impl *)iface;
IStream_Impl *This = impl_from_IStream(iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_ISequentialStream)
@ -663,20 +678,20 @@ static HRESULT WINAPI ITSS_IStream_QueryInterface(
static ULONG WINAPI ITSS_IStream_AddRef(
IStream* iface)
{
IStream_Impl *This = (IStream_Impl *)iface;
IStream_Impl *This = impl_from_IStream(iface);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI ITSS_IStream_Release(
IStream* iface)
{
IStream_Impl *This = (IStream_Impl *)iface;
IStream_Impl *This = impl_from_IStream(iface);
ULONG ref = InterlockedDecrement(&This->ref);
if (ref == 0)
{
IStorage_Release( (IStorage*) This->stg );
IStorage_Release( &This->stg->IStorage_iface );
HeapFree(GetProcessHeap(), 0, This);
ITSS_UnlockModule();
}
@ -690,7 +705,7 @@ static HRESULT WINAPI ITSS_IStream_Read(
ULONG cb,
ULONG* pcbRead)
{
IStream_Impl *This = (IStream_Impl *)iface;
IStream_Impl *This = impl_from_IStream(iface);
ULONG count;
TRACE("%p %p %u %p\n", This, pv, cb, pcbRead);
@ -720,7 +735,7 @@ static HRESULT WINAPI ITSS_IStream_Seek(
DWORD dwOrigin,
ULARGE_INTEGER* plibNewPosition)
{
IStream_Impl *This = (IStream_Impl *)iface;
IStream_Impl *This = impl_from_IStream(iface);
LONGLONG newpos;
TRACE("%p %s %u %p\n", This,
@ -809,7 +824,7 @@ static HRESULT WINAPI ITSS_IStream_Stat(
STATSTG* pstatstg,
DWORD grfStatFlag)
{
IStream_Impl *This = (IStream_Impl *)iface;
IStream_Impl *This = impl_from_IStream(iface);
TRACE("%p %p %d\n", This, pstatstg, grfStatFlag);
@ -858,12 +873,12 @@ static IStream_Impl *ITSS_create_stream(
IStream_Impl *stm;
stm = HeapAlloc( GetProcessHeap(), 0, sizeof (IStream_Impl) );
stm->vtbl_IStream = &ITSS_IStream_vtbl;
stm->IStream_iface.lpVtbl = &ITSS_IStream_vtbl;
stm->ref = 1;
stm->addr = 0;
stm->ui = *ui;
stm->stg = stg;
IStorage_AddRef( (IStorage*) stg );
IStorage_AddRef( &stg->IStorage_iface );
ITSS_LockModule();

View file

@ -77,7 +77,7 @@ reactos/dll/win32/initpki # Autosync
reactos/dll/win32/inseng # Synced to Wine-1.3.37
reactos/dll/win32/iphlpapi # Out of sync
reactos/dll/win32/itircl # Autosync
reactos/dll/win32/itss # Autosync
reactos/dll/win32/itss # Synced to Wine-1.3.37
reactos/dll/win32/jscript # Autosync
reactos/dll/win32/localspl # Autosync
reactos/dll/win32/localui # Autosync