Calling a COM object from a PowerBuilder object's sript??

I'm interested in knowing how to call somebody  else's COM object written in
C++ (it is a dual interface...what ever that it is)
would we enter the information the same way we do for DLLs within the
global/local external functions section for whatever object we want the
function to be available?

Any examples or direction to examples would be appreciated.
Thanks
Chris


0
Chris
3/7/2001 7:33:38 PM
📁 sybase.powerscript
📃 7704 articles.
⭐ 0 followers.

💬 1 Replies
👁️‍🗨️ 1186 Views


hi,
I'v tested it yet, i couldn't  use it with the global/local external
functions declarations method. It could be that some components need to be
initialized first and global/local external functions declarations doesn't
do this. Therefore you may create a new standart visual oleobject object and
initialize it within your pb code.
An another sample could be that you may use some WinAPI calls that takes the
entry point of the ocx and initializes it. After then you can use the
functions of the OCX. But accessing OCX properties needs class support,
which PB doesn't contain.
You may need now some samples, but i don't have one, i've to make it first.
Sorry, may be sometime.
Additionaly some info:
An ActiveX object can use a dispatch interface, a VTBL interface, or a dual
interface.But dual interface is an interface that supports both IDispatch
and VTBL binding. Here is the declaration from MSDN, if you are interested;
Dual Interfaces
OLE Automation enables an object to expose a set of methods in two ways: via
the IDispatch interface, and through direct OLE VTable binding. IDispatch is
used by most tools available today, and offers support for late binding to
properties and methods. VTable binding offers much higher performance
because this method is called directly instead of through IDispatch::Invoke.
IDispatch offers late bound support, where direct VTable binding offers a
significant performance gain; both techniques are valuable and important in
different scenarios. By labeling an interface as dual in the type library,
an OLE Automation interface can be used either via IDispatch, or it can be
bound to directly. Containers can thus choose the most appropriate
technique. Support for dual interfaces is strongly recommended for both
controls and containers.
adnan
Chris Fauvel <chris_fauvel@fintech.net> wrote in message
news:teUmHA0pAHA.253@forums.sybase.com...
I'm interested in knowing how to call somebody  else's COM object written in
C++ (it is a dual interface...what ever that it is)
would we enter the information the same way we do for DLLs within the
global/local external functions section for whatever object we want the
function to be available?

Any examples or direction to examples would be appreciated.
Thanks
Chris



0
Adnan
3/15/2001 2:53:16 PM
Reply: