🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: microsoft.public.vc.activextemplatelib
Article #12

Re: RPC_S_INTERNAL_ERROR (0x800706e6) when call COM method with SAFEARRAY arg

#12
From: Girish Bharadwaj
Date: Mon, 28 Sep 1998 00:00
34 lines
2412 bytes
I dont think, SAFEARRAY can be used in custom interfaces. I Think it
needs the typelibrary marshalling to help it out.  Why are you using
SAFEARRAY anyway? You can use size_is, length_is and other wonderful
attributes in IDL to pass arrays. 
Anyway, SAFEARRAY might work if you put that [oleautomation] attribute
on that interface.

David Morgenlender wrote:
> 
> I just implemented a new method in a custom interface in my inproc (DLL) COM
> server.  The IDL definition:
> 
>   HRESULT TestArray(
>         [in] SAFEARRAY(long) *ppsaIn,
>         [out] SAFEARRAY(long) *ppsaOut);
> 
> I get the identical error when I invoke this method from either Borland C++
> Builder 3 or Visual Basic 5:  0x800706e6, which is RPC_S_INTERNAL_ERROR.  A
> breakpoint in the method implementation is never reached.  So something seems to
> be going wrong within the guts of COM.  I can invoke other methods within this
> interface without any problems;  however, TestArray is the only method using
> SAFEARRAY arguments.
> 
> Everything is running under Win95.
> 
> Do you have any idea why I'm getting this error & how to fix it?
> 
> =======================================================
> Dave Morgenlender
> e-mail: dmorgen@alum.mit.edu
> =======================================================

-- 
Girish Bharadwaj [vc++/mvp]
Technical Details
Message-ID: <36101F5C.82A6DF6B@mvps.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35f7af87.139502483@enews.newsguy.com> <35fca36a.74862657@enews.newsguy.com> <35fd93e5.9529171@enews.newsguy.com> <360a2925.226239187@enews.newsguy.com> <361f01bd.37755547@enews.newsguy.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 108cda,81ddca2bbfb6aa72
X-Google-Attributes: gid108cda,public
X-Google-Thread: fc3fb,81ddca2bbfb6aa72
X-Google-Attributes: gidfc3fb,public
X-Google-Thread: f9701,1d0d9a944f8acbf8
X-Google-Attributes: gidf9701,public
X-Google-Thread: fe15c,81ddca2bbfb6aa72
X-Google-Attributes: gidfe15c,public
From: Girish Bharadwaj <girishb@mvps.org>
Subject: Re: RPC_S_INTERNAL_ERROR (0x800706e6) when call COM method with SAFEARRAY arg
Date: 1998/09/28
Message-ID: <36101F5C.82A6DF6B@mvps.org>
X-Deja-AN: 395805894
Content-Transfer-Encoding: 7bit
References: <35f7af87.139502483@enews.newsguy.com> <35fca36a.74862657@enews.newsguy.com> <35fd93e5.9529171@enews.newsguy.com> <360a2925.226239187@enews.newsguy.com> <361f01bd.37755547@enews.newsguy.com>
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Reply-To: girishb@mvps.org
Newsgroups: microsoft.public.vc.activextemplatelib,comp.os.ms-windows.programmer.ole,microsoft.public.win32.programmer.ole,borland.public.cppbuilder.activex