Re: [twsocket] Freeze when using smtp after recreating itsparentform

2007-01-26 Thread Henrik
Hello Dan!

Yes, Wilfried Mestdagh helped me with that. He actually read my mail and
understood why my own strange workaround worked. (Thank You Wilfried!)
Both Wilfried and I are professional developers though, and we do not feel
very comfortable using workarounds in opposite to find the actual error.
After days of investigation, (and tries to make everyone understand that it
was ICS way of coexist with other good applications that was the problem), I
had to look at it with financial eyes and had to let go and choose another
solution.

Thank You for all the help!
Best Regards
Henrik

Ps.
You can read in earlier mails why I do not want the dll to be loaded at all
time.
Since I regrettable no longer use ICS I'm unsubscribing to this email list
for the time being.
 

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Dan
Skickat: den 25 januari 2007 22:44
Till: 'ICS support mailing'
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

I thought it was figured out that dynamically unloading and reloading the
dll was the problem, which other components probably don't do, and I think
you were given a workaround that worked...to load it manually so that the
loaded count always stays above 0 and it remains loaded.

Dan

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Henrik
 Sent: 25 January 2007 16:42
 To: 'ICS support mailing'
 Subject: Re: [twsocket] Freeze when using smtp after recreating
 itsparentform
 
 Hi Arno and others!
 
 Some of the heavy work load I experienced a while ago has decreased a bit
 so
 I thought that I should take the opportunity to thank You ALL that tried
 to
 help me.
 
 At the end the solution for me was to use another smtp component. Sorry
 about that. (As a request by Francois Piette I'm not going to mention it
 by
 name in this news group.)
 Even if it is like You say Arno, that the problem is not originating from
 ICS it is still toghether with the SmtpCli component the problem appears.
 This makes it impossible to use the SmtpCli component knowing that users
 might not be able to use our application under certain _normal_
 circumstances (like in our test case with a new Dell laptop). We can not
 tell our users that they have to uninstall other softwares just to be able
 to send emails from our application.
 Even if it is not a bug in ICS code or design the fact remains: Other smtp
 components out there works just fine under the same circumstances. So that
 was why I was forced to take that path.
 
 But once again: Thank You all for the help! You are doing a wonderful job!
 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 itsparentform

2007-01-26 Thread Henrik
Hi Arno!

As I've said before Arno, You're a funny guy, though I'm sure
unintentionally. Doesn't seem so long ago You kept going on with viruses and
trojans and didn't even seem to read the note I made about that we were able
to duplicate ICS's problems with the environment on a _brand new_
computer... :-)

Never the less I'm glad You've come to Your senses but I had to draw the
line somewhere. Perhaps I can look in to this in the future but as it is now
I've invested far too many days trying to find the solution to the problem. 

// Henrik
Ps. 
By the way Arno, it's not that constructive to blame everyone else before
sitting down and actually think the problem through. I've mentioned this to
You before. I think You could learn a great deal from Wilfried Mestdagh
there. In my experience he is very constructive in his way of encircle the
problem.
In this example: As You know there are many solutions out there in the same
fields as ICS that do not have any problems with certain environments that
evidently causes problem for ICS. Even though sincere I don't think it
promotes ICS that You suggest that ICS-using developers every time there
comes up a new environment causing problem for ICS, and after they on the
customer side have had to trace down what new application or what ever that
that causes problems for ICS this time, is forced to turn to the computer
manufacturer or external application developer and ask them to remake their
part before ICS is going to work... Especially when other competitors has
products that works in the same environment.

Well this was just a personal opinion. Thanks once again for the help.
Since I regrettable no longer use ICS I'm unsubscribing to this email list
for the time being.


-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 25 januari 2007 18:09
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Strange logic Henrik,

Even Microsoft's Works doesn't/didn't work with this buggy, API
hooking Embassy Trust Suite pre-installed on newer DELL systems.
Possibly they already fixed it in some service pack? If not,
someone/we should report the bug to either DELL or Wave Systems.
I was hoping that you helped identifying the Embassy Trust Suite 
clearly as the culprid. 

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

 

Henrik wrote:
 Hi Arno and others!
 
 Some of the heavy work load I experienced a while ago has decreased a
 bit so I thought that I should take the opportunity to thank You ALL
 that tried to help me.
 
 At the end the solution for me was to use another smtp component.
 Sorry about that. (As a request by Francois Piette I'm not going to
 mention it by name in this news group.)
 Even if it is like You say Arno, that the problem is not originating
 from ICS it is still toghether with the SmtpCli component the problem
 appears. This makes it impossible to use the SmtpCli component
 knowing that users might not be able to use our application under
 certain _normal_ circumstances (like in our test case with a new Dell
 laptop). We can not tell our users that they have to uninstall other
 softwares just to be able to send emails from our application.
 Even if it is not a bug in ICS code or design the fact remains: Other
 smtp components out there works just fine under the same
 circumstances. So that was why I was forced to take that path.
 
 But once again: Thank You all for the help! You are doing a wonderful
 job! 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 itsparentform

2007-01-25 Thread Henrik
Hi Arno and others! 

Some of the heavy work load I experienced a while ago has decreased a bit so
I thought that I should take the opportunity to thank You ALL that tried to
help me.

At the end the solution for me was to use another smtp component. Sorry
about that. (As a request by Francois Piette I'm not going to mention it by
name in this news group.) 
Even if it is like You say Arno, that the problem is not originating from
ICS it is still toghether with the SmtpCli component the problem appears.
This makes it impossible to use the SmtpCli component knowing that users
might not be able to use our application under certain _normal_
circumstances (like in our test case with a new Dell laptop). We can not
tell our users that they have to uninstall other softwares just to be able
to send emails from our application.
Even if it is not a bug in ICS code or design the fact remains: Other smtp
components out there works just fine under the same circumstances. So that
was why I was forced to take that path.

