Hi,
In header file, I see this declaration:
#define DECLARE_VTBL(iname) iname vt##iname;
then, in C file, there are below codes:
typedef struct _Abc {
.........
} abc;
DECLARE_VTBL(abc)
I don't understant these code. Could someone explain me what it does?
Thanks
Tran Hong Quang
Ben Voigt - 23 Mar 2006 16:03 GMT
> Hi,
> In header file, I see this declaration:
[quoted text clipped - 7 lines]
> } abc;
> DECLARE_VTBL(abc)
The macro expands to:
abc vtabc;
Which will be a set of function pointers serving as the vtable (native
invocation, as opposed to dispatch invocation) for COM objects written in C.
In C++ they would be member functions and the compiler would create the
vtable.
> I don't understant these code. Could someone explain me what it does?
>
> Thanks
> Tran Hong Quang