comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » ActiveX parameter by reference
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
ActiveX parameter by reference [message #40222] Mon, 26 July 2004 13:31
b_gom is currently offline  b_gom
Messages: 105
Registered: April 2003
Senior Member
I'm having trouble with calling an ActiveX method that expects a
parameter to be passed by reference. All other methods in the object
work properly, but I get a type mismatch error when trying to pass a
parameter by reference.

here is the interface description for the object from the OLE/COM
object viewer:
---------------------------------------
dispinterface _DA32Control {
properties:
...
methods:
...
[id(0x00000018)]
long GetAliveMask(long* pdwAliveMask);
...
};
---------------------------------------

In IDL, when I try calling the method by passing an existing long
variable as a parameter, I get this error:


mask = 1L
result = A32Control -> GetAliveMask(mask)
returns:
%
IDLCOMACTIVEX$CLSID$A4E2DC53_1A67_11D6_A2CE_0001022E1B44::GE TALIVEMASK:
Unable to call method GETALIVEMASK. Error with parameter 1.
Type mismatch.

I've also tried all other data types, as well as defining 'mask' as a
single element array and as a pointer:

Mask=0L
Pmask=ptr_new(mask)
result = A32Control -> GetAliveMask(pmask)
returns:
%
IDLCOMACTIVEX$CLSID$A4E2DC53_1A67_11D6_A2CE_0001022E1B44::GE TALIVEMASK:
Pointer expression not allowed in this context: PMASK.

What do I pass to the IDLcomIDispatch object to satisfy the expected
long* type?

Thanks

Brad Gom
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: database connection with idl without dataminer
Next Topic: Re: Sparse Matrix Routines

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 13:40:21 PDT 2025

Total time taken to generate the page: 0.48027 seconds