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-26 Thread Arno Garrels
Henrik wrote:
 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... :-)

Viruses, Anti-Virus tools as well as trojans basically use the same
API hooking (intercepting) technics as this Embassy Trust Suite 
(Detours DLL). They may hook for instance LoadLibrary() not correctly
thus causing errors when ICS loads winsock DLLs dynamically. 
If you think that's just a joke I cannot help you, but please stop
claiming that ICS was buggy. 

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




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


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

2007-01-26 Thread Paul Ingelbrant

Can't help myself... just have to comment this... (sorry)

 You can read in earlier mails why I do not want the dll to be loaded at all
 time.
1) You didn't want a dll linked to _your application_ even when you can 
be pretty sure that the DLL itself
is already loaded in memory at all times whether you use it or not

2) You can be sure that outher components load the same DLL at startup 
time and are linked to your application
during the entire execution. Note that this is the standard behaviour of 
all DLL-handling.
If your programs are not sprinkled with LoadLibrary() calls, you now 
have a lot of work in front of you so you can
save memory in your applications...

So... Who do we blame for all the trouble? Yes.. The one whoever came 
with the overambiscious idea to support
dynamic loading of the Winsox-DLL(?) ...  :-D



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

2007-01-25 Thread Arno Garrels
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
 
 
 
 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] Freeze when using smtp after recreating itsparentform

2007-01-25 Thread Dan
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
 
 
 
 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


-- 
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-25 Thread Arno Garrels
Henrik wrote:
 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)

Henrik,

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.
Please search and uninstall this buggy application so we 
know the application name that does not work with ICS
(I'm rather sure it's Embassy Trust Suite).

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




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


Re: [twsocket] 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 Wilfried and Francois!

Wilfried wrote:
 But you can safely use ForceLoadWinsock ! There is 
 absolutely no problem to use it. Only me (we) wanted 
 to dig out where the problem is.
 ForceLoadWinsock did solve the problem as I recall
 some days ago.

Francois wrote: 
 I saw that using WSocketForceLoadWinsock solve the
 problem. Why not using it ? It has no adverse effect
 in your case. It would be annoying only when your 
 application has to run whenever winsock is installed 
 or not. Those days, it is hard to find a system where
 TCP/IP stack is not installed !

To summarize the problem:
When trying to switch from Indy to ICS using a company standard e-mail
unit with a single function: SendEmail(host, address...) that takes care of
creating a status form with the smtp component, our applications were
starting to freeze on some machines at our customers when emails where to be
sent the second time.

We have now discovered that:
Yes, the error do not arise when using WSocketForceLoadWinsock or having the
smtp component on the main form (or creating a dummy smtp component at
runtime and let it exist while the application is running).
So we've found a workaround but feels a bit unsatisfied not finding what
causes the problem. 

As I've mentioned before I'm not very initiated in the fields that ICS is
handling for me and now I feel like a real rookie because I'm not that
initiated in dll-using either... You say that it has no adverse effect using
WSocketForceLoadWinsock in my case: but doesn't the use of
WSocketForceLoadWinsock on applications startup mean that the dll is loaded
the whole time the applications is running?

I don't know if that has some bad effects like bigger memory usage or so but
at least it doesn't feel that satisfying to have the dll loaded all the time
even if the application is not going to use it. 
Also if I have to manually load the dll on application startup the whole
idea to use one simple function to send emails get lost. That was why I used
the some what strange (I admit that) work around to create an application
wide dummy smtp component the first time the function is called. The dummy
makes it possible to call the email function as many times You want when the
application is running and hopefully it is deleted when application is
closed?!

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-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-21 Thread Francois Piette
 We have now discovered that:
 Yes, the error do not arise when using WSocketForceLoadWinsock or having
the
 smtp component on the main form (or creating a dummy smtp component at
 runtime and let it exist while the application is running).

WSocketForceLoadWinsock immediately load the DLL. If you down't want that,
call WSocketForceLoadWinsock the first time you send a mail. Note that
loading winsock has almost no impact on a system with TCP/IP network since
the DLL is already loaded into the system. Loading it for another
application (yours) only map it into the application virtual memory space
without really loading anything. Only the data segment is private to each
application and this doesn't load anything from disk.

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

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


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

2006-12-21 Thread Arno Garrels
 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)

Google for both DDL-names, you will get plenty of hits. 

detoured.dll, I bet that this is the culprit:

http://research.microsoft.com/sn/detours/

Detours is a library for intercepting arbitrary
Win32 binary functions on x86 machines.
Interception code is applied dynamically at
runtime. Detours replaces the first few
instructions of the target function with an
unconditional jump to the user-provided detour
function. Instructions from the target function are
preserved in a trampoline function. The
trampoline function consists of the instructions
removed from the target function and an
unconditional branch to the remainder of the
target function. The detour function can either
replace the target function or extend its semantics
by invoking the target function as a subroutine
through the trampoline.
Detours are inserted at execution time. The
code of the target function is modified in memory,
not on disk, thus facilitating interception of binary
functions at a very fine granularity. For example,
the procedures in a DLL can be detoured in one
execution of an application, while the original
procedures are not detoured in another execution
..

