Even more WIN32OLE_EVENT

F

Fredrik Jagenheim

------=_Part_3943_23978911.1127908886148
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,

I'm still having trouble with the message_loop construct.

For my use, it's not acceptable that it takes 100% CPU fetching and
dispatching messages.

Even the simple test-application using IE found on
http://www.rubycentral.com/book/lib_windows.html uses 100% CPU doing
practically nothing...

I tried modifying the win32ole library to use GetMessage instead of
PeekMessage (causing it to wait until a message is available). This worked
for the simple IE application, but my application caused ruby to segfault.
Perhaps because I'm using threading?

I know I've asked this before, but once again I must ask if anyone has a
solution to this problem?

//F

------=_Part_3943_23978911.1127908886148--
 
D

Daniel Amelang

When I've used PeekMessage/GetMessage like functions, I've called them
via ruby-dl instead of win32ole. Have you tried that route?

Dan Amelang
 
F

Fredrik Jagenheim

------=_Part_1430_27123757.1127978815532
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

When I've used PeekMessage/GetMessage like functions, I've called them
via ruby-dl instead of win32ole. Have you tried that route?


It's not the actual PeekMessage/GetMessage functionality I want. I want the
functionality I get from win32ole. But since win32ole_event#message_loop is
implemented using PeekMessage, it will use 100% CPU while running.
Recompiling win32ole using GetMessage was a hack that didn't work as well a=
s
I had hoped...

Perhaps the only solution is to rewrite the interaction with my OLE object
using a custom C-library that I can call from ruby and just ditch the entir=
e
win32ole lib idea.

--F

------=_Part_1430_27123757.1127978815532--
 
D

Daniel Amelang

Perhaps the only solution is to rewrite the interaction with my OLE objec=
t
using a custom C-library that I can call from ruby and just ditch the ent= ire
win32ole lib idea.

Yea, sounds like it. Not to harp on ruby-dl, but I've been able to do
much of my custom c library stuff lately with ruby-dl. That way I
don't have to deal with a C compiler on windows :) So include that as
a second possibility.

Dan Amelang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,967
Members
47,520
Latest member
KrisMacono

Latest Threads

Top