Added PARSE_SECURITY_URL action implementation.
[wine] / dlls / ole32 / antimoniker.c
index f08f7aa..c015525 100644 (file)
@@ -42,17 +42,22 @@ const CLSID CLSID_AntiMoniker = {
 /* AntiMoniker data structure */
 typedef struct AntiMonikerImpl{
 
-    IMonikerVtbl*  lpvtbl1;  /* VTable relative to the IMoniker interface.*/
+    const IMonikerVtbl*  lpvtbl1;  /* VTable relative to the IMoniker interface.*/
 
     /* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether
      * two monikers are equal. That's whay IROTData interface is implemented by monikers.
      */
-    IROTDataVtbl*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
+    const IROTDataVtbl*  lpvtbl2;  /* VTable relative to the IROTData interface.*/
 
-    ULONG ref; /* reference counter for this object */
+    LONG ref; /* reference counter for this object */
 
 } AntiMonikerImpl;
 
+static inline IMoniker *impl_from_IROTData( IROTData *iface )
+{
+    return (IMoniker *)((char*)iface - FIELD_OFFSET(AntiMonikerImpl, lpvtbl2));
+}
+
 
 /*******************************************************************************
  *        AntiMoniker_QueryInterface
@@ -485,7 +490,7 @@ AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys)
 static HRESULT WINAPI
 AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject)
 {
-    ICOM_THIS_From_IROTData(IMoniker, iface);
+    IMoniker *This = impl_from_IROTData(iface);
 
     TRACE("(%p,%p,%p)\n",iface,riid,ppvObject);
 
@@ -497,7 +502,7 @@ AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObje
  */
 static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface)
 {
-    ICOM_THIS_From_IROTData(IMoniker, iface);
+    IMoniker *This = impl_from_IROTData(iface);
 
     TRACE("(%p)\n",iface);
 
@@ -509,7 +514,7 @@ static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface)
  */
 static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface)
 {
-    ICOM_THIS_From_IROTData(IMoniker, iface);
+    IMoniker *This = impl_from_IROTData(iface);
 
     TRACE("(%p)\n",iface);
 
@@ -530,7 +535,7 @@ AntiMonikerROTDataImpl_GetComparaisonData(IROTData* iface, BYTE* pbData,
 /********************************************************************************/
 /* Virtual function table for the AntiMonikerImpl class which  include IPersist,*/
 /* IPersistStream and IMoniker functions.                                       */
-static IMonikerVtbl VT_AntiMonikerImpl =
+static const IMonikerVtbl VT_AntiMonikerImpl =
 {
     AntiMonikerImpl_QueryInterface,
     AntiMonikerImpl_AddRef,
@@ -559,7 +564,7 @@ static IMonikerVtbl VT_AntiMonikerImpl =
 
 /********************************************************************************/
 /* Virtual function table for the IROTData class.                               */
-static IROTDataVtbl VT_ROTDataImpl =
+static const IROTDataVtbl VT_ROTDataImpl =
 {
     AntiMonikerROTDataImpl_QueryInterface,
     AntiMonikerROTDataImpl_AddRef,