Problems Invoking ActiveX Function

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems Invoking ActiveX Function

Runar Jordahl-2
Using Dolphin Smalltalk Profession 5.1 Evaluation with the latest updates
installed, I have used the ActiveX Component Wizard to create a class
wrapping this ActiveX control: http://www.multimediasoft.com/amewp/




I try bringing up the about box for the component using one of the generated
methods on the wrapper class. I do this by evaluating MP3PLAYLib_DMp3play
new aboutBox




The source code for #aboutBox is:

aboutBox

        "Invoke the AboutBox() method of the COM object."

    (self invokeId: -552)




I get the following walkback:

09:06:03, 14. desember 2004: 'Catastrophic failure (16rFFFF: Catastrophic
failure)'

MP3PLAYLib_DMp3play(IDispatch)>>invokeId:flags:parms:retVal:

MP3PLAYLib_DMp3play(IDispatch)>>invokeId:flags:parms:

MP3PLAYLib_DMp3play(IDispatch)>>invokeId:

MP3PLAYLib_DMp3play>>aboutBox




Also, simply inspecting 'MP3PLAYLib_DMp3play new' shows 'Catastrophic
failure' on all listed aspects.




I am unable to view source code for IDispatch. I assume this is because I
only have an evaluation version of Dolphin. Is this correct? This limitation
makes it hard to understand what I do wrong.




I am able to get 'IRandomStream new' next working, so Dolphin is clearly
able to invoke COM functions on my computer. I see that both classes exit
from the same return in #onCLSID:outerIUnknown:hostName:licenseKey: when
they are sent #new.




What do I do wrong? Is there any detailed documentation online I should
read?



Runar Jordahl


Reply | Threaded
Open this post in threaded view
|

Re: Problems Invoking ActiveX Function

Yar Hwee Boon-3
Reply | Threaded
Open this post in threaded view
|

Re: Problems Invoking ActiveX Function

Andy Bower-3
In reply to this post by Runar Jordahl-2
Runar,

> Using Dolphin Smalltalk Profession 5.1 Evaluation with the latest
> updates installed, I have used the ActiveX Component Wizard to create
> a class wrapping this ActiveX control:
> http://www.multimediasoft.com/amewp/
>
>
> I try bringing up the about box for the component using one of the
> generated methods on the wrapper class.

[snip]

> I get the following walkback:
>
> 09:06:03, 14. desember 2004: 'Catastrophic failure (16rFFFF:
> Catastrophic failure)'

[snip]

As suggested by the Google search indicated by Yar Hwee Boon, this
component one of a number of controls that needs toi be "visually
hosted". It seems odd I know, since the actual appearence is only an
icon and there is no other visual behaviour but I think this stems from
the early days of Visual Basic where all VBX controls were placed on a
form rather than just being called up in the background.

Anyway, there is an easy way around this by creating a hidden ActiveX
control site to host the control. Try the following:

site := AXControlSite progId: 'AMP3DJ.Amp3djCtrl.1'.
mp3Control := site controlDispatch.
mp3Control aboutBox.

If you're wondering how you can find oput the progId, then try loading
the control into the ActiveX Control Browser and looking at the title
bar of the window.

Hope this helps.

Andy Bower
Dolphin Support
www.object-arts.com