[twsocket] q1) Doing udp communications through firewalls... q2) relaying

2006-12-21 Thread David Lyon
Hi List,
I've been using ICS for a number of years and I've found it to be quite 
good. I like the model and the stability. But I have to questions

Q1) Has anybody on the list experience with going machine->machine over 
the internet directly with UDP? as in STUN (i believe)

Q2) I have a custom Jabber like server which we want to adapt for mass 
notifications to a set of connected clients.

Are there any existing like implentations perhaps open-source?

Regards

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


[twsocket] Fw: TFtpCli

2006-12-21 Thread Arno Garrels

- Original Message - 
From: "Äèìà Èãàåâ" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 21, 2006 4:33 PM
Subject: TFtpCli


> Dear, Arno Garrels.
> I need to install a component TFtpCli to handle with FTP via C++ Builder 6.
> While installing ICSBCB60.bpk package some errors occurs. Here they are:
> [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::~TCustomOutline()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::TCustomOutline(Classes::TComponent *)' referenced 
> from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::SetOutlineStyle(Outline::TOutlineStyle)' referenced 
> from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::SetOutlineOptions(System::Set  0, 2>)' referenced from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::GetPicture(int)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::SetPicture(int, Graphics::TBitmap *)' referenced 
> from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TOutlineNode::GetFullPath()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TOutlineNode::HasChildren()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TOutlineNode::getFirstChild()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TOutlineNode::GetNextChild(int)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::Insert(int, const System::AnsiString)' referenced 
> from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TOutlineNode::GetLastChild()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::Add(int, const System::AnsiString)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::AddChild(int, const System::AnsiString)' referenced 
> from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::Get(int)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::Clear()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TOutlineNode::SetExpandedState(bool)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::SetSelectedItem(int)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::Click()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::GetSelectedItem()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::Expand(int)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::Loaded()' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external 'Outline::TCustomOutline::' referenced 
> from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::DefineProperties(Classes::TFiler *)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::DrawCell(int, int, const Types::TRect&, 
> System::Set)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__tpdsc__ Outline::TCustomOutline' 
> referenced from C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::SetItemHeight(int)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>   [Linker Error] Unresolved external '__fastcall 
> Outline::TCustomOutline::StoreBitmap(int)' referenced from 
> C:\CB6\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
>  

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] q1) Doing udp communications through firewalls... q2) relaying

2006-12-21 Thread Wilfried Mestdagh
Hello David,

Please do not hit reply if you start a new thread, but start a new
message. Your message will not be seen by many people who are not
following this thread!

I have removed the followup, so this reply should appear as a new
thread.

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

Thursday, December 21, 2006, 17:44, David Lyon wrote:

> Hi List,

> I've been using ICS for a number of years and I've found it to be quite
> suitable for my purposes.

> Q1) Has anybody on the list experience with going machine->machine over
> the internet directly with UDP? as in STUN (i believe)?

> Q2) I have a custom Jabber like server which we want to adapt for mass
> noticifications.

> Are there any existing like implentations perhaps open-source?

> Regards

> David Lyon
> PreisShare

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


[twsocket] q1) Doing udp communications through firewalls... q2) relaying

2006-12-21 Thread David Lyon
Hi List,

I've been using ICS for a number of years and I've found it to be quite 
suitable for my purposes.

Q1) Has anybody on the list experience with going machine->machine over 
the internet directly with UDP? as in STUN (i believe)?

Q2) I have a custom Jabber like server which we want to adapt for mass 
noticifications.

Are there any existing like implentations perhaps open-source?

Regards

David Lyon
PreisShare
-- 
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 

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


[twsocket] Need help with THttpCli

2006-12-21 Thread Fastream Technologies
Hello,

We want to reuse THttpCli after a request ends (either aborted or
normal) in a MR HTTP reverse proxy. We also want to reuse non-aborted
sockets so as to keep the socket open in another repository thread.
Here is my logic:

I first override,

void __fastcall httpClient::StateChange(THttpState NewState)
{
if(!httpServerClient || httpServerClient->skipHTTPClientEvents)
int tester = 10;
else
THttpCli::StateChange(NewState);
}
//---
void __fastcall httpClient::SetReady()
{
if(!httpServerClient || httpServerClient->beganDetach ||
httpServerClient->responseEnded)
StateChange(httpReady);
else
THttpCli::SetReady();
}
//---
void __fastcall httpClient::TriggerRequestDone()
{
if(!httpServerClient || httpServerClient->beganDetach ||
httpServerClient->responseEnded)
{
if(FOnRequestDone)
THttpCli::FOnRequestDone(this, FRequestType, 
FRequestDoneError);
}
else
THttpCli::TriggerRequestDone();
}
//---

so that no more messages post after ThreadDetach();.

Then I check for whether THttpCli is aborted. If it is aborted, I
check if it is still connected (HTTPClient->Connected). If so, I
simply delay ThreadDetach until OnSessionClosed. If not I simply
abort(); and then ThreadDetach().

Now the problem is THttpCli is so much unstable in closing, it acts
very unpredictably! When I reattach in another client, I mostly see it
is not really threaddetach'ed! (That is after threaddetach, GetHandle
is called somewhere) or sometimes the delayed threaddetach does not
work.

Francois, we would be happy to pay you the 70Euros/hr for 2 hours if
you could write a stable reuse routine for THttpCli (and we will be
donating the code).

Best Regards,

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