[twsocket] TSmtpCli in library: how to process events?

2012-10-10 Thread Ronald Wilmink

I have used the TSmtpCli component in applications without any problems.
But now, I need to use it in a service that calls a function in a dll 
that has no Form, just units.

That function needs to send emails.
Since the component works with events that are not available in the dll, 
mailing does not work.

Any ideas how to solve this anyone?
Thanks Ronald.

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


[twsocket] TiggerSessionClosed...

2012-10-10 Thread zayin
Hello,

I have upgraded from D2007 to XE and I am now using version 7.04 of ICS.

When I close the socket I am getting a memory leak at line 686 in
TWSocketClient. TiggerSessionClosed.

the line is New(PIdRec);

I do see that if the PostMessage call fails, PIdRec is released on line 696.

If the PostMessage succeeds, PIdRec is not released.

I have no idea why the PostMessage would fail.

Am I wrong in thinking PIdRec should be released regardless of PostMessage
success/fail?

Ideas?

Thanks,

Mark



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


Re: [twsocket] TiggerSessionClosed...

2012-10-10 Thread Arno Garrels
zayin wrote:
 Hello,
 
 I have upgraded from D2007 to XE and I am now using version 7.04 of
 ICS. 
 
 When I close the socket I am getting a memory leak at line 686 in
 TWSocketClient. TiggerSessionClosed.
 
 the line is New(PIdRec);
 
 I do see that if the PostMessage call fails, PIdRec is released on
 line 696. 
 
 If the PostMessage succeeds, PIdRec is not released.
 
 I have no idea why the PostMessage would fail.

If it failed there won't be a leak, the allocated memory will be freed
when that message is handled. 
The leak happens when the call to PostMessage() succeeds however 
the TWSocketServer component will be destroyed before that message
has been processed. If that happens on application exit nothing to 
worry about. Otherwise make sure you close all clients before 
destroying the server component.

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


Re: [twsocket] TSmtpCli in library: how to process events?

2012-10-10 Thread Arno Garrels
Ronald Wilmink wrote:
 I have used the TSmtpCli component in applications without any
 problems. But now, I need to use it in a service that calls a
 function in a dll that has no Form, just units.
 That function needs to send emails.
 Since the component works with events that are not available in the
 dll, mailing does not work.

Using ICS in a DLL is similar to using it in a console application.
Take a look at the OverbyteIcsConSmtp demo for an SMTP example or
at the OverbyteIcsDll samples.

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