Re: ActiveX method problems [message #39980] |
Tue, 29 June 2004 09:11 |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
Hi Brad,
I just went through a similar exercise with a COM library. In my case, I
expected to use the hundreds of properties and methods that were
available to VB and C++, but I discovered that IDL could only use the
few minor ones that were being provided through IDispatch. This is an
important point: IDL can only use properties and methods listed in the
class' IDispatch section.
But in your case, if what you quoted was from the IDispatch ITypeInfo,
then all the properties and methods (Card, Open, Close...) are properly
listed. One difference from the sample IRSIDemoObj interfaces is in the
top [ ] section, where instead of "dual" yours has "hidden". Others that
I have seen working also have "dual". At this point, I don't know what
you can do about this. Anyone else?
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
"Brad Gom" <b_gom@hotmail.com> wrote in message
news:bde24eff.0406290746.7bf70736@posting.google.com...
> For any external development gurus out there:
>
> I'm trying to write an interface for some hardware which uses ActiveX
> controls for interfacing with the PC. The vendor supplied VB and C++
> example porgrams that use them, and they work fine. The controls I
> want to use do not have GUIs associated with them. However, when I try
> to call any of the ActiveX methods, I get the error: "Unable to call
> method BLAH. Catastrophic failure".
> IDLcomIDispatch seems to create the object properly, but none of the
> methods seem to be resolved. How do I debug this problem?
>
> What ActiveX features are not supported by IDL?
>
> Does the fact that the Interface Description file contains :
>
> [
> uuid(A4E2DC51-1A67-11D6-A2CE-0001022E1B44),
> helpstring("Dispatch interface for A32CtrlControl"),
> hidden
> ]
> dispinterface _DA32Control {
> properties:
> [id(0x00000001)
> ]
> long Card;
> ...
> methods:
> [id(0x00000005)]
> long Open();
> [id(0x00000006)]
> long Close();
> ...
>
> Instead of something like:
>
> interface IRSIDemoObj1 : IDispatch {
> [id(0x00000001)]
> HRESULT GetCLSID([out, retval] BSTR* pBstr);
> [id(0x00000002), propput]
> ...
>
> have anything to do with it?
>
> Thanks
>
> Brad
|
|
|