Главная страница | назад





Article #19510: How do I talk to an Visual Basic ActiveX control.

 Question and Answer Database
FAQ4510C.txt — How do I talk to an Visual Basic ActiveX control.
Category :ActiveX
Platform :All-32Bit
Product :C++Builder3.x, C++Builder4.x,
Question:
I imported a control made with Visual Basic.
When I call one of it's methods
I get an Access Violation.
Why?
Answer:
All of the published books on COM will tell you that the
interface is laid out like a C++ virtual base class ---
that is to say, it is safe to assume that the function
pointers are placed sequentially in a table.
VB produces "sparse vtables", which is to say, their
function pointers are _not_ laid out sequentially in a table.
You have to use Ole Automation(IDispatch) instead of
vtable support.
We are aware of the problem, and working to fix it.
3/29/99 3:49:47 PM

Last Modified: 01-SEP-99