But once again: Thank You all for the help! You are doing a wonderful job!
Best Regards
Henrik



Arno Garrels wrote:
 The problem is *not a bug in ICS*. Instead another process
 injects and executes its own, buggy code in the process space
 of the ICS-application. Detoured.dll is used for hooking API
 calls. The hooking application is the culprit! 
 That must not be a virus or trojan but may be any other 
 application/service or security suite as well.
-- 
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] TSmtpCli encoding (was: Freeze when using smtp afterrecreating itsparentform)

2006-12-22 Thread Henrik
Ok, so if I want to be sure that Swedish e-mails looks the same when they
arrive to the recipient regardless of what language is used on the
recipients computer I should encode the text message with QuotedPrintable?

And this is done by setting the following properties?
  SmtpCli1.Allow8bitChars  := false; (if I want the _subject_ encoded)
  SmtpCli1.DefaultEncoding := smtpEncQuotedPrintable; (to get the body
encoded)

// Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 22 december 2006 10:30
Till: ICS support mailing
Ämne: [twsocket] TSmtpCli encoding (was: Freeze when using smtp
afterrecreating itsparentform)

Bjørnar Nielsen wrote:
 I'm not sure, but I think the body of the email is automaticly encoded 
 to quoted printable (the plain text part), I think others in this list 
 knows

In TSmtpCli it depends on properties DefaultEncoding as well as on
Allow8bitChars. 

- Allow8bitChars: Default=TRUE, headers are not encoded.
If FALSE headers and message text are encoded using method spezified in
DefaultEncoding *if necessary.
If DefaultEncoding is smtpEnc7bit or smtpEnc8bit quoted printable is used by
default.

- DefaultEncoding: Default=smtpEnc7bit, if smtpEncBase64 or
smtpEncQuotedPrintable message text is always encoded.

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

2006-12-22 Thread Henrik
Thank You Bjørnar!

God Jul!
// Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Bjørnar Nielsen
Skickat: den 21 december 2006 17:54
Till: 'ICS support mailing'
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform


I'm not sure, but I think the body of the email is automaticly encoded to
quoted printable (the plain text part), I think others in this list knows
better than me, long time ago I coded with the mail-components. If you use
html-mail, then you can encode all chars like this (C++, allthough I have
not tested this encoding on the body of the mail, only the header. Remember
that you need to set the content-type according to the encoding of the body
of the mail):
String Misc::MiscEncodeQuotedPrintable(WideString text) {
   wchar_t tmp;
   for (int i = 1; i = text.Length(); i++)
   {
tmp = text[i];
  if (tmp  126||tmp==95||tmp==61||tmp==63)
  {
 text.Delete(i,1);
 WideString qpID = = + AnsiString::IntToHex(tmp,2).UpperCase() ;
 text.Insert(qpID, i);
 i += qpID.Length() - 1;
  }
   }
   String returnString=text;
   return returnString;
}

It might be that you need to change all spaces to underscore between the
for-loop and returning the text, at least if the text is in the subject you
must do that.

If you use this form in the subject, the use the following form String
Subject = =?iso-8859-1?Q? +
Misc::MiscEncodeQuotedPrintable(OP_UTF8Decode(source)) + ?=;

To change the html-part of the mail, you can use this:
String Misc::WideStringToHTMLEncoding(WideString html) {
   wchar_t tmp;
   for (int i = 1; i = html.Length(); i++)
   {
tmp = html[i];
  if (tmp  126)
  {
 html.Delete(i,1);
 WideString htmlID = # + String(tmp) + ;;
 html.Insert(htmlID, i);
 i += htmlID.Length() - 1;
  }
   }
   String ret = html;
  return ret;
}

This form can hold any possible char in html.

Regards Bjørnar

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Henrik
 Sent: 21. desember 2006 15:55
 To: 'ICS support mailing'
 Subject: Re: [twsocket] Freeze when using smtp after recreating 
 itsparentform
 
 Hi Bjørnar!
 
 I've not been experiencing any problem with character replacement 
 (å-e,
 ä-d and ö-v) with ICS components, only Indy 9 and only when passing
 through ms exchange it seems, but I tried Your suggestion and it works 
 like a charm with Indy 9!
 (Do You mean that You use that approach also with ICS smtp
 components?)
 
 Quoted printable sounds interesting as well because one of our 
 customers report character replacing problems also with the body when 
 sending (Indy) automated emails to a customer of theirs in Norway... 
 Apparently all Swedish characters å, ä and ö are substituted with ?.
 Perhaps it is possible to use Quoted printable on the whole body? If 
 You want you can send me the code to my private address.
 
 I must say I really like the help I've received in this forum and I 
 would really like to be able to switch to ICS. It is sad that we 
 couldn't solve the dll loading error that appears on some machines...
 
 Thank You very much!
 Best Regards
 Henrik
 
 
 
 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] För Bjørnar Nielsen
 Skickat: den 19 december 2006 17:39
 Till: 'ICS support mailing'
 Ämne: Re: [twsocket] Freeze when using smtp after recreating 
 itsparentform
 
 I use the same component and send norwegian, swedish and even chinese 
 chars in the subject (but Outlook can't show chinese in the subject on 
 my computer).
 
 Use Quoted printable or Base64 to encode special chars. 
 Example for Base64 could be like this (C++):
 
 HtmlSmtpCli1-HdrSubject = =?utf-8?B? +
 Base64Encode(UTF8Encode(SubjectInputFromUserEdit-Text)) + ?=;
 
 If you have a GUI-component that can handle WideStrings, then you can 
 have any language in the subject using the above form. First the 
 unicode-string is UTF8-encoded, then it is Base64-encoded and I think 
 this form can hold any possible char.
 
 If you use Quoted printable instead you would save a little space 
 because only the char's above 126 or so is encoded, I have code for 
 this too if you ar interested.
 
 Regards Bjørnar
 
  imagine) so I'm planning to return to Indy as long as I can solve 
  their issue with Swedish characters in the subject.
 
 --
 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
