[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-dcom
Subject:    INFO: VB UDTs and VT_RECORD (was Re: Speaking of VT_RECORD...)
From:       Randy Bowen <randy.bowen () REALTOR ! COM>
Date:       1999-04-30 19:14:27
[Download RAW message or body]


Just some info that may be useful for anyone using UDTs in/between COM
components....

We did further research on the problem as originally described.  (We had a
fair amount of help from a number of people at Microsoft -- thanks to all of
them.)  The bad news is, there appears to be a VB runtime bug.  (Bet you
thought that would never happen!)  The good news is, there's a simple
work-around to avoid it.

The application involves a back-end server component running in MTS, and a
front-end component running in IIS at page scope.  The back end passes
information in the form of UDTs.  We found that, with a single accessor, the
MTS server always worked as expected.  However, given multiple clients and
some concurrency, we saw intermittent errors.  These were slightly different
depending on how the information was returned:

*  If the information was returned as a Variant (as originally described), a
0x800A0005 error (CTL_E_ILLEGALFUNCTIONCALL) occurred in the back-end
component at the point where the output parameter was set.

*  If the information was returned as the specific UDT, the back end did not
report any problems but the front end would receive a 0x8001011D error
(RPC_E_INVALID_OBJREF).

The good news is that this problem disappears completely if the VB COM
components are compiled with BOTH the "Unattended Execution" AND the "Retain
in Memory" flags.  (You probably wanted to use these settings for
performance reasons anyway.  Now there's another reason....)


Randy Bowen
RealSelect, Inc.
randy.bowen@realtor.com


----- Original Message -----
From: Randy Bowen <randy.bowen@REALTOR.COM>
To: <DCOM@DISCUSS.MICROSOFT.COM>
Sent: Friday, March 26, 1999 3:20 PM
Subject: Re: Speaking of VT_RECORD...


> The problem occurred with the automation marshaler.  After your question,
I
> generated another similar interface with a DLL-based marshaler and had the
> same problem.  (The data types are still defined in the VB in both
cases --
> the interface is simply returning a VARIANT.)
>
> Playing on the server end, it looks like the VB runtime is raising an
> exception on the assignment of the return value.  In addition to the
> 0x800A0005 error, the returned IErrorInfo supplies a null GUID with a
> Description of "Invalid procedure call or argument".  When it succeeds,
the
> data looks good on the client side.
>
> Randy Bowen
> RealSelect, Inc.
> randy.bowen@realtor.com
>
>
>
> -----Original Message-----
> From: Box, Don <dbox@DEVELOP.COM>
> To: DCOM@DISCUSS.MICROSOFT.COM <DCOM@DISCUSS.MICROSOFT.COM>
> Date: Thursday, March 25, 1999 6:05 PM
> Subject: Re: Speaking of VT_RECORD...
>
>
> >Are you using the automation marshaler or a compiled /Oicf DLL-based
> >marshaler? If you switch, does the problem go away?
> >
> >DB
> >http://www.develop.com/dbox
> >
> >
> >> -----Original Message-----
> >> From: Randy Bowen [mailto:randy.bowen@REALTOR.COM]
> >> Sent: Thursday, March 25, 1999 5:30 PM
> >> To: DCOM@DISCUSS.MICROSOFT.COM
> >> Subject: Speaking of VT_RECORD...
> >>
> >>
> >> I have a VB server that returns a UDT as a Variant.  Hosted
> >> in-process, it works fine.  Hosted in MTS with a single
> >> client, it's still OK.  However, as soon as more than one
> >> client begins to access the MTS-hosted server, I start seeing
> >> random 0x800A0005 errors.
> >>
> >> Any clues as to what the problem might be?
> >>
> >> Randy Bowen
> >> RealSelect, Inc.
> >> randy.bowen@realtor.com
> >>
> >> ----------------------------------------------------------------
> >> Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
> >> contains important info including how to unsubscribe.  Save
> >> time, search
> >> the archives at http://discuss.microsoft.com/archives/index.html
> >>
> >
> >----------------------------------------------------------------
> >Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
> >contains important info including how to unsubscribe.  Save time, search
> >the archives at http://discuss.microsoft.com/archives/index.html
> >
>
> ----------------------------------------------------------------
> Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time, search
> the archives at http://discuss.microsoft.com/archives/index.html
>

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic