Re: [twsocket] NOFORMS

2007-07-16 Thread Arno Garrels
Paul wrote:
> I'm using V5.
> So I still need to use define NOFORMS and undef  NOFORMS for each
> thread's execute begin/end.

Nothing needs to be undef, simply define NOFORMS in your project
options and rebuild all, ICS will then call its own thread-safe
routines and would not use the Forms unit, no matter whether Forms
is in the uses clause or not.  

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html 

> 
> Paul
> 
> - Original Message -
> From: "Arno Garrels" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Monday, July 16, 2007 2:39 PM
> Subject: Re: [twsocket] NOFORMS
> 
> 
>> Paul wrote:
>>> I always thaught that NOFORMS had to be defined for its own thread-
>>> save window allocation proc (and dealloc)
>> 
>> That's correct for V5! It depends on the version, V6 uses its
>> own thread-safe window allocation/deallocation routines regardless
>> whether NOFORMS is defined or not. In previous versions, if NOFORMS
>> is not defined non thread-safe
>> Forms/Classes.AllocateHwnd/DeallocateHwnd is used for the hidden
>> window. 
>> 
>>> So as long as the Forms unit in included in the project's uses
>>> clause, I don't need to define NOFORMS in any of the threads ?
>> 
>> You don't need it, but it was not thread-safe in V5!
>> Don't do that.
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>>> 
>>> Paul
>>> 
>>> - Original Message -
>>> From: "Francois Piette" <[EMAIL PROTECTED]>
>>> To: "ICS support mailing" 
>>> Sent: Monday, July 16, 2007 2:00 PM
>>> Subject: Re: [twsocket] NOFORMS
>>> 
>>> 
>>>>> Do I need to define NOFORMS in a thread when a blocking call
>>>>> (Http- Get) is
>>>> used ?
>>>>> 
>>>>> I'm using it without in a thread and it works fine (using it 2
>>>>> years)
>>>>> 
>>>>> I need to exchange a lot of database connections to webservice
>>>>> connections
>>>> and the main thread doesn't need the NOFORMS define.
>>>>> I would need a lot defines and undefs otherwise
>>>> 
>>>> NOFOMRS has nothing to do with the fact that the component is used
>>>> within a
>>>> secondary thread or the main thread. NOFORMS change the code in the
>>>> component so that it doesn't depends on the forms unit which is
>>>> huge and can
>>>> make a program executable file much larger even if no form is
>>>> needed (typically in console mode program).
>>>> 
>>>> 
>>>> Contribute to the SSL Effort. Visit
>>>> http://www.overbyte.be/eng/ssl.html --
>>>> [EMAIL PROTECTED]
>>>> Author of ICS (Internet Component Suite, freeware)
>>>> Author of MidWare (Multi-tier framework, freeware)
>>>> 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
>> --
>> 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


Re: [twsocket] NOFORMS

2007-07-16 Thread Paul
I'm using V5.
So I still need to use define NOFORMS and undef  NOFORMS for each thread's 
execute begin/end.

Paul

- Original Message - 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, July 16, 2007 2:39 PM
Subject: Re: [twsocket] NOFORMS