-- 
To unsubscribe or change your

Re: [twsocket] Freeze when using smtp after recreating itsparentform

2006-12-21 Thread Henrik
Hi Bjørnar!

I've not been experiencing any problem with character replacement (å-e,
ä-d and ö-v) with ICS components, only Indy 9 and only when passing
through ms exchange it seems, but I tried Your suggestion and it works like
a charm with Indy 9! 
(Do You mean that You use that approach also with ICS smtp components?)

Quoted printable sounds interesting as well because one of our customers
report character replacing problems also with the body when sending (Indy)
automated emails to a customer of theirs in Norway... Apparently all Swedish
characters å, ä and ö are substituted with ?.
Perhaps it is possible to use Quoted printable on the whole body? If You
want you can send me the code to my private address. 

I must say I really like the help I've received in this forum and I would
really like to be able to switch to ICS. It is sad that we couldn't solve
the dll loading error that appears on some machines...

Thank You very much!
Best Regards
Henrik



-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Bjørnar Nielsen
Skickat: den 19 december 2006 17:39
Till: 'ICS support mailing'
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

I use the same component and send norwegian, swedish and even chinese chars
in the subject (but Outlook can't show chinese in the subject on my
computer).

Use Quoted printable or Base64 to encode special chars. Example for Base64
could be like this (C++):

HtmlSmtpCli1-HdrSubject = =?utf-8?B? +
Base64Encode(UTF8Encode(SubjectInputFromUserEdit-Text)) + ?=;

If you have a GUI-component that can handle WideStrings, then you can have
any language in the subject using the above form. First the unicode-string
is UTF8-encoded, then it is Base64-encoded and I think this form can hold
any possible char.

If you use Quoted printable instead you would save a little space because
only the char's above 126 or so is encoded, I have code for this too if you
ar interested.

Regards Bjørnar

 imagine) so I'm planning to return to Indy as long as I can solve 
 their issue with Swedish characters in the subject.

--
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] Freeze when using smtp after recreating itsparentform

2006-12-21 Thread Henrik
Hi Arno!

ProcessExplorer:
I only find two dll's that I'm not certain what they do: 
  - detoured.dll
  - wxvault.dll (Embassy Trust Suite by Wave Systems. Apparently installed
by default by Dell)

Ethereal:
I only get packages sent the first time. The second time the application
hangs before anything has been sent...

Best Regards
Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 19 december 2006 16:24
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Henrik wrote:
 Arno,
 Can you rule out that an application that has set a global hook is 
 actually working correctly? i.e. RealVNC server injects a wm_hook.dll 
 into each process space, if such interception was buggy one can 
 imagine that it would hurt, ICS may be hit especially since TWSocket 
 is being notified about socket events by window messages. View the 
 DLLs linked to a process with ProcessExplorer:
 http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/Proc
 essExp
 lorer.mspx
 
 I've downloaded the application above but I don't know how too 
 proceed.
 What am I looking for and how do I do to get that information in 
 ProcessExplorer?

At first, my above question has a typo, it should read Can you rule out
that an application that has set a global hook is not working correctly?

Ok, start Wilfried's test app., in ProcessExplorer click on the ICS test
application, the listview at the bottom will either list linked DLLs or
handles, toggle the view to display DLLs. Take a closer look at any DLL
that's not from Microsoft, for instance if Sygate personal firewall was
running you would find a SSSensor.dll from Sygate Technologies, this is an
injected DLL. Try to find it's parent application or service and stop it
unless you think that test program's process space is clean (you need to
restart the test application to make changes visible).

 
 It also may help to see a packet dump logged with Ethereal.
 
It's a packet logger/analizer, it shows you exactly any byte that passes
your nic. I would set a capture filter like port 25 or port 53
to only get traffic on ports 25 and 53 logged. Start the capture and run the
ICS test app. unless the error happens, close the test app., the stop the
capture and save the log as Ethereal/tcpdump(*.cap,*.pcap), file format
libpcap to a file, upload the log somewhere and post the link here.


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

2006-12-19 Thread Henrik
Arno,

See answers below...

// Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 18 december 2006 19:40
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform


 (According to Arno he had tested the example procedure we have been 
 talking about on a computer with Intel Dual Core and XP without any 
 problems since he continued to talk about external issues... :-)
Correct, since we cannot be sure that you tried everything you can to rule
out external issues.

Well I've tried to assure You of this in earlier emails.
Of course it must be some environmental condition that makes ICS hang since
the same application works on some and hangs on some. (If it makes You feel
better You can even call it external differences :-).) But the point is
that as long as ICS makes the application hang on SOME healthy computers,
its impossible to use as a part of our applications. We have too many
customers world wide to take that risk.
I know that it is easier not believing but it _is_ possible to duplicate
this error on proven healthy computers. At our company we have been able to
duplicate the freeze on not one but TWO of our test computers where one of
them are NEW.

 Have you scanned with a different AV tool yet, i.e. Norton AV trial?
 Have you checked for spyware and trojan horses?

Well I hope that Dell, in this case, doesn't sell infected computers but
just to try make a believer out of You I now (once again I might add) tested
both computers for virus with: Norman, McAfee and Trend Micro. And for spy
ware and such with AdAware and SearchDestroy. And as I tend keep telling
You: Nothing is found!

 Can you rule out that an application that has set a global hook is
 actually working correctly? i.e. RealVNC server injects a wm_hook.dll
 into each process space, if such interception was buggy one can imagine
 that it would hurt, ICS may be hit especially since TWSocket is being
 notified about socket events by window messages. View the DLLs linked 
 to a process with ProcessExplorer:
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExp
lorer.mspx

