Re: Thread-safety in VB+MFC Nested ActiveX controls
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Thu, 4 Aug 2005 09:33:04 -0700
I hope by multithreaded client you mean a client that creates
mulktiple STAs. E.g. not a client using MTA.
I'd start doing real debugging. Nothing in your post suggests
where there might be a problem, though the client is the
place I'd start with first.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
".Suchit" <Suchit@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7C3031DB-6A87-4EFE-B66E-F338DAFA2C41@xxxxxxxxxxxxxxxx
> Hi All,
>
> Not sure about thread-safety issues & can following scenario work well:
>
> Let's give some names:
> (1) VB1 = Visual Basic 6.0 ActiveX control, non-windowless, threading
> model
> Apartment
> (2) Cls[..] = array of VB 6.0 Class module maintained inside above ActiveX
> control (VB1)
> (3) MFC1 = MFC 6.0 ActiveX control, non-windowless, threading model
> Apartment
>
> Now from a multi-threaded client application, using GIT we are sending
> calls
> to VB1. VB1 internally maintains one instance in Cls[..] array per thread.
> This array element again creates one instance of MFC1 control and
> subscribes
> to its events.
>
> Now when MFC1 generates an event, the member of Cls[..] array calls a
> method
> of VB1 parent control. Cls[..] members and VB1 are runtime-late-bound
> using
> Object in VB. Static binding does not work. (this is anotehr strange
> problem)
>
> Now when methods of VB1 are called by Cls[..] member elements, this VB1
> generates events which are sink-ed by multi-threaded client.
>
> This application works well for 10-15 minutes and suddenly generates an
> error:
> Method '~' of object '~' failed.
>
> Is this scenario Thread-Safe? What could be a potential source of
> problems?
> Should I try maintaining a queue in VB1 for receiving event sinks (instead
> of
> calling methids directly from Cls[...] objects)? Unfortunately in this
> forum
> I don't know how to attach a diagram. I have a good diagram that explains
> the
> visually nesting of our components.
>
> Any help would be great.
.
- Follow-Ups:
- Re: Thread-safety in VB+MFC Nested ActiveX controls
- From: .Suchit
- Re: Thread-safety in VB+MFC Nested ActiveX controls
- References:
- Thread-safety in VB+MFC Nested ActiveX controls
- From: .Suchit
- Thread-safety in VB+MFC Nested ActiveX controls
- Prev by Date: Re: Can GlobalInterfaceTable be CoCreateInstance()-ed by multiple
- Next by Date: Re: DCOM security problem - connect but no call
- Previous by thread: Thread-safety in VB+MFC Nested ActiveX controls
- Next by thread: Re: Thread-safety in VB+MFC Nested ActiveX controls
- Index(es):
Relevant Pages
|