Re: [twsocket] Suggestion for improvement

2010-08-19 Thread Arno Garrels
Eric Fleming Bonilha wrote:
 
 That is good too, we just need a method to increase the value, 200 is
 good ;)

I just checked in a change, please test it and let me know how it works
for you.

Log:

Added TIcsWndHandlerPool.SetWndHandlerMaxMsgIDs() to provide an option to 
change default maximum number of message IDs per WndHandler at runtime.
TIcsWndHandler.UnregisterMessage removes all messages with the unregistered 
message ID from the message queue now.
Resolved an Error Insight false positive in TIcsWndhandler.WndProc.
An assertion error is now raised if MsgHandlersCount exceeded the maximum 
number of message IDs per WndHandler.

If you do not use SVN you can get the file with a a browser as well
URL: 
http://svn.overbyte.be:8443/svn/ics/branches/icsv7/Delphi/Vc32/OverbyteIcsWndControl.pas
Both user and password ics 

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


[twsocket] Suggestion for improvement

2010-08-18 Thread Eric Fleming Bonilha
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 sockets on a software that already uses many 
system handles

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


Re: [twsocket] Suggestion for improvement

2010-08-18 Thread Arno Garrels
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 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 (when no instance of TWndControl existed) and the value
passed was in the range 50-1000, anything beyond makes no
sense IMO.

Setting the maximum number of messages per handler would be
just one line:
GWndHandlerPool.SetMaxMsgPerHandler(200); 

The GWndHandlerPool variable is assigned in OverbyteIcsWndControl's
initialization section.

-- 
Arno Garrels  


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


Re: [twsocket] Suggestion for improvement

2010-08-18 Thread Eric Fleming Bonilha

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 (when no instance of TWndControl existed) and the value
passed was in the range 50-1000, anything beyond makes no
sense IMO.

Setting the maximum number of messages per handler would be
just one line:
GWndHandlerPool.SetMaxMsgPerHandler(200);

The GWndHandlerPool variable is assigned in OverbyteIcsWndControl's
initialization section.



That is good too, we just need a method to increase the value, 200 is good 
;)


Eric 


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