I've downloaded the application above but I don't know how too proceed.
What am I looking for and how do I do to get that information in
ProcessExplorer?

 It also may help to see a packet dump logged with Ethereal.

Se answer above...
-- 
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

2006-12-18 Thread Henrik
Hello Wilfried! 

I've downloaded the Your zip file (if you have more test files further on,
you can send them directly to me if it is easier for you). 
Here are the results from the Swedish jury :-)

Best Regards
Henrik


On a computer where the component error is not showing:
---
(first time. Host=out.pandora.be)
00B14620 DNS Lookup for out.pandora.be
00B14620 Host found, connecting to: 195.130.137.75
00B14620 Opened
00B14620 Connecting
00B14620 Timed out
00B14620 Closed

(second time. Host=out.pandora.be)
00B13970 DNS Lookup for out.pandora.be
00B13970 Host found, connecting to: 195.130.137.75
00B13970 Opened
00B13970 Connecting
00B13970 Timed out
00B13970 Closed

(first time. Host=smtp.bredband.net)
00B14620 DNS Lookup for smtp.bredband.net
00B14620 Host found, connecting to: 195.54.106.231
00B14620 Opened
00B14620 Connecting
00B14620 Connected
00B14620  220 ironport.bredband.com ESMTP
00B14620  QUIT
00B14620  221 ironport.bredband.com
00B14620 Closed

(second time. Host=smtp.bredband.net)
00B14620 DNS Lookup for smtp.bredband.net
00B14620 Host found, connecting to: 195.54.106.231
00B14620 Opened
00B14620 Connecting
00B14620 Connected
00B14620  220 ironport.bredband.com ESMTP
00B14620  QUIT
00B14620  221 ironport.bredband.com
00B14620 Closed

On a computer where the component error shows:
--
(first time. Host=out.pandora.be)
00C8242C DNS Lookup for out.pandora.be
00C8242C Host found, connecting to: 195.130.137.75
00C8242C Opened
00C8242C Connecting
00C8242C Timed out
00C8242C Closed
 Here an error occurs and I get the following standard Windows error
dialog when an application has done something wrong (freely translated):
  SmtpTest.exe has encountered a problem and has to be terminated... 
  Describe the problem to Microsoft
  We have created an error report that You can send to us...

(first time. Host=smtp.bredband.net)
00C8242C DNS Lookup for smtp.bredband.net
00C8242C Host found, connecting to: 195.54.106.231
00C8242C Opened
00C8242C Connecting
00C8242C Connected
00C8242C  220 ironport.bredband.com ESMTP
00C8242C  QUIT
00C8242C  221 ironport.bredband.com
00C8242C Closed

(second time. Host=smtp.bredband.net)
00C83960 DNS Lookup for smtp.bredband.net
 Freeze/Hang but possible to move window




-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 16 december 2006 12:59
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Hello Henrik,

I have no idea anymore. As test I made a little application in Delphi.
Please download it at http://www.mestdagh.biz/test/smtptest.zip and tell me
if you have it (then I can delete it from server).

It does more or less the same as you do with the form, just creates an
object that connect to smtp server, receive banner, send quit and destroy
itself when answer from quit, or timed out. I'm curious if this works on the
offending machines.

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

Friday, December 15, 2006, 14:19, Henrik wrote:

 Hi Wilfried!

 Here are the results when tracing all occurrences of WSocketGCount in 
 the ICS code. I tested the both the original example code and the one 
 that manually loads/unloads winsock, on two different computers.

 Please let me know if I can do some other tracing that could shed 
 light on the problem...

 Best Regards
 Henrik



 ON THE EXAMPLE COMPUTER WHERE THE ERROR SHOWS 
 =

 Original code that hangs
 
 (Creating smtpTestForm from main form, pressing connect, close 
 smtpTestForm, release smtpTestForm from main form) constructor 
 TCustomWSocket.Create: 0 - 1 procedure SafeIncrementCount: 1 - 2 
 procedure SafeDecrementCount: 2 - 1 procedure SafeIncrementCount: 1 
 - 2 procedure SafeDecrementCount: 2 - 1 procedure 
 SafeIncrementCount: 1 - 2 procedure SafeDecrementCount: 2 - 1 
 destructor TCustomWSocket.Destroy: 1 - 0 procedure 
 WSocketUnloadWinsock: 0 destructor TCustomWSocket.Destroy: 0

 (Creating smtpTestForm from main form, pressing connect, hang...) 
 constructor TCustomWSocket.Create: 0 - 1 procedure 
 SafeIncrementCount: 1 - 2 procedure SafeDecrementCount: 2 - 1 
 procedure SafeIncrementCount: 1 - 2 procedure SafeDecrementCount: 2 
 - 1 procedure SafeIncrementCount: 1 - 2 procedure 
 SafeDecrementCount: 2 - 1
 -!- The application hangs -!-


 Manually ForceLoadWinsock and CancelForceLoadWinsock
 
 (ForceLoadWinsock on main form creation, Creating smtpTestForm from 
 main form, pressing connect, close smtpTestForm, release smtpTestForm 
 from main
 form)
 procedure WSocketForceLoadWinsock 0 - 1 constructor 
 TCustomWSocket.Create: 1 - 2 procedure SafeIncrementCount: 2 - 3 
 procedure SafeDecrementCount: 3 - 2 procedure

Re: [twsocket] Freeze when using smtp after recreating itsparentform

2006-12-18 Thread Henrik
Hi again Wilfried and thank You for Your endurance!

I'm sorry to say that using the IP address doesn't do the trick. A
difference is that no log entry is made at all the second time connecting
before the application hangs.

Since I really appreciate Your effort Wilfried I reinstalled the TCP stack
to 'prove' that the error is not at that end. And once again I'm sad to say;
the reinstallation did not get the error go away on none of the both test
computers where I can duplicate my customers reported application hang.
Perhaps it is a good thing since these two are both brand new computers with
the latest updates and so on.

