ActiveX EXE Problem!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: ActiveX EXE Problem!

  1. #1
    Terry Guest

    ActiveX EXE Problem!

    Hi all!

    After some time developing an Active X EXE Server and Client we have come
    upon a strange problem that hopefully someone can shed some light on!

    The ActiveX EXE we have uses a single thread and has a Session multiuse
    class for users to log in. We do not use the Connector type class as shown
    in Microsoft. To fire events we Loop throught the collection of Sessions
    that we have and fire each event individually. This suits the system we have
    as we may not want to fire an specific event to each client.

    The problem that has come up is as follows. Using 2 clients, on one of the
    clients we use the left mouse button and hold the Caption bar of a window.
    This stops events being fired in that client, but also in the second client!
    This happens when no methods or properties etc. of the ActiveX EXE are being
    executed. I can just about grasp that events from the EXE server on the
    first client may be held up due to 'mouse' events, still I don't accept it
    should completely stop events coming through on that client.

    But as for 'stalling' the second client, that beats me!!!

    Any ideas?!

    Any help would be greatly appreciated!


    Terry Maguire

    "What's a deadline...?"







    Share on Google+

  2. #2
    darin darin Guest

    Re: ActiveX EXE Problem!


    I can't say for sure but it sounds like something like this:

    Both server and client as single threaded (not thread per object) or you
    haven't successfully spun up multiple threads on the server.

    The client grabs a server object and sets in in a WITHEVENTS variable. Another
    client does the same.

    now then the server has something happen that it determines needs to be signaled
    to certain clients.

    Server iterates through you're collection, and raises an event for client1.
    remember server is on a single thread. That thread is now suspended until
    client 1 acknowledges the event.

    Client1 however is suspended because you're dragging a window (or displayed
    a normal MSGBOX, or a variety of other things that can suspend normal event
    processing).

    The server is now hung waiting for client1 to process the event. Client2
    never gets an event because the server just hasn't gotten to it yet.

    Bottom line, multi thread your server, or use COM+ events, or even better,
    ditch COM all together and go with TCPIP. DCOM's just a hack on a crutch
    on kludge anyway!

    Believe it or not, this is the very reason they put "events" in COM+ (I can't
    remember exactly what they call them, but that's the idea)



    "Terry" <terrym@europlex.nospam.ie> wrote:
    >Hi all!
    >
    >After some time developing an Active X EXE Server and Client we have come
    >upon a strange problem that hopefully someone can shed some light on!
    >
    >The ActiveX EXE we have uses a single thread and has a Session multiuse
    >class for users to log in. We do not use the Connector type class as shown
    >in Microsoft. To fire events we Loop throught the collection of Sessions
    >that we have and fire each event individually. This suits the system we

    have
    >as we may not want to fire an specific event to each client.
    >
    >The problem that has come up is as follows. Using 2 clients, on one of the
    >clients we use the left mouse button and hold the Caption bar of a window.
    >This stops events being fired in that client, but also in the second client!
    >This happens when no methods or properties etc. of the ActiveX EXE are being
    >executed. I can just about grasp that events from the EXE server on the
    >first client may be held up due to 'mouse' events, still I don't accept

    it
    >should completely stop events coming through on that client.
    >
    >But as for 'stalling' the second client, that beats me!!!
    >
    >Any ideas?!
    >
    >Any help would be greatly appreciated!
    >
    >
    >Terry Maguire
    >
    >"What's a deadline...?"
    >
    >
    >
    >
    >
    >
    >


    Share on Google+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center