> Paul wrote:
>> I always thaught that NOFORMS had to be defined for its own thread-
>> save window allocation proc (and dealloc)
>
> That's correct for V5! It depends on the version, V6 uses its
> own thread-safe window allocation/deallocation routines regardless
> whether NOFORMS is defined or not. In previous versions, if NOFORMS
> is not defined non thread-safe Forms/Classes.AllocateHwnd/DeallocateHwnd
> is used for the hidden window.
>
>> So as long as the Forms unit in included in the project's uses
>> clause, I don't need to define NOFORMS in any of the threads ?
>
> You don't need it, but it was not thread-safe in V5!
> Don't do that.
>
> --
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
>>
>> Paul
>>
>> ----- Original Message -
>> From: "Francois Piette" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Monday, July 16, 2007 2:00 PM
>> Subject: Re: [twsocket] NOFORMS
>>
>>
>>>> Do I need to define NOFORMS in a thread when a blocking call (Http-
>>>> Get) is
>>> used ?
>>>>
>>>> I'm using it without in a thread and it works fine (using it 2
>>>> years)
>>>>
>>>> I need to exchange a lot of database connections to webservice
>>>> connections
>>> and the main thread doesn't need the NOFORMS define.
>>>> I would need a lot defines and undefs otherwise
>>>
>>> NOFOMRS has nothing to do with the fact that the component is used
>>> within a
>>> secondary thread or the main thread. NOFORMS change the code in the
>>> component so that it doesn't depends on the forms unit which is huge
>>> and can
>>> make a program executable file much larger even if no form is needed
>>> (typically in console mode program).
>>>
>>>
>>> Contribute to the SSL Effort. Visit
>>> http://www.overbyte.be/eng/ssl.html --
>>> [EMAIL PROTECTED]
>>> Author of ICS (Internet Component Suite, freeware)
>>> Author of MidWare (Multi-tier framework, freeware)
>>> 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
> -- 
> 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


Re: [twsocket] NOFORMS

2007-07-16 Thread Arno Garrels
Paul wrote:
> I always thaught that NOFORMS had to be defined for its own thread-
> save window allocation proc (and dealloc)

That's correct for V5! It depends on the version, V6 uses its
own thread-safe window allocation/deallocation routines regardless
whether NOFORMS is defined or not. In previous versions, if NOFORMS
is not defined non thread-safe Forms/Classes.AllocateHwnd/DeallocateHwnd
is used for the hidden window.

> So as long as the Forms unit in included in the project's uses
> clause, I don't need to define NOFORMS in any of the threads ?

You don't need it, but it was not thread-safe in V5!
Don't do that.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

> 
> Paul
> 
> - Original Message -
> From: "Francois Piette" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Monday, July 16, 2007 2:00 PM
> Subject: Re: [twsocket] NOFORMS
> 
> 
>>> Do I need to define NOFORMS in a thread when a blocking call (Http-
>>> Get) is
>> used ?
>>> 
>>> I'm using it without in a thread and it works fine (using it 2
>>> years) 
>>> 
>>> I need to exchange a lot of database connections to webservice
>>> connections
>> and the main thread doesn't need the NOFORMS define.
>>> I would need a lot defines and undefs otherwise
>> 
>> NOFOMRS has nothing to do with the fact that the component is used
>> within a
>> secondary thread or the main thread. NOFORMS change the code in the
>> component so that it doesn't depends on the forms unit which is huge
>> and can
>> make a program executable file much larger even if no form is needed
>> (typically in console mode program).
>> 
>> 
>> Contribute to the SSL Effort. Visit
>> http://www.overbyte.be/eng/ssl.html --
>> [EMAIL PROTECTED]
>> Author of ICS (Internet Component Suite, freeware)
>> Author of MidWare (Multi-tier framework, freeware)
>> 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
-- 
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


Re: [twsocket] NOFORMS

2007-07-16 Thread Wilfried Mestdagh
Hello Paul,

> So as long as the Forms unit in included in the project's uses clause, I
> don't need to define NOFORMS in any of the threads ?

correct

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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


Re: [twsocket] NOFORMS

2007-07-16 Thread Paul
I always thaught that NOFORMS had to be defined for its own thread-save 
window allocation proc (and dealloc)
So as long as the Forms unit in included in the project's uses clause, I 
don't need to define NOFORMS in any of the threads ?

Paul

- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, July 16, 2007 2:00 PM
Subject: Re: [twsocket] NOFORMS


