Board index » delphi » Accessing the IPersistXXX interface of an imported AX

Accessing the IPersistXXX interface of an imported AX

Hi,

How do I access the IPersistXXX interface of an imported AX ?

I am using a 3'rd party ActiveX in my Delphi DLL.
I have imported the ActiveX into the palette: Component / Import ActiveX
Control / Install.. and dropped to my form.

Everything works fine as long as I stick to the interfaces defined in
the TLB (the dispinterface, I suppose??).

But I need to save the complete state and contens of the ActiveX, for
later retrieval.

The vendor says that I must use the standard COM persistence mechanism
for this.
I can find no references to this interface in the TLB.

If I use the Ms Com/Ole Inspector, I can see some IPersistXXX interfaces
in the AX.

How do I Save/Load the ActiveX  To/From a file ? (I am using BD5)

Thanks
Bj?rn.

 

Re:Accessing the IPersistXXX interface of an imported AX


ActiveX controls usually support IPersistStream/Init. You can create a block
of memory on the heap (using GlobalAlloc and CreateStreamOnHGlobal) and then
call he control's IPersistStream/Init Save or Load method on the heap
stream.

have fun
--
Binh Ly
http://www.techvanguards.com

Quote
"Bj?rn Rasmussen" <bj...@post2.tele.dk> wrote in message

news:39723835.92A6CCBA@post2.tele.dk...
Quote
> Hi,

> How do I access the IPersistXXX interface of an imported AX ?

> I am using a 3'rd party ActiveX in my Delphi DLL.
> I have imported the ActiveX into the palette: Component / Import ActiveX
> Control / Install.. and dropped to my form.

> Everything works fine as long as I stick to the interfaces defined in
> the TLB (the dispinterface, I suppose??).

> But I need to save the complete state and contens of the ActiveX, for
> later retrieval.

> The vendor says that I must use the standard COM persistence mechanism
> for this.
> I can find no references to this interface in the TLB.

> If I use the Ms Com/Ole Inspector, I can see some IPersistXXX interfaces
> in the AX.

> How do I Save/Load the ActiveX  To/From a file ? (I am using BD5)

> Thanks
> Bj?rn.

Other Threads