One thing that troubles me is that smtp-components from other vendors works
fine also on the computers where ICS gets into trouble. If I for instance
use the same test with Indy everything works fine! What is ICS doing that
none of the other smtp components or applications are not?
I'm out of ideas since a long time now, but a BIG clue to this problem must
be that it doesn't happen the first time the component is created (= dll
loaded). It is the subsequent times that something can go wrong. This means
that You can start lots of SmtpTest-applications at the same time and
connect them without getting into trouble. It is only when you're trying to
connect multiple times from the same application that You get the hang on
these computers.

HTH
Henrik



-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 18 december 2006 13:46
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Hello Henrik,

So it hangs in the TWSocket.DNSLookup, and OnDNSLookupDone is never fired.
You could try also by filling in the IP address of the smtp server instead
of the host name. Probably it will not hang anymore.

But as DZ mentioned, this is pure winsock call. So it is really winsock that
hangs. Can you try to reinstall the TCP stack on the offending machine ?

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

Monday, December 18, 2006, 11:57, Henrik wrote:

 Hello Wilfried! 

 I've downloaded the Your zip file (if you have more test files further 
 on, you can send them directly to me if it is easier for you).
 Here are the results from the Swedish jury :-)

 Best Regards
 Henrik


 On a computer where the component error is not showing:
 ---
 (first time. Host=out.pandora.be)
 00B14620 DNS Lookup for out.pandora.be 00B14620 Host found, connecting 
 to: 195.130.137.75 00B14620 Opened 00B14620 Connecting 00B14620 Timed 
 out 00B14620 Closed

 (second time. Host=out.pandora.be)
 00B13970 DNS Lookup for out.pandora.be 00B13970 Host found, connecting 
 to: 195.130.137.75 00B13970 Opened 00B13970 Connecting 00B13970 Timed 
 out 00B13970 Closed

 (first time. Host=smtp.bredband.net)
 00B14620 DNS Lookup for smtp.bredband.net 00B14620 Host found, 
 connecting to: 195.54.106.231 00B14620 Opened 00B14620 Connecting 
 00B14620 Connected 00B14620  220 ironport.bredband.com ESMTP
00B14620  QUIT
 00B14620  221 ironport.bredband.com
 00B14620 Closed

 (second time. Host=smtp.bredband.net)
 00B14620 DNS Lookup for smtp.bredband.net 00B14620 Host found, 
 connecting to: 195.54.106.231 00B14620 Opened 00B14620 Connecting 
 00B14620 Connected 00B14620  220 ironport.bredband.com ESMTP
00B14620  QUIT
 00B14620  221 ironport.bredband.com
 00B14620 Closed

 On a computer where the component error shows:
 --
 (first time. Host=out.pandora.be)
 00C8242C DNS Lookup for out.pandora.be 00C8242C Host found, connecting 
 to: 195.130.137.75 00C8242C Opened 00C8242C Connecting 00C8242C Timed 
 out 00C8242C Closed  Here an error occurs and I get the following 
 standard Windows error dialog when an application has done something 
 wrong (freely translated):
   SmtpTest.exe has encountered a problem and has to be terminated... 
   Describe the problem to Microsoft
   We have created an error report that You can send to us...

 (first time. Host=smtp.bredband.net)
 00C8242C DNS Lookup for smtp.bredband.net 00C8242C Host found, 
 connecting to: 195.54.106.231 00C8242C Opened 00C8242C Connecting 
 00C8242C Connected 00C8242C  220 ironport.bredband.com ESMTP
00C8242C  QUIT
 00C8242C  221 ironport.bredband.com
 00C8242C Closed

 (second time. Host=smtp.bredband.net)
 00C83960 DNS Lookup for smtp.bredband.net  Freeze/Hang but 
 possible to move window




 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] För Wilfried Mestdagh
 Skickat: den 16 december 2006 12:59
 Till: ICS support mailing
 Ämne: Re: [twsocket] Freeze when using smtp after recreating 
 itsparentform

 Hello Henrik,

 I have no idea anymore. As test I made a little application in Delphi.
 Please download it at http://www.mestdagh.biz/test/smtptest.zip and 
 tell me if you have

Re: [twsocket] Freeze when using smtp after recreating itsparentform

2006-12-18 Thread Henrik
Hi again Wilfried!

The other computer where the example application hangs also has an Intel
Dual Core CPU and Win XP.
(According to Arno he had tested the example procedure we have been talking
about on a computer with Intel Dual Core and XP without any problems. I
don't know if he really got the description of the example setup though
since he continued to talk about external issues... :-) 

 Indy and many others use blocking calls to
 winsock while ICS uses the non blocking calls.
Is this also true with SyncSmtpCli? (because the same problem occurs using
that)

 I suggest you keep on using the ForceLoadWinsock...
Yes this is a possibility as is putting the smtp component on the main
form... 
Does this have any side effects? (When using this kind of approach the dll
is loaded all the time the application is running?)

Best Regards
Henrik



-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 18 december 2006 15:46
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Hello Henrik,

 use the same test with Indy everything works fine! What is ICS doing 
 that none of the other smtp components or applications are not?

Indy and many others use blocking calls to winsock while ICS uses the non
blocking calls.

I suggest you keep on using the ForceLoadWinsock to keep your application
running. For the moment I have absolutely no idea what we can do to fix it
otherwise.

Oh yes 1 question: You mentioned dual CPU on 1 of the offending machines.
What about the other ones ?

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

2006-12-18 Thread Henrik
Hi Francois!

Yes, perhaps You're right - It could be an error in the Winsock load/unload
of ICS. 

Best Regards
Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Francois Piette
Skickat: den 18 december 2006 16:58
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

 One thing that troubles me is that smtp-components from other vendors
