Rob, I did not grasp what you meant by this. The examples I looked at to set this up seem to do the way I coded it. Jeff Robert Shearman wrote:
Jeff Latimer wrote:
+ DWORD runObjTabRegister; /* registration key of the next registered object */ + DWORD currentPos; /* enum position in the list */ + +} EnumMonikerImpl; + + +/* IEnumMoniker prototype functions : */ +/* IUnknown functions*/ +static HRESULT WINAPI EnumMonikerImpl_QueryInterface(IEnumMoniker* iface,REFIID riid,void** ppvObject); +static ULONG WINAPI EnumMonikerImpl_AddRef(IEnumMoniker* iface); +static ULONG WINAPI EnumMonikerImpl_Release(IEnumMoniker* iface); +/* IEnumMoniker functions */ +static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IMoniker** rgelt, ULONG* pceltFetched); +static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker* iface, ULONG celt); +static HRESULT WINAPI EnumMonikerImpl_Reset(IEnumMoniker* iface); +static HRESULT WINAPI EnumMonikerImpl_Clone(IEnumMoniker* iface, IEnumMoniker** ppenum);
If you put the vtable after the implementations of the functions then you don't need to declare the prototypes here.
+
+/* Virtual function table for the IEnumMoniker class. */ +static IEnumMonikerVtbl VT_EnumMonikerImpl = +{ + EnumMonikerImpl_QueryInterface, + EnumMonikerImpl_AddRef, + EnumMonikerImpl_Release, + EnumMonikerImpl_Next, + EnumMonikerImpl_Skip, + EnumMonikerImpl_Reset, + EnumMonikerImpl_Clone +}; + /***********************************************************************