Re: [twsocket] Architectural question II

2007-03-20 Thread Bevan Edwards
Why not have a single thread responsible for doing that and then just 
have the TTimers use PostThreadMessage to request the update?

Markus Humm wrote:
 Hello,
 
 regarding my question from last weekend only a part was answered so far.
 The thing is now: if several TTimers get fired at the same time and all 
 of them want to write into a shared TStringList-Type buffer (okay, it's 
 in a wrapper class), how to make sure only one at a time gets acces and 
 doesn't mess up the thing? because the critical section will only guard 
 this against the thread which reads out the entries and afterwards 
 deletes them.
 
 So what to do here?
 
 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


[twsocket] WinSock error 10035 with TWSocketServer

2007-01-11 Thread Bevan Edwards
Hi all,

I am using BDS2006 to write a service application that creates a 
TWSocketServer and waits for connections.  When a connection is made, 
the client sends requests and the service processes the requests and 
returns the results.

This is all being done with LineMode enabled.

I've written a similar module in another application recently and that 
went without a hitch.

In this particular case (using code copied from the other application), 
in OnDataAvailable for the TWSocketClient I type cast the Sender to a 
TWSocketClient and then call ReceiveStr to retrieve the data.  This was 
resulting in an empty string, despite the fact that by inspecting the 
object I could see there is data in the receive buffer.  Further 
investigation/testing has revealed that I'm getting error 10035 
(operation would block) and wondered why this would happen now and not 
previously.

The only thing I can think of that I'm doing different is that the 
testing is being done on one machine, whereas I don't think I did that 
previously.  However, I have tested this application with the client on 
another machine and it exhibits the same problem.

Another thing I noticed is that if I do:
  AnsiString msg = ((TWSocketClient*)Sender)-ReceiveStr();
at the start of the OnDataAvailable event, then I get the data coming 
through.  But I believe (based on the existing application that works) 
that I should be able to typecast the Sender variable first.

Does anyone have any suggestions about what might be going wrong here?

Regards,

Bevan Edwards

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

2006-08-31 Thread Bevan Edwards
Hi Carlos,

Is the Smtp1.port := 'smpt'; an error in your code or a typo?
It should be Smtp1.port := 'smtp';

Regards,

Bevan


lalin wrote:
   Hello,
   I use SMTPClient for sending a email since a server with default smtp 
 server of IIS. The example program find this smtp server. But in my program, 
 with this code:
 Smtp1.Host := smtpserver;
 Smtp1.port := 'smpt';
 Smtp1.FromName := name;
 Smtp1.HdrFrom  := mail1;
 Smtp1.HdrTo:= mail2;
 Smtp1.HdrSubject := title;
 Smtp1.Connect;
 Smtp1.Data;
 Smtp1.quit;
 
   produces SMTP component not ready. Can you help me?
 
   Regards.
   Carlos.

-- 
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] BCB2006 Console mode application requires CONTROLS.OBJ

2006-04-15 Thread Bevan Edwards
Hi all,

I just thought I'd mention that I solved my problem (see below).

It appears that, by default, when creating a console application that 
uses the VCL, BDS2006 puts vcl and rtl into the packages section of the 
.bdsproj file, but not in the libraries section.  So I ended up setting 
the following in the .bdsproj file:

 property category=build.node name=libraries value=vcl.lib 
rtl.lib IcsDel100.lib/

Regards,

Bevan


Bevan Edwards wrote:
 Hi all,
 
 I was hoping someone here may be able to help me with this.  I have 
 created a console mode application and turned off Build with Runtime 
 packages - a sample of code exhibiting the problem is shown below.
 
 When I attempt to build this project, I get an error stating [Linker 
 Fatal Error] Fatal: Unable to open file 'CONTROLS.OBJ'.
 
 In my BDS lib directory I have a CONTROLS.DCU file, but not CONTROLS.OBJ 
 file.
 
 If I build with Build with Runtime packages turned on, then I don't 
 get the problem.
 
 Can anybody tell me which file I need to link in to get rid of this message?
 
 --snip--
 #include vcl.h
 #pragma hdrstop
 
 #include smtpprot.hpp
 
 #pragma package(smart_init)
 #pragma link SmtpProt
 //---
 #pragma argsused
 int main(int argc, char* argv[])
 {
   TSyncSmtpCli* cliSmtp = new TSyncSmtpCli(NULL);
 
   cliSmtp-FromName = [EMAIL PROTECTED];
   cliSmtp-HdrFrom = [EMAIL PROTECTED];
   cliSmtp-RcptName-Clear();
   cliSmtp-RcptName-Add([EMAIL PROTECTED]);
   cliSmtp-HdrTo = [EMAIL PROTECTED];
   cliSmtp-HdrSubject = Test Message;
   cliSmtp-MailMessage-Text = This is a test message;
   cliSmtp-Host = smtp.mydomain.com;
 
   cliSmtp-ConnectSync();
   cliSmtp-HeloSync();
   cliSmtp-MailFromSync();
   cliSmtp-RcptToSync();
   cliSmtp-DataSync();
 
   delete cliSmtp;
   cliSmtp = NULL;
 
   return 0;
 }
 --snip--
 
 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


