By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

Someone explain me this code

P: n/a
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
Mar 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Tran Hong Quang" <Tr***********@discussions.microsoft.com> wrote in message
news:4D**********************************@microsof t.com...
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)
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

Mar 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.