Hi Arno,

I did use any possible way that occurred to my mind to figure out what the
problem is without any success. And as I said - it's working just fine when
I am testing it from a standart windows application, but when I start the
service it's crashing. What I was getting from the DIR command is that it
couldn't save the file. I also tried generating a random file name for the
directory listing and it didn't help either. Is there another way to capture
the directory listing without saving it to a file? 

> I've downloaded a unit named ftpcommon.pas somewhere that helps parsing a
lot, but I can't find the link at the moment:(

If you can send me a copy ot this unit I would be eternally thankful to you
:) Send it to <my first name>@<my last name>.net   (not .com)

Best Regards,
Nikolay Simeonov


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Arno Garrels
Sent: Tuesday, April 26, 2005 10:14 AM
To: ICS support mailing
Subject: Re: [twsocket] FTP client and windows service problem

Nikolay Simeonov wrote:
> Hello Francois,
> 
> I'm writing a service and when I try to get the directory FTP1.Dir 
> returns false. How can I pinpoint the problem and is there a way to 
> figure out why it's returning false?

There is i.e. property StatusCode and there are events also.
You may assign OnDisplay and write to a log file as well.
Or use async methods and handle your program flow from within the
OnRequestDone-handler.

> 
> I'm using it in non-multithread mode. What's more curious about the 
> code is the fact it works when I use the same unit from a normal 
> windows program. And from the service it's crashing.
> Do you have any ideas what
> could possibly cause the error?

Without some more information, it's hard to say anything. 
 
> Also a side problem I'm having is: do you know of a simple way to 
> parse the results from the DIR command into a simple list of 
> filenames, sizes, attributes (directory or a file) and timestamp? All 
> I'm getting is a text file and currently I hardcoded the parsing, and 
> that isn't listed anywhere as best practice, but all I wanted is to 
> get it working quickly and clean it up later.

I've downloaded a unit named ftpcommon.pas somewhere that helps parsing a
lot, but I can't find the link at the moment:(

Arno Garrels 
 


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

Reply via email to