Author: akhaldi
Date: Fri Jan 27 17:05:33 2012
New Revision: 55248

URL: http://svn.reactos.org/svn/reactos?rev=55248&view=rev
Log:
[ITSS]
* Sync to Wine 1.3.37.

Added:
    trunk/reactos/dll/win32/itss/itss.idl   (with props)
    trunk/reactos/dll/win32/itss/itss.rgs   (with props)
    trunk/reactos/dll/win32/itss/itss_r.rgs   (with props)
Removed:
    trunk/reactos/dll/win32/itss/itss.inf
Modified:
    trunk/reactos/dll/win32/itss/chm_lib.h
    trunk/reactos/dll/win32/itss/itss.c
    trunk/reactos/dll/win32/itss/itsstor.h
    trunk/reactos/dll/win32/itss/moniker.c
    trunk/reactos/dll/win32/itss/protocol.c
    trunk/reactos/dll/win32/itss/rsrc.rc
    trunk/reactos/dll/win32/itss/storage.c
    trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/itss/chm_lib.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/chm_lib.h?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/chm_lib.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/chm_lib.h [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -72,25 +72,25 @@
     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 @@
                       const WCHAR *prefix,
                       int what,
                       CHM_ENUMERATOR e,
-                      void *context);
+                      void *context) DECLSPEC_HIDDEN;
 
 #endif /* INCLUDED_CHMLIB_H */

Modified: trunk/reactos/dll/win32/itss/itss.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itss.c?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/itss.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/itss.c [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -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 @@
  * 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 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 @@
     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 @@
 /*****************************************************************************/
 
 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 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_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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
         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);
@@ -376,66 +387,13 @@
     TRACE("dll_count = %u\n", dll_count);
     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 DllUnregisterServer(void)
 {
-    return register_server(FALSE);
-}
+    return __wine_unregister_resources( hInst );
+}

Added: trunk/reactos/dll/win32/itss/itss.idl
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itss.idl?rev=55248&view=auto
==============================================================================
--- trunk/reactos/dll/win32/itss/itss.idl (added)
+++ trunk/reactos/dll/win32/itss/itss.idl [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -1,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; }

Propchange: trunk/reactos/dll/win32/itss/itss.idl
------------------------------------------------------------------------------
    svn:eol-style = native

Removed: trunk/reactos/dll/win32/itss/itss.inf
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itss.inf?rev=55247&view=auto
==============================================================================
--- trunk/reactos/dll/win32/itss/itss.inf [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/itss.inf (removed)
@@ -1,79 +1,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%"

Added: trunk/reactos/dll/win32/itss/itss.rgs
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itss.rgs?rev=55248&view=auto
==============================================================================
--- trunk/reactos/dll/win32/itss/itss.rgs (added)
+++ trunk/reactos/dll/win32/itss/itss.rgs [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -1,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 }
+    }
+}

Propchange: trunk/reactos/dll/win32/itss/itss.rgs
------------------------------------------------------------------------------
    svn:eol-style = native

Added: trunk/reactos/dll/win32/itss/itss_r.rgs
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itss_r.rgs?rev=55248&view=auto
==============================================================================
--- trunk/reactos/dll/win32/itss/itss_r.rgs (added)
+++ trunk/reactos/dll/win32/itss/itss_r.rgs [iso-8859-1] Fri Jan 27 17:05:33 
2012
@@ -1,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'
+    }
+}

Propchange: trunk/reactos/dll/win32/itss/itss_r.rgs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: trunk/reactos/dll/win32/itss/itsstor.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/itsstor.h?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/itsstor.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/itsstor.h [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -29,18 +29,16 @@
     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__ */

Modified: trunk/reactos/dll/win32/itss/moniker.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/moniker.c?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/moniker.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/moniker.c [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -43,19 +43,24 @@
 /*****************************************************************************/
 
 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 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_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 @@
     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 @@
     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 @@
     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 @@
     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 @@
 
     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 @@
 /*****************************************************************************/
 
 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 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_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 @@
     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 @@
         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);

Modified: trunk/reactos/dll/win32/itss/protocol.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/protocol.c?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/protocol.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/protocol.c [iso-8859-1] Fri Jan 27 17:05:33 
2012
@@ -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 @@
     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 @@
     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 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_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 @@
         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_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_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_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_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_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,14 +328,12 @@
 
 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,
@@ -348,32 +351,30 @@
     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 @@
         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_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,13 +451,11 @@
         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,
@@ -478,11 +477,11 @@
 
     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);
-
-    return S_OK;
-}
+    *ppobj = &ret->IInternetProtocol_iface;
+
+    return S_OK;
+}

Modified: trunk/reactos/dll/win32/itss/rsrc.rc
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/rsrc.rc?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/rsrc.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/rsrc.rc [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -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

Modified: trunk/reactos/dll/win32/itss/storage.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/storage.c?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/dll/win32/itss/storage.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/itss/storage.c [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -45,7 +45,7 @@
 
 typedef struct _ITSS_IStorageImpl
 {
-    const IStorageVtbl *vtbl_IStorage;
+    IStorage IStorage_iface;
     LONG ref;
     struct chmFile *chmfile;
     WCHAR dir[1];
@@ -59,20 +59,35 @@
 
 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 @@
     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 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 @@
         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 @@
         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_Reset(
         IEnumSTATSTG* iface)
 {
-    IEnumSTATSTG_Impl *This = (IEnumSTATSTG_Impl *)iface;
+    IEnumSTATSTG_Impl *This = impl_from_IEnumSTATSTG(iface);
 
     TRACE("%p\n", This );
 
@@ -243,7 +258,7 @@
     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 @@
     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 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 @@
     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 @@
     if( !stm )
         return E_FAIL;
 
-    *ppstm = (IStream*) stm;
+    *ppstm = &stm->IStream_iface;
 
     return S_OK;
 }
@@ -390,7 +405,7 @@
     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 @@
     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 @@
 
     stgenum->current = stgenum->first;
 
-    *ppenum = (IEnumSTATSTG*) stgenum;
+    *ppenum = &stgenum->IEnumSTATSTG_iface;
 
     return S_OK;
 }
@@ -607,12 +622,12 @@
     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 @@
     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 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 @@
         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 @@
         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 @@
         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 @@
     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();
 

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=55248&r1=55247&r2=55248&view=diff
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Jan 27 17:05:33 2012
@@ -77,7 +77,7 @@
 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


Reply via email to