Re: Fire SAFEARRAY(BYTE) to outer COM object crashes

From: Brian Muth (bmuth_at_mvps.org)
Date: 11/09/04


Date: Tue, 9 Nov 2004 08:42:29 -0800

Your subject title suggests you are using SAFEARRAY(BYTE) in your IDL. That
does _not_ represent an array of BSTRings.

Since the client is a scripting language, you must work with VARIANTs. You
should be returning a SAFEARRAY of VARIANT's, where each VARIANT element is
a BSTR.

Show us your IDL.

Brian

"max" <max_mont@yahoo.fr> wrote in message
news:3daa8bf7.0411090624.523f3bf5@posting.google.com...
> Hi,
>
> I'm working on an activex in c++ which is used by HTML code.
> I'd like to fire an event passing an array of BSTR.
> So I try your code which seems to work.
> But I can't catch the event in IE.
> In fact, you fire an event with Invoke method passing 0x2 as
> dispIdMember. But my event has got 0x5 as ID. If I change
> dispIdMember, the program crashes.
> So where can I specify event ID in the sending method ???
> Many thanks in advance for your help.



Relevant Pages

  • Re: Confused about ATL and SafeArrays
    ... I put together a test method using your sample method, IDL, and .h ... My ASP code looks like this: ... The type mismatch always occurs on the line "result = ... the Array function works to call the method but passing in the name ...
    (microsoft.public.vc.atl)
  • confused about image colorspaces
    ... I'd like to write a small applet to display astronomical images. ... customary in astronomy, for us an image is an array imgof real ... a lookup table (LUT) of R G B values (the LUT is also chosen by the ... As example this is the equivalent IDL codes (the Java R G B values will ...
    (comp.lang.java.programmer)
  • Re: optional Safearray of UDTs from VB
    ... phEngine.DoProcess InstMeasure 'VB ARRAY / safearray parameter ... > I think I already told you to use a VARIANT, ... >> or spoof either the idl or vb to acheive a result similar to functional ...
    (microsoft.public.vc.atl)
  • Re: ANY COM Interop GURUS out there!? - Nested Structs with arrays
    ... array to a non-array. ... I use MIDL ... > OLE View will let you capture the IDL from the TypeLib. ...
    (microsoft.public.dotnet.languages.vb)

Quantcast