works
 fine also on the computers where ICS gets into trouble.
 What is ICS doing that none of the other smtp components or 
 applications
are not?

Dynamically load/unload WinSock when needed ?

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] Freeze when using smtp after recreating itsparentform

2006-12-14 Thread Henrik
Hi Bjørnar!

Thanks for Your input!
As long as the OnRequestDone only is called with RqType = smtpQuit when the
component is finished working, it should not be any problem releasing the
parent form after that has happened?!

Best Regards
Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Bjørnar Nielsen
Skickat: den 13 december 2006 21:43
Till: 'ICS support mailing'
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform


I have not paid very much attention to this duscussion, but I want to say
something about using ICS on many diffent computers and different platforms.
My company have made software based on ICS that run on W95, W98, NT, W2000,
WXP and Vista. The components used is HttpCli, SMTPCli, HtmlSMTPCli,
POP3Cli, HttpServer, SocketServer and WSocket (including the SSL-versions of
the components). I have no problems on any platforms. The only time I have
had problems, have been other components that needs for example Mime32.dll
or other dll's that come from installing programs that is not standard in
the platform. Or maybe to old winsock.

Some times I have had trouble when freeing a component from inside an
eventhandler for the component, or freeing a form that contains a component
that is still working, but that is bad programming, even if it made problems
only on some of the platforms.

Regards Bjørnar

  am not willing to accept that it isn't possible to use ICS
 components
  on all computers.
 
 I won't accept that too, but nobody from this list has confirmed the 
 problem and nobody seems to know how to solve it. So it would help a 
 lot if you could find the error condition.
 

-- 
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] Freeze when using smtp after recreating itsparentform

2006-12-14 Thread Henrik
Arno and others,

More facts and thoughts that perhaps can shed some light on
the error or point someone with more knowledge on ICS than
me in the right direction:
* You don't have to actually _send_ an email to get
  the error. It also happens if You just connect.
  To try this: 
- create form
- press connect
- close and free form (not application)
- create form again
- press connect and the program hangs
* My workaround so far is to create another smtp component
  that exists all the time the application is running. I
  now discovered that this is also true with the Wsocket
  component. For instance put it on  the main form and
  everything works on all computers.
* Could it have something to do with disconnecting the 
  connection? If we put a none used smtp component or
  none used wsocket component on the main form it 
  automatically takes care of something that else get
  lost when the smtp component is freed on these computers?
  (And when the smtpform is created the second time its
  already there.)
* I've now tried the earlier described demo program on 7 
  different computers. The error is shown on two of them.
  Both new Dell Precision with Win XP Intel Core Duo 
  processor.
* That everything works the first time indicates an internal
  component problem rather than external (firewalls, anti
  virus applications and so on)  

 
Thanks again guys!
Best Regards
Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 13 december 2006 17:52
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Henrik,

 am not willing to accept that it isn't possible to use ICS components 
 on all computers.

I won't accept that too, but nobody from this list has confirmed the problem
and nobody seems to know how to solve it. So it would help a lot if you
could find the error condition. 

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

2006-12-14 Thread Henrik
Hi again Wilfried!

Nice to hear from You!
I've now tried to have 'stop on exceptions' both enabled and disabled in the
IDE but with the same result: the trace disappears at the earlier
described line.

I'm thankful for all the help I can get so if it is possible for You to
investigate this I'm very grateful!
I sending the files to Your private mail.

If some one else want to test this please feel free to email me for the
files or do the following procedure:
* Open Your favorite demo of  MailSnd, MimeTst or 
  MailHtml. (I proceed with MailSnd-demo below.)
* Add a new form with a button to the project.
  Write the following in the buttons OnClick method:
  procedure TForm2.Button1Click(Sender: TObject);
  begin
SmtpTestForm := TSmtpTestForm.Create(Application);
try
  SmtpTestForm.ShowModal;
finally
  SmtpTestForm.Release;
end;
  end;
* Click on the Delphi menu: “Project”-“Options”, and
  remove the SmtpTestFrom from the “Auto-createForms”
  list.
* Run the application and click Button1. 
  SmtpTestForm opens and You can send one or many emails.
* Close SmtpTestForm and press Button1 again.
  SmtpTestForm opens but You can't connect...

// Henrik


-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 14 december 2006 11:01
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Hello Henrik,

