Hi people. I am a physicist. I am trying to work on Delphi with an imported activex control (ocx file). Let’s say there are 3 automation interfaces in the library: IGraph, IGraphAxes and IAxis. The structure of the library is such that:
===IGraph’s properties:===
Idispatch* IGraphAxes;
... //other members
===IGraphAxes’ properties:===
Idispatch* XAxis;
Idispatch* YAxis;
Idispatch* ZAxis;
integer Color;
integer Style;
… //other members
===IAxis properties:===
float Min, Max;
Boolean ShowNumbers;
… //other members
From IGraph, I am able to get an access to simple members of IGraphAxes (Color and Style) using GetIDsOfNames() and Invoke() functions. But when I try to get an access to XAxis (or YAxis, Zaxis) it generates an error. First, I use GetIDsOfNames() and it returns the dispid of XAxis without any problem. But when I call Invoke with that dispid there is an error “Access violation at address …”. It seems, the idispatch pointer (*Xaxis) points to nothing. How can I solve this? How to make
Idispatch* Xaxis
and
IAxis interface attached to each other?
P.S. sorry for my english, i am not a native speaker