For instance Messenger Plus! uses detoured.dll
If so, remove Messenger Plus! and try again. 
Messenger Plus! is an add-on for MSN Messenger. 
Messenger Plus! installs an OPTIONAL adware called
C2Media which is also known as LOP.com.
%PROGRAM_FILES%\messenger plus! live\detoured.dll

Search your HDD for detoured.dll if Messenger Plus!
is not installed, try to find the application that
use it!!. 

BTW: Interesting sample:
http://www.codeproject.com/internet/DnsHijack.asp 


Also upload your wxvault.dll for a online check to
http://www.virustotal.com/flash/index_en.html
and
http://www.avira.com/en/support/verdachtige_dateien_und_sonstige_uploads.html



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


Henrik wrote:
 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:twsocket-
 [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

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

2006-12-21 Thread Bjørnar Nielsen

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


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

2006-12-21 Thread Arno Garrels
Here some more hits on WXVAULT.DLL and Embassy software.

We found that the crash during the splash screen loading in AC10 on a Dell 
Precision 390 was caused the presence of wxvault.dll. The solution is to remove 
the EMBASSY software that McAfee depends on. I don't think it will disturb your 
AV or firewall, but it seems to disrupt the spamkiller. 

 Well, I solved the problem. I ran the Dependency Walker utility and 
| profiled the WKSDB.EXE application, and it started right up. The DW 
| log indicated that there were failures/conflicts/whatever with a 
| module called WXVAULT.DLL, which is a part of the Embassy Security 
| Center that came installed on my new laptop, courtesy of the good 
| people at Dell. The Embassy software is 139 MB of security overkill 
| that I can't understand, much less use; so I uninstalled it and 
| re-started my computer. And VOILA! The Works database program fired 
| right up! 


Henrik wrote:
 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:twsocket-
 [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-19 Thread Henrik
Hi Wilfried!

I tested the NUMPROC=1 but with no difference I'm afraid...

Well, perhaps we've done what we can for now. As I've said before: Thank You
very much for Your efforts!
I can not spend so many more days on this now (the same for You I would
imagine) so I'm planning to return to Indy as long as I can solve their
issue with Swedish characters in the subject. That is the only problem our
customers did report on Indy so no freezing there regardless of external
differences or whatever...

So if You are out of ideas for now I once again say Thank You of all my
heart and I wish You a Merry Christmas!

Best Regards 
Henrik



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

Hello Henrik,

 It could be an error in the Winsock load/unload of ICS.

Or a windows bug for the dynamically load / unload. Or a winsock bug because
of the dual cpu. Or some combination.

The latter is easy to test. Put in boot.ini:
/NUMPROC=1
or
/ONECPU
and reboot.

---
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-19 Thread Francois Piette
 I tested the NUMPROC=1 but with no difference I'm afraid...

 Well, perhaps we've done what we can for now. As I've said before:
 Thank You very much for Your efforts!
 I can not spend so many more days on this now (the same for
 You I would imagine)

I have not read the whole thread but I saw that using
WSocketForceLoadWinsock solve the problem. Why not using it ? It has no
adverse effect in your case. It would be annoying only when your application
has to run whenever winsock is installed or not. Those days, it is hard to
find a system where TCP/IP stack is not installed !

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

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


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

2006-12-19 Thread Arno Garrels
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/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?

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


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

2006-12-19 Thread Wilfried Mestdagh
Hello Henrik,

 I can not spend so many more days on this now (the same for You I would
 imagine) so I'm planning to return to Indy as long as I can solve their

But you can safely use ForceLoadWinsock ! There is absolutely no problem
to use it. Only me (we) wanted to dig out where the problem is.
ForceLoadWinsock did solve the problem as I recall some days ago.

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

2006-12-19 Thread Bjørnar Nielsen
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


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

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

Honestly, it looks like the sort of TCP/IP issues I
used to experience when using Win95: at times, an
exception during a network transaction would crash
the TCP/IP stack, and it would have to either be
reloaded, or the machine rebooted.  Eventually this
was replaced in the new DUN driver.

I haven't followed too deeply this thread, so perhaps
this has been discussed (I know that Wilfred or Arno
mentioned it before), but my guess is that the
machine is not up-to-date with system patches, or has
a faulty network stack (perhaps a trojan replaced it?).

   -dZ.

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

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


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


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-18 Thread Wilfried Mestdagh
Hello Henrik,

 It could be an error in the Winsock load/unload of ICS.

Or a windows bug for the dynamically load / unload. Or a winsock
bug because of the dual cpu. Or some combination.

The latter is easy to test. Put in boot.ini:
/NUMPROC=1
or
/ONECPU
and reboot.

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

2006-12-18 Thread Arno Garrels
Henrik wrote:

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

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

Have you scanned with a different AV tool yet, i.e. Norton AV trial?
Have you checked for spyware and trojan horses?
http://www.lavasoft.de/products/ad-aware_se_personal.php,
http://www.hijackthis.de/en.

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/ProcessExplorer.mspx

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

 winsock while ICS uses the non blocking calls.
 Is this also true with SyncSmtpCli? 

Yes.

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

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


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

2006-12-16 Thread Wilfried Mestdagh
 procedure SafeIncrementCount: 2 - 3
 procedure SafeDecrementCount: 3 - 2
 destructor TCustomWSocket.Destroy: 2 - 1
 destructor TCustomWSocket.Destroy: 1

 (Creating smtpTestForm from main form, pressing connect, close smtpTestForm,
 release smtpTestForm from main form, CancelForceLoadWinsock in
 mainform.OnCloseQuery)
 constructor TCustomWSocket.Create: 1 - 2
 procedure SafeIncrementCount: 2 - 3
 procedure SafeDecrementCount: 3 - 2
 procedure SafeIncrementCount: 2 - 3
 procedure SafeDecrementCount: 3 - 2
 procedure SafeIncrementCount: 2 - 3
 procedure SafeDecrementCount: 3 - 2
 destructor TCustomWSocket.Destroy: 2 - 1
 destructor TCustomWSocket.Destroy: 1
 procedure WSocketCancelForceLoadWinsock: 1 - 0
 procedure WSocketUnloadWinsock: 0
 Wsocket finalization: 0
 procedure WSocketUnloadWinsock: 0






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

-- 
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-15 Thread Henrik
Hi Frans!

Thank You for the input!

No it doesn't seem to be any default units added. These are the units used
in the example project MailSnd from ICS.

  MailSnd1.pas:
WinTypes, WinProcs, Messages, SysUtils,
Classes, Controls, Forms, StdCtrls,
ExtCtrls, SmtpProt, IniFiles;

I looked in the original ics.zip and I can see no difference. In the main
form we added to create SmtpTestForm the following units are used:

  Unit2.pas:
Windows, Messages, SysUtils, Variants, 
Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

Best Regards
Henrik


 Frans van Daalen:
 Henrik, any default units that gets automatically added
 in your project like  madexcept or fastmm4 ?
-- 
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 Arno Garrels
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


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

2006-12-14 Thread Wilfried Mestdagh
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


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

2006-12-14 Thread Wilfried Mestdagh
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


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

2006-12-14 Thread Arno Garrels
Forgot to mention that the XP box below has a Dual-Core
Intel CPU, that should by very close to Henrik's Dell box.


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


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 Arno Garrels
Wilfried Mestdagh wrote:

 Could it be the loading of Winsock dll ?

That's obviously true, since it's the only effect I can imagine
that the secondary instance could have. Is Winsock still the origin
DLL, or has it been replaced by a Virus ;-) ? 

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


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


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

2006-12-14 Thread Wilfried Mestdagh
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


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


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

2006-12-14 Thread Frans van Daalen



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  

Henrik, any default units that gets automatically added in your project like 
madexcept or fastmm4 ?


-- 
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 Arno Garrels
Wilfried Mestdagh wrote:
 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 know it doesn't make much sense, there shouldn't be a difference,
I'm just speculating (wildly).

 I recall virusses that did some things with the TCP
 stack, but it was more the service and proto files in registry I
 think. 

And this kind of crap is not always cought by AV scanners if it's
categorized as simple spyware. But I also recall a virus that
installed its own (buggy) Winsock DLL.


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

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


Re: [twsocket] 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 itsparentform

2006-12-14 Thread Arno Garrels
Henrik wrote:
 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...

I'm not so sure, as I got it you called WSocketForceLoadWinsock
as well as WSocketCancelForceLoadWinsock from the new main form,
which results in keeping a handle to Winsock DLL even though the
SMTP-Form is destroyed (same effect as having a second SmtpCli-instance
in main form). 

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


 
 // Henrik
 
 
 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED] [mailto:twsocket-
 [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 Arno Garrels
Henrik wrote:
 
 Sorry if I get a bit aggravated. I really appreciate Your effort
 Arno, but 
 external problems is not the way to go this time.

No problem, I just wanted to point onto that possibility.

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

 
 //Henrik
 
 
 
 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED] [mailto:twsocket-
 [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 itsparentform

2006-12-13 Thread Henrik
Hi Arno and thanks for Your effort!

I'm sorry to say that Your answer doesn't promote ICS at all. I don't
possess enough knowledge about winsock and smtp to be absolutely sure but I
am not willing to accept that it isn't possible to use ICS components on
all computers. (You can see the answers on Your questions in Your message
below.)
If I can't be sure it's going to work on the majority of my customers
computers I can not use ICS smtp components.

So, since I really like ICS I go at it once more; These are the known facts:
- Everything works on all tested computers if we let one smtp component
exist at _all_ time when the application is running. (It doesn't have to be
the one used to send the emails. See my work around code). As I said I have
almost no knowledge about smpt communication (that's why I use ICS) but
isn't this a tell tail about the error that obviously can appear in the
component under certain circumstances...?
- The recreate approach (create the component when needed and free when
ready) works on all computers using other smtp components, for instance with
Indy. (Indy has problems with Swedish characters in the subject so I must
switch to use some other smtp component. I already use ICS in another
application so I would very much like to use ICS in all of my application.)
- Arno: Even if we don't understand _why_ it works: Is there any harm using
the strange work around I attached earlier? (Just to bee on the safe side on
computers where the component error may show...)

Sorry to bother You all with these emails.
I really appreciate all the help I get!

Best Regards
Henrik


 

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 12 december 2006 18:40
Till: ICS support mailing
Ämne: 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? 

[Henrik]: It does happen on other computers. I assure You that the one I use
were I get the same freeze as my customer, has no real-time protection
software, internet security suites or malicious software, anything like
that.

I don't know the Norman software, but have you tried to uninstall it? 

[Henrik]: This is not the problem as You can read in my earlier posts. (FYI:
It's a widespread Antivirus software from Norway.)

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. 

[Henrik]: Even though my opinion I wrote early in this mail, that I can't
check this on all my customers computers, I've checked this on my test
computer. Everything seems ok.

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

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

2006-12-13 Thread Arno Garrels
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


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

2006-12-13 Thread Bjørnar Nielsen

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


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 itsparentform

2006-12-12 Thread Frans van Daalen
 
  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] Freeze when using smtp after recreating itsparentform

2006-12-12 Thread Arno Garrels
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

2006-12-12 Thread Clay Shannon
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] Freeze when using smtp after recreating itsparentform

2006-12-11 Thread Frans van Daalen


 I normally just call .free never used .released.

 You have to use Release when called from an event handler which originate
 from the form you are freeing. Release make sure all curent events are
 processed. Free does an immediate free which will crash the application if
 one event handler is still running.

But that was not the case with this code, there was just a showmodal 

-- 
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-11 Thread Frans van Daalen
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.

Sorry, for not expressing myself any better.

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  and 
my second remark was If you replace the .release with .free is the problem 
still there?.

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.

 

-- 
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-11 Thread Arno Garrels
Henrik,

Hmm, your 'workaround' doesn't sound logical, why should a
secondary instance of a _V5_ component have any effects,
strange?
Do you close the SMTP-form while mail is been sent?
Is the SMTP-form yet destroyed when you create another one?
When does it freeze exactely (try the buttons on the left,
Connect etc. instead)?
How is the CPU load when it freezes?
What is different with the two boxes, any Anti Virus software,
any personal firewall etc.?

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



Henrik wrote:
 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:twsocket-
 [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 itsparentform

2006-12-11 Thread Henrik
Hello again Arno!

 Hmm, your 'workaround' doesn't sound logical, why
 should a secondary instance of a _V5_ component
 have any effects, strange?

No I know, it isn't logical but since I want to free my forms it is the only
way I so far have been able to solve it... 

 Do you close the SMTP-form while mail is been sent?

No, I click the button to create and show the SmtpTestForm. In SmtpTestForm
I click the All-in-one button. I wait until the line All-in-One done! is
written in the Info messages memo. Then I close the form with the X in the
upper right corner. Back to the first form I once again press the button to
show SmtpTestForm and when pressing All-in-one (or Connect) button the
program freezes.

 Is the SMTP-form yet destroyed when you create another one?

Well I think so...? I do not get any error messages and I get the same
behavior when using Free instead of Release or if I set Action := caFree in
SmtpTestForm.OnClose.

 When does it freeze exactely (try the buttons on the left,
 Connect etc. instead)?

When I'm trying to connect.

 How is the CPU load when it freezes?

MailSnd constant on 50% and system idle (I don't know the English term)
has 50%

 What is different with the two boxes, any 
 Anti Virus software, any personal firewall etc.?

It is different Anti Virus software (Norman on the one with the problem and
McAfee on the other) otherwise I can not come up with anything that
differs... I also tried the exe on a third computer also with Norman Anti
Virus and everything works there as well so it doesn't seem to have anything
to do with Norman.

Thanks once more
//Henrik


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

[Message from Arno included above...]

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



Henrik wrote:
 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:twsocket- 
 [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

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

2006-12-11 Thread Marcelo Grossi
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 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
 

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