>> Do I need to define NOFORMS in a thread when a blocking call (Http-Get) 
>> is
> used ?
>>
>> I'm using it without in a thread and it works fine (using it 2 years)
>>
>> I need to exchange a lot of database connections to webservice 
>> connections
> and the main thread doesn't need the NOFORMS define.
>> I would need a lot defines and undefs otherwise
>
> NOFOMRS has nothing to do with the fact that the component is used within 
> a
> secondary thread or the main thread. NOFORMS change the code in the
> component so that it doesn't depends on the forms unit which is huge and 
> can
> make a program executable file much larger even if no form is needed
> (typically in console mode program).
>
>
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> [EMAIL PROTECTED]
> Author of ICS (Internet Component Suite, freeware)
> Author of MidWare (Multi-tier framework, freeware)
> 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
>
> 

-- 
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


Re: [twsocket] NOFORMS

2007-07-16 Thread Francois Piette
> Do I need to define NOFORMS in a thread when a blocking call (Http-Get) is
used ?
>
> I'm using it without in a thread and it works fine (using it 2 years)
>
> I need to exchange a lot of database connections to webservice connections
and the main thread doesn't need the NOFORMS define.
> I would need a lot defines and undefs otherwise

NOFOMRS has nothing to do with the fact that the component is used within a
secondary thread or the main thread. NOFORMS change the code in the
component so that it doesn't depends on the forms unit which is huge and can
make a program executable file much larger even if no form is needed
(typically in console mode program).


Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
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


Re: [twsocket] NOFORMS with ICS v5 TTnCnx class

2006-04-13 Thread Francois Piette
> > Looking at the change you've made, I see that you have not the latest ICS
> > (beta) version. In the latest beta version, Arno Garrels already made those
> > changes ! In the history, it is dated march 11th.
>
> I downloaded and used the ICS v5 from your web site - that indicates
> that it's from 09/03/06.  Where I can download the most recent version from?

Looks like I made something bad and the "last" version is not available for 
download. I can't fix
this right now because I'm out of the office. I will do later today when I'm 
back.

Contribuez à l'effort SSL pour ICS. Visitez http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Auteur du freeware ICS - Internet Component Suite
Auteur du freeware MidWare - Multi-tiers framework
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


Re: [twsocket] NOFORMS with ICS v5 TTnCnx class

2006-04-12 Thread Bevan Edwards
Hi Francois,

Francois PIETTE wrote:
>>I have sent the file directly to your e-mail address, rather than the 
>>list.
> 
> 
> Looking at the change you've made, I see that you have not the latest ICS 
> (beta) version. In the latest beta version, Arno Garrels already made those 
> changes ! In the history, it is dated march 11th.

I downloaded and used the ICS v5 from your web site - that indicates 
that it's from 09/03/06.  Where I can download the most recent version from?

Regards,

Bevan

-- 
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


Re: [twsocket] NOFORMS with ICS v5 TTnCnx class

2006-04-12 Thread Francois PIETTE
> I have sent the file directly to your e-mail address, rather than the 
> list.

Looking at the change you've made, I see that you have not the latest ICS 
(beta) version. In the latest beta version, Arno Garrels already made those 
changes ! In the history, it is dated march 11th.

--
[EMAIL PROTECTED]
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


Re: [twsocket] NOFORMS with ICS v5 TTnCnx class

2006-04-12 Thread Bevan Edwards
Hi Francois,

I have sent the file directly to your e-mail address, rather than the list.

Regards,

Bevan


Francois PIETTE wrote:
>>I was compiling ICS v5 with NOFORMS defined and found that the TTnCnx
>>class is not properly setup for this - it uses WSocket.AllocateHWND and
>>WSocket.DeallocateHWnd.  I have corrected it by copying the appropriate
>>code from another component, but thought that Francois my like to fix
>>the original source files.
> 
> 
> It will be faster that you email your updated file since you seems to have 
> done the work !
> 
> --
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> [EMAIL PROTECTED]
> 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


Re: [twsocket] NOFORMS with ICS v5 TTnCnx class

