Re: Thread-safety in VB+MFC Nested ActiveX controls

Tech-Archive recommends: Speed Up your PC by fixing your registry



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.


.



Relevant Pages

  • Re: nawk: out of space in tostring on ...
    ... one client. ... lookup file to find ... array or empty string if all lines are ... # Go through each array element ...
    (comp.lang.awk)
  • Re: Access 2007: Creating a local relationship between two remote ODBC tables
    ... they'll make building queries easier, which, it seems to me, is what ... relationship diagram, which I can do manually without generating the ... saying it is eitehr right or wrong but it is convoluted. ... A Client table defines a Client not a ...
    (comp.databases.ms-access)
  • Re: architecture diagram
    ... that client is calling service for what reason. ... So this sounds to be that we are showing processes on diagram and why ... direction should be show the arrow. ... database or should we show database to client. ...
    (comp.object)
  • Re: Summing up Unique Records
    ... If i have a list of data as shown in the list below, how can i sum up the ... The original data that i have is in Diagram A, ... removed and it also sum up the different revenues for client 1. ... Name Phone Num Revenue ...
    (microsoft.public.excel.misc)
  • Clubbing multi visio pages into one
    ... How can I can club up six page visio diagram into one page visio. ... the diagram in six pages and the client has asked me to have into one page. ...
    (microsoft.public.visio.general)