[twsocket] BCB2006 Console mode application requires CONTROLS.OBJ

2006-04-13 Thread Bevan Edwards
Hi all,

I was hoping someone here may be able to help me with this.  I have 
created a console mode application and turned off Build with Runtime 
packages - a sample of code exhibiting the problem is shown below.

When I attempt to build this project, I get an error stating [Linker 
Fatal Error] Fatal: Unable to open file 'CONTROLS.OBJ'.

In my BDS lib directory I have a CONTROLS.DCU file, but not CONTROLS.OBJ 
file.

If I build with Build with Runtime packages turned on, then I don't 
get the problem.

Can anybody tell me which file I need to link in to get rid of this message?

--snip--
#include vcl.h
#pragma hdrstop

#include smtpprot.hpp

#pragma package(smart_init)
#pragma link SmtpProt
//---
#pragma argsused
int main(int argc, char* argv[])
{
TSyncSmtpCli* cliSmtp = new TSyncSmtpCli(NULL);

cliSmtp-FromName = [EMAIL PROTECTED];
cliSmtp-HdrFrom = [EMAIL PROTECTED];
cliSmtp-RcptName-Clear();
cliSmtp-RcptName-Add([EMAIL PROTECTED]);
cliSmtp-HdrTo = [EMAIL PROTECTED];
cliSmtp-HdrSubject = Test Message;
cliSmtp-MailMessage-Text = This is a test message;
cliSmtp-Host = smtp.mydomain.com;

cliSmtp-ConnectSync();
cliSmtp-HeloSync();
cliSmtp-MailFromSync();
cliSmtp-RcptToSync();
cliSmtp-DataSync();

delete cliSmtp;
cliSmtp = NULL;

return 0;
}
--snip--

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] RE : RE : RE : THttpCli in TDatamodule (Console program)

2006-04-13 Thread Bevan Edwards
Hi,

Yves Palma wrote:
In fact I have an AV with any ICS component (if I create a new TForm
project and add a Tping component and then run the program, I get the
AV) The AV is in rtl100.bpl
 
 I have solved my problem.
 I need to unselect 'build with packages' on my Project Options /
 Packages.
 
 I don't have any AV (Access Violation) and everything is ok.
 (THttpcli work fine on my datamodule)

In that case, the problem was probably caused by the fact that the 
application either couldn't find the appropriate .BPL file, or the one 
it found was the wrong version.

You could try building with build with packages turned on and put the 
ICS BPL file into the same directory as your executable.

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


[twsocket] NOFORMS with ICS v5 TTnCnx class

2006-04-12 Thread Bevan Edwards
Hi all,

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.

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


[twsocket] Compiling ICSBCB100 project for ICS v5

2006-04-12 Thread Bevan Edwards
Hi all,

As someone earlier indicated, I built the ICSDel100 project and then 
turned on Generate All C++Builder files option, which seems to have 
worked alright.

However, if I try to build the ICSBCB100 project, it gives me errors 
about mssing .OBJ files.  The first is ICSLOGGER.OBJ, which I found in 
the output from the ICSDEL100 project, so I just used that.  But the 
next is ICMP.OBJ, which doesn't appear to be anywhere.

Has anyone had any success building this project?
Do we need to build this project?

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] Compiling ICSBCB100 project for ICS v5

2006-04-12 Thread Bevan Edwards
Hi Francois,

Francois PIETTE wrote:
As someone earlier indicated, I built the ICSDel100 project and then
turned on Generate All C++Builder files option, which seems to have
worked alright.

However, if I try to build the ICSBCB100 project, it gives me errors
about mssing .OBJ files.  The first is ICSLOGGER.OBJ, which I found in
the output from the ICSDEL100 project, so I just used that.  But the
next is ICMP.OBJ, which doesn't appear to be anywhere.
 
 
 The compiler should compile IcsLogger.pas and Icmp.pas (provided) to create 
 the corresponding .obj files. I don't know why they are not compiled. Are 
 the files listed in the project ?

No, neither of them are listed in the project.  But then I noticed that 
ICMP is not listed in the ICSDel100 project either.

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] Compiling ICSBCB100 project for ICS v5

2006-04-12 Thread Bevan Edwards
Hi Arno,

As someone earlier indicated, I built the ICSDel100 project and then
turned on Generate All C++Builder files option, which seems to have
worked alright.

However, if I try to build the ICSBCB100 project, it gives me errors
about mssing .OBJ files.  The first is ICSLOGGER.OBJ, which I found in
the output from the ICSDEL100 project, so I just used that.  But the
next is ICMP.OBJ, which doesn't appear to be anywhere.

Has anyone had any success building this project?
Do we need to build this project?
 
 
 AFAIK if you built the Delphi package with option Generate All C++Builder
 files you should not try to build ICSBCB100 as well. Components will be
 available on the palette in both BCB and Delphi personality as well. 
 That's at least what I found thru trial and error. 

Yes, the components are available for C++Builder projects, so I'll just 
skip building the ICSBCB100 package.

