Damjan Jovanovic damjan.jov@gmail.com writes:
+static const struct IUnknownVtbl internal_unk_vtbl = +{
- Internal_QueryInterface,
- Internal_AddRef,
- Internal_Release
+};
+static const struct IStillImageWVtbl stillimagew_vtbl = +{
- stillimagew_QueryInterface,
- stillimagew_AddRef,
- stillimagew_Release,
- stillimagew_Initialize,
- stillimagew_GetDeviceList,
- stillimagew_GetDeviceInfo,
- stillimagew_CreateDevice,
- stillimagew_GetDeviceValue,
- stillimagew_SetDeviceValue,
- stillimagew_GetSTILaunchInformation,
- stillimagew_RegisterLaunchApplication,
- stillimagew_UnregisterLaunchApplication,
- stillimagew_EnableHwNotifications,
- stillimagew_GetHwNotificationState,
- stillimagew_RefreshDeviceBus,
- stillimagew_LaunchApplicationForDevice,
- stillimagew_SetupDeviceParameters,
- stillimagew_WriteToErrorLog
+};
You don't really need a separate vtbl for IUnknown.
On Wed, Sep 30, 2009 at 2:21 PM, Alexandre Julliard julliard@winehq.org wrote:
Damjan Jovanovic damjan.jov@gmail.com writes:
+static const struct IUnknownVtbl internal_unk_vtbl = +{
- Internal_QueryInterface,
- Internal_AddRef,
- Internal_Release
+};
+static const struct IStillImageWVtbl stillimagew_vtbl = +{
- stillimagew_QueryInterface,
- stillimagew_AddRef,
- stillimagew_Release,
- stillimagew_Initialize,
- stillimagew_GetDeviceList,
- stillimagew_GetDeviceInfo,
- stillimagew_CreateDevice,
- stillimagew_GetDeviceValue,
- stillimagew_SetDeviceValue,
- stillimagew_GetSTILaunchInformation,
- stillimagew_RegisterLaunchApplication,
- stillimagew_UnregisterLaunchApplication,
- stillimagew_EnableHwNotifications,
- stillimagew_GetHwNotificationState,
- stillimagew_RefreshDeviceBus,
- stillimagew_LaunchApplicationForDevice,
- stillimagew_SetupDeviceParameters,
- stillimagew_WriteToErrorLog
+};
You don't really need a separate vtbl for IUnknown.
I'm pretty sure you do need a separate IUnknown interface if the object aggregates, which it does on Windows (tests will follow).
IIRC msxml3 does the same in node.c ...
-- Alexandre Julliard julliard@winehq.org
Damjan Jovanovic
Damjan Jovanovic damjan.jov@gmail.com writes:
I'm pretty sure you do need a separate IUnknown interface if the object aggregates, which it does on Windows (tests will follow).
IIRC msxml3 does the same in node.c ...
I think it's nicer with a single table, but the COM book apparently recommends two, so I guess I'll just have to get used to it...
But please make the real one the main lpVtbl, and the inner unknown a secondary one, that makes things easier to follow.