I am hoping that by discussion, Q&A - with participation by those who want to know and those who do know - we can come up with a simplified and understandable approach to this.
I am willing to show my ignorance and (mis)understanding of the subject to kick things off.
1: Know the available ActiveX functions/methods/properties (Interface).
This would come from docs, etc, by the supplier of the control. Leo's code can also help here.
2: Make the activeX control accessible via PB.
From looking at stuff by Danilo, Freak and Leo it appears we need to:
coInitialize and perhaps create an instance of the object.
Perhaps openLibrary is needed.
3: Have a mechanism to interact with the interface.
Have an interface (listing available functionality)
Somehow connect or link or associate the PB interface with the object.
If the object needs a place to do it's thing, provide one, eg a window or a gadget.
4: Use it
This may involve receiving information via callbacks as well as simply sending information or requesting information.
5: Clean up and go.
CoUnitialize, unload object if loaded, etc, so the thing doesn't hang around until the next reboot.
All of which sounds fine and dandy, but the actual doing appears very complex and the approaches shown here appear to differ quite a bit.
So, hopefully there is more than one way, and hopefully we can come up with a simple and generic-ish approach to this, and also demystify the process as well.
Maybe we could end up with some code that becomes a library or an include file or something and leads to:
Code: Select all
Interface
..
EndInterface
Structure
..
EndStructure
..
registerObject(rName$, rGUID$, @myJumpTable)
..
myJumpTable.doSomething(args)
..
unRegisterObject(@myJumpTable)
If you have the smallest interest, if you have the knowledge or want it, please participate (Questions, Answers, Speculation, Etc)


