Re: [twsocket] Freeze when using smtp after recreating its parent form
Hi Marcelo! Ok, I didn't realize that that was what it was. Thanks for the clarification! I tried it in the example application but I still get the same freeze when trying to connect after the second time the form is created... Any other ideas? To rephrase a solution to the problem: If I use the standard example applications or if I put the smtp component on the main form of my own application, everything works fine on all computers since the main form is not released until the application is closed. It is when the form containing the smtp-component is created and freed when I want to send an email that I get the freezing problem the second time it is done. So why not just put it on the main form? Well I want to have the capability to send e-mails from many applications so it is convenient to have a separate e-mail unit with an Execute-function that I can call from my applications. Execute takes care of everything from creating the form that contains the smtp component and shows the sending status to initiating the properties of the smtp component with the parameters passed to Execute. It tries to send the email and returns true if the email was sent. Once again: All suggestions are appreciated. Thank You in advance! Best Regards Henrik -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Marcelo Grossi Skickat: den 11 december 2006 17:41 Till: ICS support mailing Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform Hi, Procedure Variable is a variable that has scope only for a given procedure. Example: procedure MyForm.ButtonSendMailClick(Sender : TObject); var MySendMailForm : TMySendMailForm; -- Procedure Variable, for its only accessible inside this procedure (ButtonSendMailClick)... begin MySendMailForm := TMySendMailForm.Create(params..); etc... . end; Regards, Marcelo Grossi My final remark was that I normally have the form as a procedure variable as it is not needed to be defined outside the buttonclick event and maybe that also solves your issue. I don't know if I understand You correctly... Best Regards Henrik -- 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] Freeze when using smtp after recreating its parent form
Hello Henrik, Do you have the same problem in the IDE ? Because this way you can check witch code line never comes back (freeze). If not eventually open a console window and write some debug information into it to see where it happens. Your approach is normal. I do this all the time, however I almost never use forms for it. Normally I have an object containing the component, eg TSmtpClient, another object that creates / handles / destroy the TSmtpClient objects. But in principle it is the same. It can as whell be a DataModule, a Form or whatever other object. Question: We do understeand the word 'Freeze' the right way ? Form cannot moved, closed, application cannot quit, etc... Right ? --- 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] Freeze when using smtp after recreating its parentform
Question: We do understeand the word 'Freeze' the right way ? Form cannot moved, closed, application cannot quit, etc... Right ? It was writen in some previous posting that the application was then at 50% cpu, so on a hyperthreaded cpu, the application is in some fast loop, i gues -- 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] FastCGI project proposal (with permission from Francois)
Dear ICS Colleagues, We (Fastream Technologies) are looking for a developer who will be in charge of developing a FastCGI extension (See the the specs at http://www.fastcgi.com) based on our custom CGI component for our existing server based on ICS. If you are interested as, please email us from [EMAIL PROTECTED] with how much do you ask for the job and the deadline you can do it in. If you want to contribute to this project by any means, please do not hesitate to email. Best Regards, Subzero -- 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] Freeze when using smtp after recreating itsparentform
Question: We do understeand the word 'Freeze' the right way ? Form cannot moved, closed, application cannot quit, etc... Right ? It was writen in some previous posting that the application was then at 50% cpu, so on a hyperthreaded cpu, the application is in some fast loop, i gues It's an Intel Core Duo on the machine I use to duplicate the problem. Can the type of processor be a problem in this case? // Henrik -- 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] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin)
Hello ! For your next message, be sure to use a proper subject. Using a proper subject enhance your chances to get an answer. Is it OK now ? Have a look at FtpAsy sample program (In ICS-V5 but also good for V6 provided you change the uses clause). Sorry, but i couldn't find any such sample as in ICS archive, same not at your website (User made section). Can you please give me exact way where to get this sample ? You may also have a look at the MailSndAsync demo of V5, it's SMTP but Same problem as with FtpAsy, i can't find that anywhere. Aleksey Potjomkin _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -- 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] Freeze when using smtp after recreating itsparentform
Question: We do understeand the word 'Freeze' the right way ? Form cannot moved, closed, application cannot quit, etc... Right ? It was writen in some previous posting that the application was then at 50% cpu, so on a hyperthreaded cpu, the application is in some fast loop, i gues It's an Intel Core Duo on the machine I use to duplicate the problem. Can the type of processor be a problem in this case? // Henrik I have really no idea, I was just guessing that the problem was a fast loop due to the reported cpu load. But with the log you provided maybe someone is able to help. I can not :( -- 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] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin)
Have a look at FtpAsy sample program (In ICS-V5 but also good for V6 provided you change the uses clause). Sorry, but i couldn't find any such sample as in ICS archive, same not at your website (User made section). Can you please give me exact way where to get this sample ? You may also have a look at the MailSndAsync demo of V5, it's SMTP but Same problem as with FtpAsy, i can't find that anywhere. just download the ics v5 and then have a look in de ics/internet directory -- 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] Freeze when using smtp after recreating its parentform
Hello Wilfred! Yes, I get the same behavior when running the application from within the IDE. So I traced the code up until the application stops to respond. (And yes, we mean the same thing: the application freezes or hangs so that You can't quit and You can not move or close the window.) The trace disappears in the function WSocket_Synchronized_WSAAsyncSelect in WSocket.pas. You can see the actual line where something happens in the code snippet below: function WSocket_Synchronized_WSAAsyncSelect( s: TSocket; HWindow: HWND; wMsg: u_int; lEvent: Longint): Integer; begin SaveTrace('Start WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect'); if @FWSAAsyncSelect = nil then @FWSAAsyncSelect := WSocketGetProc('WSAAsyncSelect'); SaveTrace('Hang on the line below this row: Result := FWSAAsyncSelect...'); Result := FWSAAsyncSelect(s, HWindow, wMsg, lEvent); // -- Something happens here SaveTrace('Hang on the line obove this row: Result := FWSAAsyncSelect...'); SaveTrace('End WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect'); end; Does this make any sense? Best Regards Henrik Ps. If there by any chance is someone who want a bit more in depth facts, I also attached the following trace logs :-) I added the SaveTrace procedure seen in the snippet above at the first line and the last line of the following functions and procedures: WSocket.pas: function XSocketWindowProc WSocket.pas: procedure TCustomWSocket.WndProc WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone WSocket.pas: procedure TCustomSocksWSocket.Connect; WSocket.pas: procedure TCustomWSocket.Connect WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect So after the ConnectButton in the example is pressed I get the following results on computers where everything works: First time the SmtpTestForm is created and ConnectButton is pressed: Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc Start WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName Start WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone Start SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone Start WSocket.pas: procedure TCustomSocksWSocket.Connect Start WSocket.pas: procedure TCustomWSocket.Connect Start WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect Hang on the line below this row: Result := FWSAAsyncSelect... Hang on the line obove this row: Result := FWSAAsyncSelect... End WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect End WSocket.pas: procedure TCustomWSocket.Connect End SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone End WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone End WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc I close the SmtpTestForm, release it and create it again. When ConnectButton is
Re: [twsocket] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin)
For your next message, be sure to use a proper subject. Using a proper subject enhance your chances to get an answer. Is it OK now ? Hi Aleksey! I'm also new to this but I think what Francois meant was that You should _continue_ to use the subject that describes the contents of the thread You are answering. It makes it easier for everyone to follow the thread and se what it is about. I don't use Digest mode but as I have understood it You get one mail with a standard subject describing what volume and issue it is and the separate messages attached as separate files. I think You should not answer that mail directly (at least not without replacing its subject first...) Instead I think You can open the attached message You want to send an answer to and reply to that one. (If You use non Digest mode every message arrives separately and You can answer them directly.) Well I don't know if that explained anything but I gave it a try :-) Regards Henrik -- 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] Freeze when using smtp after recreating itsparentform
Henrik, I still guess that it's caused by any crap process running on this box. Why else does it not happen on other computers as well? I don't know the Norman software, but have you tried to uninstall it? I would also check the auto-started processes as well and turn them off one after the other. Then I would search for strange processes in the process list that do not exist on the other, working boxes. That's at least worth a try. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Henrik wrote: Hello Wilfred! Yes, I get the same behavior when running the application from within the IDE. So I traced the code up until the application stops to respond. (And yes, we mean the same thing: the application freezes or hangs so that You can't quit and You can not move or close the window.) The trace disappears in the function WSocket_Synchronized_WSAAsyncSelect in WSocket.pas. You can see the actual line where something happens in the code snippet below: function WSocket_Synchronized_WSAAsyncSelect( s: TSocket; HWindow: HWND; wMsg: u_int; lEvent: Longint): Integer; begin SaveTrace('Start WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect'); if @FWSAAsyncSelect = nil then @FWSAAsyncSelect := WSocketGetProc('WSAAsyncSelect'); SaveTrace('Hang on the line below this row: Result := FWSAAsyncSelect...'); Result := FWSAAsyncSelect(s, HWindow, wMsg, lEvent); // -- Something happens here SaveTrace('Hang on the line obove this row: Result := FWSAAsyncSelect...'); SaveTrace('End WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect'); end; Does this make any sense? Best Regards Henrik Ps. If there by any chance is someone who want a bit more in depth facts, I also attached the following trace logs :-) I added the SaveTrace procedure seen in the snippet above at the first line and the last line of the following functions and procedures: WSocket.pas: function XSocketWindowProc WSocket.pas: procedure TCustomWSocket.WndProc WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone WSocket.pas: procedure TCustomSocksWSocket.Connect; WSocket.pas: procedure TCustomWSocket.Connect WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect So after the ConnectButton in the example is pressed I get the following results on computers where everything works: First time the SmtpTestForm is created and ConnectButton is pressed: Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc Start WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName Start WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone Start SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone Start WSocket.pas: procedure TCustomSocksWSocket.Connect Start WSocket.pas: procedure TCustomWSocket.Connect Start WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect Hang on the line below this row: Result := FWSAAsyncSelect... Hang on the line obove this row: Result := FWSAAsyncSelect... End WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect End WSocket.pas: procedure TCustomWSocket.Connect End SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone End WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone End WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas: function XSocketWindowProc Start WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: procedure TCustomWSocket.WndProc End WSocket.pas: function XSocketWindowProc Start WSocket.pas:
Re: [twsocket] Freeze when using smtp after recreating itsparentform
I still guess that it's caused by any crap process running on this box. It sounds like you have a toilet hooked up to your computer. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If the reader of this message is not the intended recipient, you are hereby notified that your access is unauthorized, and any review, dissemination, distribution or copying of this message including any attachments is strictly prohibited. If you are not the intended recipient, please contact the sender and delete the material from any computer. -- 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] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin)
For your next message, be sure to use a proper subject. Using a proper subject enhance your chances to get an answer. Is it OK now ? Not, it isn't. If you reply to a digest mode, change the subject line from TWSocket Digest... to the original subject of the message you reply to (A digest message is a collection of messages and you really reply to only one at a time). Maybe you should turn digect mode off. This way it is much easier to reply to messages. And you receive the messages much more quickly along the day. Have a look at FtpAsy sample program (In ICS-V5 but also good for V6 provided you change the uses clause). Sorry, but i couldn't find any such sample as in ICS archive, same not at your website (User made section). Can you please give me exact way where to get this sample ? You may also have a look at the MailSndAsync demo of V5, it's SMTP but Same problem as with FtpAsy, i can't find that anywhere. It is simply located in ICS.ZIP ! You probably already have it on your system if you are using ICS-V5. If not, download ICS-V5. -- 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] Service dependency problem re-occurred.
Hello, Our clients using Windows 2003 complain that the lastest beta is causing hangs during boot up and then reboots and goes into a loop. This is a HTTP/FTP server installed as system service and running with administrative rights. It depends only to Tcpip. I noticed that when it is trying to run, it blocks alg.exe to execute and this is a cycle of waiting (cyclic dependency). I wonder which other service should it depend to prevent this situation? Is Samss (Security Accounts Manager System Service) needed/supported by all systems? Best Regards, SZ -- 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] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin)
- Original Message - From: Aleksey Potjomkin [EMAIL PROTECTED] To: twsocket@elists.org Sent: Tuesday, December 12, 2006 10:36 PM Subject: Re: [twsocket] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin) Hello ! just download the ics v5 and then have a look in de ics/internet directory OK, I did. But i'm still can't understand main point of it. How to handle concurrent connections ??? As I understood, main feature of it is event OnRequestDone and there I can make a switch: just create some more ftp's components or maybe as many needed. Have a look at the httpasy project for some nice idea's :-) -- 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] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin)
Aleksey, Create multiple FTP components, assign them the same event handlers. for I := 1 to 10 do begin Ftp := TFtpClient.Create(nil); [..] Ftp.OnRequestDone := FtpRequestDone; List.Add(Ftp); end; Cast the Sender that is available in any event handler like: procedure TForm1.FtpRequestDone(Sender: TObject; RqType: TFtpRequest; ErrCode: Word); begin case RqType of ftpOpenAsync : TFtpClient(Sender).UserAsync; .. end; --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Aleksey Potjomkin wrote: Hello ! just download the ics v5 and then have a look in de ics/internet directory OK, I did. But i'm still can't understand main point of it. How to handle concurrent connections ??? As I understood, main feature of it is event OnRequestDone and there I can make a switch: case RqType of ftpOpenAsync: //.. ftpUserAsync://.. ftpPassAsync: //.. ftpCwdAsync: //.. ftpTypeSetAsync: //.. ftpGetAsync: //.. ftpQuitAsync://.. Something like that. But anyways, it's only about 1 connection at the same time. For example i have on my form TFTPCli component named FTP. So how I can open 2 connections at the same time ??? It will be the same as with synchronous sockets. First i need to work out 1st connection and only then work with other one. For example: FTP-HostName = myhost1.com; FTP-User = user1; FTP-Pass = pass1; FTP-OpenAsync; // now OnRequestDone event: { switch(RqType): case ftpOpenAsync: FTP-UserAsync; case ftpUserAync: FTP-PassAsync; case ftpPassAsync: // ... } So only after this connection with worked out i can take another one, right ? Because if i type: FTP-HostName = myhost1.com; FTP-User = user1; FTP-Pass = pass1; FTP-OpenAsync; FTP-HostName = myhost2.com; FTP-User = user2; FTP-Pass = pass2; FTP-OpenAsync; User pass are changed now (if first one isn't done still), so that will be all wrong. That means I can't work with 2 connections at once. That's why i used threads. So what you can advice me to do with all that ? Or maybe I'm not understanding something ? Aleksey _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -- 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