Article View: borland.public.cppbuilder.nativeapi
Article #13494Problem with Stringlist in service application
From: Victor G. Baron
Date: Sat, 11 Oct 2003 03:47
Date: Sat, 11 Oct 2003 03:47
37 lines
1846 bytes
1846 bytes
using bcb5 win xp pro Created a small service application using the Thread example in the bcb help. It runs as expected. In the TThread constructor I have: String input_file = "H:\\BORLAND\\PROJECT\\TEST\\TEXT.TXT"; TStringList * inputfile = new TStringList(); later in the Thread::Execute() function inputfile->LoadFromFile(input_file); service crashes with an Unknown Exception error on this line. the Stringlist inputfile is not NULL. I can't tell what the error is BUT if I remove the line - all is well. In a non service application I had the same code - basically I am reading in a text file to the Stringlist, parsing each line and writing the parsed string to another file. Works fine. Putting this into a service has caused the problem. Can anyone tell me why it's crashing here and maybe a better way to read/parse/write the file(s)? Thanx, Vic Baron -- Vic Baron I haven't lost my mind, it's backed up on disk somewhere!
Technical Details
Message-ID:
<ppueovg2k6grk500sgq49urri491tltrk7@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,4f6a692a96789751,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-10 21:09:05 PST From: Victor G. Baron <vgbaron@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Problem with Stringlist in service application Date: Fri, 10 Oct 2003 20:47:06 -0700 Message-ID: <ppueovg2k6grk500sgq49urri491tltrk7@4ax.com> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 66.120.230.18 X-Trace: newsgroups.borland.com 1065844016 66.120.230.18 (10 Oct 2003 20:46:56 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail