OLE events are scheduled if SysSleep is used in mainline.
OLE events are NOT scheduled if lineIn for empty queue is used in mainline.
What's the difference ?
Hello, bad news. OLE events are NOT scheduled even mainline uses
SysWaitEvenSem. The problem will be moved to bugs tracker if not
answered/solved. If the realization doesn't support events driven path then it
is not useful at all.
May be the problem relates to bugs 1565431 and 1068288 ?
Hi, I'm pretty busy right now and don't have time to give you a really good
It is not related 1068288. That bug is fixed.
I can't find 1565431, so I don't know about that.
It is related to 2053673, although the bug title might not suggest.
There is one basic flaw in the current implementation of oleObject that bug
2053673 brings out. COM needs to be initialized for each thread. Currently it
is only initialized for the first thread. This is fixable but needs some
redesign. I intend to do that sometime, but who knows when I will get to it.
The problem with using connectable OLE objects and events is one I've known
about for some time and have played with somewhat. There is not an easy
solution that I see. It will take some in-depth study to see if it can even be
There are some working sample(s) with the distribution that use OLE
connectable objects. I also have put some working samples in the incubator,
you could take a look at those:
To use OLE you have to use single-threaded apartments. I'm not an expert in
this area, but I'm pretty sure that implies, if you wait on a mutex in the
main thread, the only one where COM is initialized, you are not going to get
A couple of years ago when I was looking into why events did not work as I
expected, I didn't realize that COM needed to be initialized on each thread in
a single process. I thought it just needed to be initialized for each process.
At that time I could not figure out a way to get events to always work. Since
I figured out what the problem was in bug 2053673 I haven't gone back to the
OLE events problem. The first step is to fix the problem I know about
(initialize COM for each thread.) Maybe then the event problem will be
Certainly open a bug if you want, be sure and supply an example program.
Hello, thank you for recommendations. I will look in it. If it not help I
prepare a sample (although the sample uses third party ocx) and open a bug.
The ref to 1565431 is: http://sourceforge.net/search/?group_artifact_id=68473
P.S. It's very strange for me that events driven oorexx requires pull based
approach in this case (still don't understand why/how infinite SysSleep
realization differs from SysWaitEventSem). I'm not ready to use in my code
poll based approach (SysSleep) for the ONLY simple OLE (icon in systray) in
the project. It's not clear also how other projects are working with OLE
events: looping in mainline with SysSleep (how it is in the oorexx
doc/samples)? It looks not good.
Hello, I opened the bug 2925296 . Best regards, Vladimir
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.