> Do I really need a message pump in this case?

You always need a message pump for ICS component (except TPing component) to
work. Without message pump, no winsock event !

> I think not, since the
> program never spends long times in the dll, because the data is given
> back to the caller very fast via callbacks.

Windows as the ability to handle 500.000 messages per second on a today's
desktop computer. So "long time" is very relative. 100 mS can be a long
time.

> But: in the near future the caller will be another dll. What's then?
> I don't know whether this part of the program will contain more than a
> starter stub later. Who needs a message pump then?

You _always_ need a message pump. If the calling program doesn't provide
one, you must provide one and to have one without interfering with the
calling DLL it is better to have all you stuff in a thread. Consider a
thread as a program within a program.

If you don't want to have a thread, you must ask the host application to
provide a hook for Application.ProcessMessages (or equivalent if the host
application is written using another language). You can do that by using a
callback.

> Now you've worried me a bit...

Sorry. You are now back to reality.

--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "Markus Humm" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Sunday, May 01, 2005 5:35 PM
Subject: Re: [twsocket] ReadLine


> [snip]
> >>
> >>The thing is that the code is in a dll, so application.processmessages
> >>might not work here. Or does it? The timeout will be rather short anyhow
> >>(ca. 50 ms) and I think i do it with GetTickCount, which should be
> >>sufficient here and more easy to use than a at this place timer.
> >>Or is there anything bad with these ideas?
>
> So far the dll works (ICS asynchronous transfer included), as the
> calling application is a Delphi one which calls
> application.processmessages from time to time.
>
> Do I really need a message pump in this case? I think not, since the
> program never spends long times in the dll, because the data is given
> back to the caller very fast via callbacks.
> But: in the near future the caller will be another dll. What's then?
> I don't know whether this part of the program will contain more than a
> starter stub later. Who needs a message pump then?
> Now you've worried me a bit...
>
> Greetings
>
> Markus
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to