Get rid of the non-standard Ixxx_METHODS macro definitions, declare
the interfaces explicitly instead.
diff --git a/include/objbase.h b/include/objbase.h
index f92152e..fef8fc6 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -51,15 +51,20 @@
* Let's take Direct3D as an example:
*
* #define INTERFACE IDirect3D
- * #define IDirect3D_METHODS \
- * IUnknown_METHODS \
- * STDMETHOD(Initialize)(THIS_ REFIID) PURE; \
- * STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE; \
- * STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE; \
- * STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL*, IUnknown*) PURE; \
- * STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT*, IUnknown*) PURE; \
+ * DECLARE_INTERFACE_(IDirect3D,IUnknown)
+ * {
+ * // *** IUnknown methods *** //
+ * STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID, void**) PURE;
+ * STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ * STDMETHOD_(ULONG,Release)(THIS) PURE;
+ * // *** IDirect3D methods *** //
+ * STDMETHOD(Initialize)(THIS_ REFIID) PURE;
+ * STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
+ * STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *, IUnknown *) PURE;
+ * STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL *, IUnknown *) PURE;
+ * STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT *, IUnknown *) PURE;
* STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
- * DECLARE_INTERFACE_(IDirect3D,IUnknown) { IDirect3D_METHODS };
+ * };
* #undef INTERFACE
*
* #ifdef COBJMACROS
@@ -82,12 +87,12 @@
* name everywhere. Note however that because of the way macros work, a macro like STDMETHOD
* cannot use 'INTERFACE##_VTABLE' because this would give 'INTERFACE_VTABLE' and not
* 'IDirect3D_VTABLE'.
- * - ICOM_METHODS defines the list of methods that are inheritable from this interface. It must
- * be written manually (rather than using a macro to generate the equivalent code) to avoid
- * macro recursion (which compilers don't like). It must start with the METHODS definition
- * of the parent interface so that method inheritance works properly.
- * - The DECLARE_INTERFACE finally declares all the structures necessary for the interface. We have
- * to explicitly use the interface name for macro expansion reasons again.
+ * - The DECLARE_INTERFACE declares all the structures necessary for the interface. We have to
+ * explicitly use the interface name for macro expansion reasons again. It defines the list of
+ * methods that are inheritable from this interface. It must be written manually (rather than
+ * using a macro to generate the equivalent code) to avoid macro recursion (which compilers
+ * don't like). It must start with the methods definition of the parent interface so that
+ * method inheritance works properly.
* - The 'undef INTERFACE' is here to remind you that using INTERFACE in the following macros
* will not work.
* - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access
@@ -137,9 +142,7 @@
* the user needs to know to use the interface. Of course the structure we will define to
* implement this interface will have more fields but the first one will match this pointer.
* - The code generated by DECLARE_INTERFACE defines both the structure representing the interface and
- * the structure for the jump table. DECLARE_INTERFACE uses the parent's Xxx_METHODS macro to
- * automatically repeat the prototypes of all the inherited methods and then uses IDirect3D_METHODS
- * to define the IDirect3D methods.
+ * the structure for the jump table.
* - Each method is declared as a pointer to function field in the jump table. The implementation
* will fill this jump table with appropriate values, probably using a static variable, and
* initialize the lpVtbl field to point to this variable.