 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jon Guest
|
Posted: Thu Aug 28, 2003 12:19 pm Post subject: Thread problem in ActiveX! |
|
|
Hi!
I am facing a very strange problem and wants to share with u, to get the
work around.
I am using ActiveX for our web application inwhich, i am getting some events
from our Server application through sockets. I have used a thread in it to
receive the events in and send them on web application through Thread by
using Synchroization technique like Synchronize(SendEvents). If i compile
the application in Delphi5, it works fine but when i compile it in Delphi6
or Delphi7, it does not, which really making me stuck.
I tried to send the events directly to the web application rather than using
thread, and got it working fine in Delphi6. But i need to have a thread for
it, just to make the activex responsive for other activites as well.
Thanks
Jeason Holliday
|
|
| Back to top |
|
 |
Simon Moscrop Guest
|
Posted: Thu Aug 28, 2003 8:52 pm Post subject: Re: Thread problem in ActiveX! |
|
|
Jon,
We've faced something very similar within the last week.The article that
gave us the information we needed may be found at
http://bdn.borland.com/article/0,1410,27655,00.html. The problem relates to
the differences in the way that Syncronize operates in d6(+).
I hope that this article points you in the right direction (cheers john
Kaster).
Lata
- Moz
http://www.moscorp.co.uk
"Jon" <nbutt (AT) arcsolutions (DOT) com> wrote
| Quote: | Hi!
I am facing a very strange problem and wants to share with u, to get the
work around.
I am using ActiveX for our web application inwhich, i am getting some
events
from our Server application through sockets. I have used a thread in it to
receive the events in and send them on web application through Thread by
using Synchroization technique like Synchronize(SendEvents). If i compile
the application in Delphi5, it works fine but when i compile it in Delphi6
or Delphi7, it does not, which really making me stuck.
I tried to send the events directly to the web application rather than
using
thread, and got it working fine in Delphi6. But i need to have a thread
for
it, just to make the activex responsive for other activites as well.
Thanks
Jeason Holliday
|
|
|
| Back to top |
|
 |
Joe Guest
|
Posted: Sun Aug 31, 2003 3:15 pm Post subject: Re: Thread problem in ActiveX! |
|
|
Hi,
I am facing the same problem with my ActiveX object compiled in D7. I
haven't come to any solution yet,
so i'm very much interested in knowing the right directions to solve this.
Joe
"Jon" <nbutt (AT) arcsolutions (DOT) com> wrote
| Quote: | Hi!
I am facing a very strange problem and wants to share with u, to get the
work around.
I am using ActiveX for our web application inwhich, i am getting some
events
from our Server application through sockets. I have used a thread in it to
receive the events in and send them on web application through Thread by
using Synchroization technique like Synchronize(SendEvents). If i compile
the application in Delphi5, it works fine but when i compile it in Delphi6
or Delphi7, it does not, which really making me stuck.
I tried to send the events directly to the web application rather than
using
thread, and got it working fine in Delphi6. But i need to have a thread
for
it, just to make the activex responsive for other activites as well.
Thanks
Jeason Holliday
|
|
|
| Back to top |
|
 |
Joe Guest
|
Posted: Wed Sep 03, 2003 10:05 am Post subject: Re: Thread problem in ActiveX! |
|
|
Hi,
I found the solution to use the threads in ActiveX with D7. I mixed the d7
technique with the old one from D5 and
it seems to work allright. To refresh our memory on how the old one worked
is, it used a global window to send the message which blocked the thread
until the message was processed.
So i assigned a WakeMainThread method that would call me when someone
invoked the Synchronize method.
In Wakemainthread proc i Posted (not Send) user message to my Control's
window and when the window received the message it was already in
synchronized state to the main thread. The only thing left to do is call
CheckSynchronize, which does all the work for us.
Joe
"Jon" <nbutt (AT) arcsolutions (DOT) com> wrote
| Quote: | Hi!
I am facing a very strange problem and wants to share with u, to get the
work around.
I am using ActiveX for our web application inwhich, i am getting some
events
from our Server application through sockets. I have used a thread in it to
receive the events in and send them on web application through Thread by
using Synchroization technique like Synchronize(SendEvents). If i compile
the application in Delphi5, it works fine but when i compile it in Delphi6
or Delphi7, it does not, which really making me stuck.
I tried to send the events directly to the web application rather than
using
thread, and got it working fine in Delphi6. But i need to have a thread
for
it, just to make the activex responsive for other activites as well.
Thanks
Jeason Holliday
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|