2006-04-12 Thread Francois PIETTE
> I was compiling ICS v5 with NOFORMS defined and found that the TTnCnx
> class is not properly setup for this - it uses WSocket.AllocateHWND and
> WSocket.DeallocateHWnd.  I have corrected it by copying the appropriate
> code from another component, but thought that Francois my like to fix
> the original source files.

It will be faster that you email your updated file since you seems to have 
done the work !

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
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


Re: [twsocket] NOFORMS and TWSocketServer

2005-04-11 Thread Arnaldo Braun
Hi

Did you excluded debug information? See compiler and linker options

[]
Arnaldo

Wilfried Mestdagh wrote:

>Hello Jack,
>
>I dont know wy it is so mutch bigger, sorry :(
>
>TWSocket is listening socket, it does nothing else than listening. When
>new connection comes in then the connection is accepted by another
>TWSocket and so on. So you can support as many clients as you want. This
>is also how TWSocketServer works.
>
>What I was trying to say with 1 client, that it is very simple, you dont
>have to code mutch. When you have to support many clients then you have
>todo all things that are on board in TWSocketServer.
>
>---
>Rgds, Wilfried
>http://www.mestdagh.biz
>  
>

-- 

Arnaldo Braun
Consultoria em Informática
mailto:[EMAIL PROTECTED]
FLORIANOPOLIS - SC - BRASIL


--
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


Re: [twsocket] NOFORMS and TWSocketServer

2005-04-10 Thread Wilfried Mestdagh
Hello Jack,

> With NOFORMS defined, the application size is about 111KB.

the NOFORMS exclude some units in the uses clause to decrease the
filesize.

> After I replaced TWSocket with TWSocketServer, the file size
> becomes over 300KB. I went through the uses clauses. It's
> the minimum already. I can not make it as small as it was.

Hmm I suspect some unit can be excluded in uses clause because not the
TWSocketServer increase with 200 kb.

> 1. Why is TWSocket used for the server socket, instead of
>TWSocketServer?

I think this is older demo. TWSocketServer did not exists in the
beginning.

>If so, what's the difference of using it and TWSocketServer for
>server sockets? In other words, when should I use TWSocket and when
>to use TWSocketServer?

Use TWSocketServer for TCP server sockets. TWSocketServer use TWSocket
as server socket. You can use TWSocket of course but then you have to
reinvent the wheel, holding client connections and all other goodies
that are implemented in TWSocketServer.

Maybe there is one exception (but I think you only gain a few kb of exe
size), and that is if you only wants to have 1 client.

---
Rgds, Wilfried
http://www.mestdagh.biz


-- 
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


Re: [twsocket] NOFORMS and TWSocketServer

2005-04-10 Thread Arno Garrels
Jack wrote:
> Hi Francois, Wilfried and others,
> 
> I noticed that the Console server demo uses TWSocket.
> With NOFORMS defined, the application size is about 111KB.

Compiled with D7 it's 159 KB here.

> 
> After I replaced TWSocket with TWSocketServer, the file size
> becomes over 300KB. I went through the uses clauses. It's
> the minimum already. I can not make it as small as it was.

Did you define NOFORMS in the **project options**?, this is
important.
When I compile a new console project with nothing else than a
TWSocketServer.Create() EXE-size is 156 KB, D7. 

> 
> So, I have a few questions here:
> 1. Why is TWSocket used for the server socket, instead of
>TWSocketServer? Is it file size related? If so, why
>TWSocketServer makes the file a lot bigger?
 
> 2. I tested the console server demo, it handles multiple
>connections. If so, what's the difference of using it
>and TWSocketServer for server sockets? In other words,
>when should I use TWSocket and when to use TWSocketServer?

>From what I can see the consvr demo acts very similar like
TWSocketServer except that is isn't wrapped in a component.
I think TWSocketServer (Aug 29, 1999) was not yet written when consvr demo was 
(Feb 17, 1999).
 

Regards,

Arno Garrels

> 
> --
> Thanks,
> Jack

--
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