this is frustrating :(
When the trace dissapears it could also be an AV (unles you have 'stop
on exceptions' enabled in the IDE).

Can you send me the offending project in private mail, including source
and the compiled exe file ? I can do a test on several computers if you
want. Please include in your mail the steps nececary to reproduce the
problem.

Alternative as second step I could make a mini project (with TWSocket
just connecting to someone or something) that you can test, but let's
try first step 1.

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

2006-12-14 Thread Henrik
Hi Wilfried and thanks for a fast reply!

I'm sending You the new demo.
At my end it does not make any change removing the application wide
exception handler. This is just in the ICS demo not in any of my normal
applications.

I also want to point out that:
- It's the standard ICS MailSnd demo we are using. You can use Your own copy
if You want.
- I have tested and it doesn't matter if I _compile_ the demo app on a
computer were the error shows or not. It shows up on one of my test
computers were I can duplicate my customers error report, anyhow.

// Henrik


-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 14 december 2006 14:56
Till: ICS support mailing
Ämne: *SPAM* Re: [twsocket] Freeze when using smtp after recreating
itsparentform

Hello Arno,

Just received the compiled demo from Henrik. Tested on same boxes as you
did, nothing reproducable :( Tryed with the compiled exe from Henrik as with
recompiling from in IDE.

Something not good: In FormCreate of the ICS form there is an appllication
wide exception handler assigned which is in the form. After destroying the
form it is of course still assigned. Henrik can you please do that line in
comment and try again ?

Possible it does no harm as it uses no private data and only shows a message
box, but jsut to be sure !

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

Thursday, December 14, 2006, 14:39, Arno Garrels wrote:

 Wilfried Mestdagh wrote:
 Hello Henrik,
 
 this is frustrating :(

 Welcome to the club.

 I can do a test on several
 computers if you want. Please include in your mail the steps nececary 
 to reproduce the problem.

 I wanted to help as well, but on 3 boxes here NT4 SP6a, W2K SP4, XP 
 SP2 (auto-updated) Henrik's simple test case did not show the error, 
 that's why I asked him to find the error condition rather than 
 providing a strange workaround. Once we/I can reproduce the error a 
 fix will probably be found very quickly, given that there is a bug at all.
 Otherwise you can only speculate :(

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

2006-12-14 Thread Henrik
Hi!

YES! Now we are getting somewhere.
When I manually load/unload winsock as Wilfried suggested, the error does
not show. So it has something to do with the loading of the dll.

I'm sending You the files Wilfried :-)

// Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 14 december 2006 15:00
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Hello Henrik,

 * My workaround so far is to create another smtp component
   that exists all the time the application is running. I
   now discovered that this is also true with the Wsocket
   component. For instance put it on  the main form and
   everything works on all computers.

Could it be the loading of Winsock dll ?

Can you try to remove the component, and put in FormCreate:
WSocketForceLoadWinsock;
and in FormCloseQuery (both main form)
WSocketCancelForceLoadWinsock;

but first try to comment the application wide exception handler !

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

2006-12-14 Thread Henrik
Hi Wilfried!

I think Arno's virus response was meant to be a joke...? Anyhow it is not
the answer this time.

So how to proceed? Can we come up with some other test scenarios?
The answer must have something to do with _how_ ICS load the dll... or any
other ideas?

// Henrik


-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 14 december 2006 16:10
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Ok, so it is working, but still remains the question wy the dynamically
loading of winsock should not work as it should on some machines ?

Arno, you mention a virus, but should it then work with the ForceLoadWinsock
? I recall virusses that did some things with the TCP stack, but it was more
the service and proto files in registry I think.

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

Thursday, December 14, 2006, 15:49, Henrik wrote:

 Hi!

 YES! Now we are getting somewhere.
 When I manually load/unload winsock as Wilfried suggested, the error 
 does not show. So it has something to do with the loading of the dll.

 I'm sending You the files Wilfried :-)

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

2006-12-14 Thread Henrik
Well ok, strange sense of humor anyway since its pretty obvious that the
virus solution is not the rescue this time. I don't blame him though. I
myself speculate wildly and tend to grasp the all mighty virus solution
when it is something that I can't explain or duplicate at my end when my
customers have problems.

Since I'm the only one of us that so far has found a computer where I can
duplicate this behavior, You have to trust me  when I say it not a virus
causing this! Except that we've been working as a computer consultant since
1988 and experienced all kinds of viruses first hand at our customers
(meaning we _know_ how to protect from, and detect, malignant software), it
is too many facts already mentioned to really believe that it could be
anything like that.
For instance:
- Why would a virus be designed to bee in the way for just ICS and not Indy
- Why would a virus care if You use standard ICS demo application or if you
launch the same application from a main form.
- Why would a virus let You send as many emails You want the first time you
start an application and use the create/free -approach and mess with You the
second time.
- Why would a virus stop messing with You if it detects that there are two
smtp components or that the winsock dll is loaded manually :-)

Well You get the grip... 

Sorry if I get a bit aggravated. I really appreciate Your effort Arno, but
external problems is not the way to go this time.

//Henrik



-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Wilfried Mestdagh
Skickat: den 14 december 2006 16:31
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Hello Henrik,

What you could do is set in IDE some breakpoints at the places the dll is
loaded / unloaded. To see if this mechanism is working fine on the offending
machines. It is a counter that increment / decrement to decide if winsock
should be load or unload.

That's the best idea I have so far.

No Arno was not joking, it has flashed to my head also for a moment when
reading this thread. However if it is so then I dont quite understeand wy
the manually load / unload of winsock dll works in every case.

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

2006-12-12 Thread Henrik
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 itsparentform

2006-12-12 Thread Henrik
 
  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] Freeze when using smtp after recreating its parentform

2006-12-12 Thread Henrik
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

Re: [twsocket] TWSocket Digest, Vol 199, Issue 2 (Aleksey Potjomkin)

2006-12-12 Thread Henrik

  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


[twsocket] Freeze when using smtp after recreating its parent form

2006-12-11 Thread Henrik
Hi!
 
I have probably misunderstood something because I get the same behavior
described below no matter which of the components SmtpCli, SyncSmtpCli and
HtmlSmtpCli I use.
 
The problem has to do with freeing the smtp-components parent form. You can
easily duplicate the behavior with one of the standard demo applications:
* Open Your favorite demo of  MailSnd, MimeTst or MailHtml. (I proceed with
MailSnd-demo below.)
* Add a new form with a button to the project. Write the following in the
buttons OnClick method:
  procedure TForm2.Button1Click(Sender: TObject);
  begin
  SmtpTestForm := TSmtpTestForm.Create(Application);
  try
  SmtpTestForm.ShowModal;
  finally
  SmtpTestForm.Release;
  end;
  end;
* Click on the menu: Project - Options, and remove the SmtpTestFrom from
the Auto-createForms list.
* Run the application and click the button. SmtpTestForm opens and You can
send lots of e-mails.
* Close SmtpTestForm and press the button again. Try to send yet another
email and You get stuck!
 
I guess I'm doing something fundamentally wrong?! I have narrowed it down to
that everything works as expected if I don't release the form. 
(I get the same error when setting Action to caFree in
SmtpTestFrom.OnClose.)
 
Is it not a good idea to free a manually created form?
 
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 parentform

2006-12-11 Thread Henrik
Hi Frans! 

Yes, each time You press the button the form is created and then released.
You also get the same problem if You set Action to caFree in the OnClose of
the created form.

  procedure TForm2.Button1Click(Sender: TObject);
  begin
SmtpTestForm := TSmtpTestForm.Create(Application);
SmtpTestForm.ShowModal;
  end;

  procedure TSmtpTestForm.FormClose(Sender: TObject; var Action:
TCloseAction);
  begin
Action := caFree;
  end;

Also read my response to Arno.
I'm very thankful for all the help I can get!
// Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Frans van Daalen
Skickat: den 11 december 2006 10:39
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating its parentform


- Original Message -
From: Henrik [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Monday, December 11, 2006 9:59 AM
Subject: [twsocket] Freeze when using smtp after recreating its parent form


 Hi!

 I have probably misunderstood something because I get the same behavior
 described below no matter which of the components SmtpCli, SyncSmtpCli and
 HtmlSmtpCli I use.

 The problem has to do with freeing the smtp-components parent form. You 
 can
 easily duplicate the behavior with one of the standard demo applications:
 * Open Your favorite demo of  MailSnd, MimeTst or MailHtml. (I proceed 
 with
 MailSnd-demo below.)
 * Add a new form with a button to the project. Write the following in the
 buttons OnClick method:
  procedure TForm2.Button1Click(Sender: TObject);
  begin
  SmtpTestForm := TSmtpTestForm.Create(Application);
  try
  SmtpTestForm.ShowModal;
  finally
  SmtpTestForm.Release;
  end;
  end;

 When entering the second time is the form already released then?

I normally just call .free never used .released. I also make the 
SmtpTestForm a procedure based variable in these kind of constructions. 

-- 
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] Freeze when using smtp after recreating its parentform

2006-12-11 Thread Henrik
Hi Arno and thank You for the reply!

I use V2.32 of SmtpProt.pas (the one You get when clicking Download the
latest ICS-V5 Distribution on overbyte.be) and Delphi7.

Trying to solve this mystery I have now discovered two things:
* Since You did not experience any problem I decided to test the example
application on another computer by copying the exe-file. Here the second
time I show the SmtpTestForm and presses the All-in-one button everything
works ok and the mail is being sent as expected!!!
Do You have any ideas on what can be the difference between these computers
that leads to the freeze problem on just one of them? (both has Win XP SP2
and the latest Windows update patches)

* I don't know if this gives any clues but a workaround on the computer
where the problems appear is to either not destroy the form OR create a
dummy smtpCli component like in the code below!

procedure TForm2.Button1Click(Sender: TObject);
var dummySmtpCli : TSmtpCli;
alreadyCreated: Boolean;
i: integer;
begin
  SmtpTestForm := TSmtpTestForm.Create(Application);

// Workaround that prevents freezing on some computers
  alreadyCreated := false;
  if Application.ComponentCount  0 then
  begin
for i := 0 to Application.ComponentCount-1 do
begin
  if Application.Components[i].Name = 'DummySmtpClient' then
  begin
alreadyCreated := true;
BREAK;
  end;
end;
  end;
  if not(alreadyCreated) then
  begin
dummySmtpCli := TSmtpCli.Create(Application);
dummySmtpCli.Name := 'DummySmtpClient';
  end;

  try
SmtpTestForm.ShowModal;
  finally
SmtpTestForm.Release;
  end;
end;


Any further thoughts on the matter is greatly appreciated!
// Henrik

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 11 december 2006 10:32
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating its parentform

Hello Henrik,

Just tested  with latest V5 beta, but works great?

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


Henrik wrote:
 Hi!
 
 I have probably misunderstood something because I get the same 
 behavior described below no matter which of the components SmtpCli, 
 SyncSmtpCli and HtmlSmtpCli I use.
 
 The problem has to do with freeing the smtp-components parent form.
 You can easily duplicate the behavior with one of the standard demo
 applications: * Open Your favorite demo of  MailSnd, MimeTst or 
 MailHtml. (I proceed with MailSnd-demo below.)
 * Add a new form with a button to the project. Write the following in 
 the buttons OnClick method:
   procedure TForm2.Button1Click(Sender: TObject);
   begin
   SmtpTestForm := TSmtpTestForm.Create(Application);
   try
   SmtpTestForm.ShowModal;
   finally
   SmtpTestForm.Release;
   end;
   end;
 * Click on the menu: Project - Options, and remove the 
 SmtpTestFrom from the Auto-createForms list.
 * Run the application and click the button. SmtpTestForm opens and You 
 can send lots of e-mails.
 * Close SmtpTestForm and press the button again. Try to send yet 
 another email and You get stuck!
 
 I guess I'm doing something fundamentally wrong?! I have narrowed it 
 down to that everything works as expected if I don't release the form.
 (I get the same error when setting Action to caFree in
 SmtpTestFrom.OnClose.)
 
 Is it not a good idea to free a manually created form?
 
 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
-- 
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

2006-12-11 Thread Henrik
Hi again Frans! 

 Sorry, for not expressing myself any better.

No need for excuse, it was probably I who misunderstood You...

 My question was If you run the debug and while
 entring the buttonclick is the .release finished
 so did you find the form to be free-ed already  

Yes, I think so. (The freezing occurs when trying to connect the second time
the SmtpTestForm is created)

 and my second remark was If you replace the .release 
 with .free is the problem still there?.

Yes, it's still there (and also if using Action := caFree in OnClose)

 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 but I think I'm doing the same; I
have a separate email unit in my code library with a single Execute function
that takes the necessary e-mail settings as parameters (host, emailaddress
and so on), shows a status form and returns true or false depending on
if the email was sent or not. This function takes care of everything for me
so I can use it to send email from any application just using the Execute
function. 

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