Eric, talking about your shared timer: do you call OnTimer of all attached
objects directly or post WM_TIMER to them? I had though over the same timer
class and that was my idea to broadcast timer signal. I think it'll eliminate
the issue of blocking during loop since PostMessage is asynchronous
Hi Anton,
I call it directly, in order not to allocate handlers, if you create a class
with a handle and post a message to it, it will be the same as using TTimer
directly, because you will use as many resources as TTimer would use (1
handle per instance), unless you create a class that is der
Hello
I would suggest the changing of constant WH_MAX_MSG in
OverbyteIcsWndControl.pas to a global variable to which we can change on our
software, without changing ICS code.
Doing this will allow us to control the amount of shared resources per handle,
giving the ability to create more socket
Eric,
I guess it helps to remove all pending messages with the given ID
from the queue when the message ID is unregistered.
One could do that either in custom code or maybe it should
be added in TIcsWndHandler.UnregisterMessage as below?
procedure TIcsWndHandler.UnregisterMessage(var Msg: UINT);
HI Arno
True, I think that will help, I will add this line to my ICS code to check
if it works, but I believe that it will work
I also think that this is something that must be on ICS code, on
UnregisterMessage as you proposed, not custom code.
I will test and come back to you soon
Eric
Msg := 0;
while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop}; // <==
added
if FMsgCnt = 0 then
DeallocateHWnd;
end;
Just a little correction
while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop}; // <==
added
Msg := 0;
Or else you will pass 0 t
Arno Garrels wrote:
> Eric,
>
> I guess it helps to remove all pending messages with the given ID
> from the queue when the message ID is unregistered.
>
> One could do that either in custom code or maybe it should
> be added in TIcsWndHandler.UnregisterMessage as below?
Previous code did remove
Eric Fleming Bonilha wrote:
> I would suggest the changing of constant WH_MAX_MSG in
> OverbyteIcsWndControl.pas to a global variable to which we can change
> on our software, without changing ICS code.
That won't work since TIcsWndHandler declares a static array with
length WH_MAX_MSG.
Instead
That won't work since TIcsWndHandler declares a static array with
length WH_MAX_MSG.
Instead I suggest that TIcsWndHandlerPool gets a public, thread-safe
method which checks whether the value can be changed and would raise
an exception if not. This method would succeed only if the pool
was empty (