AnsweredAssumed Answered

vrf More on WriteByteBuffer

Question asked by VRFuser on Jun 19, 2008
> but my loop work-around should solve my problem.

Yep. It is too bad.

Actually, I didn't think about it before but you could use VB to cure the problem for VEE. It's YAL (yet another layer) though, & involves a "custom"
IDispatch interface to boot. I'm sure you're just better off using the loop.
-SHAWN-

> -----Original Message-----
> From: Barrie Walden [mailto:bwalden@whoi.edu]
> Sent: Thursday, June 19, 2008 4:20 PM
> To: VRF
> Cc: VRF
> Subject: Re: [vrf] More on WriteByteBuffer
>
>
> I was afraid this was the case. Too bad, it seemed like a clean
> solution but my loop work-around should solve my problem.
>
> Thanks for the help
>
> Barrie
>
>
> Shawn Fessenden wrote:
> > Got it.
> >
> > Now I can say for sure: It's impossible. Ya just can't send
> char * over any
> > IDispatch interface. In fact, you can't send anything but Variant.
> > Conversion is internal, and char * is always passed as
> BSTR. It's all
> > automatic. Unfortunately it's not automatic enough to tell
> the programmer
> > when he specifies something impossible.
> >
> > What you have here is an old dll interface that's been
> wrapped in ActiveX.
> > I've run into this myself, and was befuddled for some time.
> It was only
> > after I dug into the guts of ActiveX that I understood why
> my ActiveX
> > interface wouldn't work. It just isn't possible.
> >
> > So, if there's a separate library (and I mean a raw dll)
> that this library
> > depends on you could import that and just skip the ActiveX
> interface. In
> > this scenario UInt8 array would work just fine because
> there's no type
> > checking (thus no type mismatch).
> >
> > Things are a little different for COM. ActiveX is a subset
> of COM. One can
> > use char * as a parameter to a COM interface, so that's why
> I mentioned
> > trying to import it as a .NET COM Interop lib & trying
> that. I've never done
> > it so I have no idea if you'd be able to coerce the input
> correctly or not.
> >
> > Their VB example works because VB will preferentially bind to a COM
> > interface over an IDispatch interface. Were they to
> instansiate "object"
> > with CreateObject using the ProgID of the IDispatch
> interface they'd get the
> > same thing: type mismatch.
> >
> > And yes, by the same token, if VEE preferentially bound to
> a COM interface
> > rather than IDispatch this wouldn't happen, but then VEE
> would need a whole
> > slew of other stuff to properly deal with COM.
> >
> > However: it's a general point worth remembering. If an
> ActiveX library
> > presents a dual interface (if it was generated with MSVC++
> it probably does
> > because all you have to do is stick [dual] in the midl
> file) then you can
> > import it as COM Interop & try it that way.
> > -SHAWN-
> >
> > PS - I'm sure this point was easily missed: What I'm saying
> is the IDispatch
> > interface is broken. They (the kind folks who
> Frankensteined it) probably
> > don't know that.
> >
> >
> >
> >
> > ---
> > You are currently subscribed to vrf as: bwalden@whoi.edu To
> > subscribe please send an email to:
> "vrf-request@lists.it.agilent.com" with the word subscribe in the
> message body.
> > To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com".
> > To send messages to this mailing list,  email "vrf@agilent.com".
> > If you need help with the mailing list send a message to
> > "owner-vrf@it.lists.it.agilent.com".
> > Search the "unofficial vrf archive" at
> "http://www.vrfarchive.com/vrf_archive".
> > Search the Agilent vrf archive at
> "http://vee.engineering.agilent.com".
> >
> >
>
>
>
> ---
> You are currently subscribed to vrf as: shawn@vrfarchive.com To
> subscribe please send an email to:
> "vrf-request@lists.it.agilent.com" with the word subscribe in the
> message body.
> To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list,  email "vrf@agilent.com".
> If you need help with the mailing list send a message to
> "owner-vrf@it.lists.it.agilent.com".
> Search the "unofficial vrf archive" at
> "http://www.vrfarchive.com/vrf_archive".
> Search the Agilent vrf archive at
> "http://vee.engineering.agilent.com".
>
>




---
You are currently subscribed to vrf as: ming_meng@agilent.com To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".

Outcomes