The only problem I found was that the Generate All C++Builder files 
option didn't create the *.OBJ files, but Generate C++ object files 
did, so that's alright.

I usually build my applications with Packages and Dynamic RTL turned 
off, so that's why I needed the *.OBJ files.

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 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] Any BCB users out there?

2006-04-01 Thread Bevan Edwards
Hi Arno,

I followed your instructions for installing ICS v6 (see below), but when 
I compile a project with a single HttpCli component on it, I get 
Declaration terminated incorrectly and Multiple declaration for 
u_long errors from the OverbyteIcsWinsock.hpp file.

You mentioned that you compiled such a project without any problems. 
How did you get rid of these messages?

Regards,

Bevan



Arno Garrels wrote:
 Arno Garrels wrote:
 
Fastream Technologies wrote:

I use BCB6 and BDS2006, but I haven't yet ventured down the path of
installing any of the latest releases.  However, it's something I'm
considering doing within the next month or so (depending on availability
of my time).

I think you might face the same problems that I face when you upgrade to
the latest version.

Using BDS2006, I built the Delphi package, then in the Linker options I
checked Generate All C++Builder Files and rebuilt all. That way the ICS
components become available on the Tool Palette in both personalities. 

I dropped a THttpCli on a form of a newly created BCB VCL project and
compiled it w/o any problem.
 
 
 Forgot to say that if you use above methode the BCB-BDS2006 demo projects
 complain that IcsBcb100.lib cannot be found. I had to remove that reference
 manually from the project files.
 
 
 ---
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 

-- 
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] Any BCB users out there?

2006-04-01 Thread Bevan Edwards
Oh, I might switch to v5 then ;)

Arno Garrels wrote:
 Bevan Edwards wrote:
 
Hi Arno,

I followed your instructions for installing ICS v6 (see below), but when
I compile a project with a single HttpCli component on it, I get
Declaration terminated incorrectly and Multiple declaration for
u_long errors from the OverbyteIcsWinsock.hpp file.

You mentioned that you compiled such a project without any problems.
How did you get rid of these messages?
 
 
 I was talking about V5, I've not yet installed V6. 
 
 ---
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 
 
Regards,

Bevan



Arno Garrels wrote:

Arno Garrels wrote:


Fastream Technologies wrote:


I use BCB6 and BDS2006, but I haven't yet ventured down the path of
installing any of the latest releases.  However, it's something I'm
considering doing within the next month or so (depending on
availability of my time).

I think you might face the same problems that I face when you upgrade
to the latest version.

Using BDS2006, I built the Delphi package, then in the Linker options I
checked Generate All C++Builder Files and rebuilt all. That way the
ICS components become available on the Tool Palette in both
personalities. 

I dropped a THttpCli on a form of a newly created BCB VCL project and
compiled it w/o any problem.


Forgot to say that if you use above methode the BCB-BDS2006 demo projects
complain that IcsBcb100.lib cannot be found. I had to remove that
reference manually from the project files.


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

-- 
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] Any BCB users out there?

2006-04-01 Thread Bevan Edwards
Oh, I might switch to v5 then ;)
 
 
 The only reason why I'm still on V5 is not enough time :(
 If you don't need to instanciate thousands of ICS objects
 you can sure use V5 until V6 fully supports BCB2006.
 However it would be nice if you were able to fix it.  

Time is a bit of a factor for me too, but now I have both ICS v5 and ICS 
v6 packages built in BDS2006 (but only ICS v5 installed) and I can swap 
between them reasonably easily.  So as I get a chance, I'll look into 
the ICS v6 problem further.

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] Any BCB users out there?

2006-04-01 Thread Bevan Edwards
Hiya,

Fastream Technologies wrote:
 The problem in v6 under C++ is OverbyteIcsTypes defines the Windows 
 constants once again for just clarity reasons under Delphi and this annoys 
 the C++ compiler.

 From a quick look, isn't the problem simply that WINSOCK2.H declares 
these using #define's, while the OverbyteIcs*.hpp declares them as 
static const?

Would it be feasible to have a #define that caused these static const 
definitions not to be made?

Or is the problem more complex than that?

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] Any BCB users out there?

2006-03-07 Thread Bevan Edwards
Hi all,

 As far as I can remember, we are not the only BCB users here on this list. 
 Could you confirm that you are as well using BCB and how do you install and 
 use the latest versions on your C++ compiler?

I use BCB6 and BDS2006, but I haven't yet ventured down the path of 
installing any of the latest releases.  However, it's something I'm 
considering doing within the next month or so (depending on availability 
of my time).

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] SmtpCli problem with OnAttachContentType

2005-03-29 Thread Bevan Edwards
Hi Arno,
I have just discovered a problem with the OnAttachContentType
implementation in TSmtpCli and TSyncSmtpCli.
When this property is assigned, as soon as InitUUEncode is called within
 TriggerGetData, the assignment to FOnAttachContentType is lost.

Try current ICS release, SmtpProt.pas has been updated/changed/fixed
since that time when InitUUEncode was renamed.
Thanks for that, it worked perfectly! :)
Regards,
Bevan Edwards
--
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