> You need to define in BOTH the package and the app. The package is only needed when it is used as a runtime package.
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 ----- Original Message ----- From: "Fastream Technologies" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Thursday, September 20, 2007 1:39 PM Subject: Re: [twsocket] FTP Server demo fails Hello, You need to define in BOTH the package and the app. You need to call GetMessage when NOFORMS is defined. Regards, SZ ----- Original Message ----- From: "David Perkins" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Thursday, September 20, 2007 2:30 PM Subject: Re: [twsocket] FTP Server demo fails > > OK, I will compile ICS with NOFORMS defined, I presume that's where it > > goes rather that being defined in my app. > > In Delphi it's defined in the project options, I'm not very familar with > BCB, sorry. But am I corret in thinking it is only defined when I recompile the ICS components and not in my app itself? > Correct, that won't work of course. In your ThreadProc create the > component > and call GetMessage(), TranslateMessage() and DispatchMessage in a loop. > Anything else can either be done from the ICS events, or from handlers of > custom messages posted to Thread, i.e. to stop or start the server etc. I still have to call GetMessage(), TranslateMessage() and DispatchMessage even with NOFORMS defined? Thanks for your help. > > -- > Arno Garrels [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > > > > > I use my own thread class, rather than the VCL Thread class and when > > executing I just sit inside a while/WaitForMultipleObjects loop until > > the terminate event is received. If I create an FTP Server in this > > thread, what would I have to call to get the FTP Server to process any > > requests? > > > > Many thanks. > > > > > > On 20/09/2007, Arno Garrels <[EMAIL PROTECTED]> wrote: > >> David Perkins wrote: > >> > >>> 1. I plan on using the FTP server in a Service app with no main > >>> form. Does the FTP Server rely on Windows messages at all for it's > >>> processing? > >> > >> Yes, like any other ICS component as well. Note that the ICS > >> components create one or more hidden windows in order to receive > >> event messages from winsock. ICS events will always trigger in the > >> context of the thread where the components have been created. If you > >> create the component in TThread.OnStart or TThread.OnExecute the > >> events will fire in the context of the service thread which was > >> fine. Define NOFORMS in the project options in order to get these > >> windows created in a thread-safe manner. Usually running ICS in a > >> worker thread requires a working message pump, that's not necessary > >> in the service thread of TThread since there is one already pumping > >> messages (ProcessRequests). > >> > >>> > >>> 2. Are the events; OnValidxxxx called from the context of the main > >>> process or a background thread? > >> > >> By default ICS doesn't create threads, see above. > >> > >> -- > >> Arno Garrels [TeamICS] > >> http://www.overbyte.be/eng/overbyte/teamics.html > >> > >>> > >>> Many thanks. > >>> > >>> David > >>> > >>> > >>> > >>> On 19/09/2007, Arno Garrels <[EMAIL PROTECTED]> wrote: > >>>> Francois PIETTE wrote: > >>>>>> Any ideas what's causing this? > >>>>> > >>>>> No idea. > >>>> > >>>> I'm also not able to reproduce this in V6 D2007, strange. > >>>> > >>>> -- > >>>> Arno Garrels [TeamICS] > >>>> http://www.overbyte.be/eng/overbyte/teamics.html > >>>> > >>>>> > >>>>>> I'm unable to trace into the Pascal source for some reason. > >>>>> > >>>>> Add the component source code to your application project. You'll > >>>>> be able to > >>>>> débug. > >>>>> > >>>>> -- > >>>>> [EMAIL PROTECTED] > >>>>> The author of the freeware multi-tier middleware MidWare > >>>>> The author of the freeware Internet Component Suite (ICS) > >>>>> http://www.overbyte.be > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: "David Perkins" <[EMAIL PROTECTED]> > >>>>> To: <twsocket@elists.org> > >>>>> Sent: Wednesday, September 19, 2007 4:24 PM > >>>>> Subject: [twsocket] FTP Server demo fails > >>>>> > >>>>> > >>>>>> Hello > >>>>>> > >>>>>> I'm using the latest ICS and BCB2006 to test the ftp server demo. > >>>>>> When attempting to connect to the server from another PC using > >>>>>> filezilla it throws an exception in the OnAuthenticate event. > >>>>>> I've narrowed it down and here is what makes it go pop: > >>>>>> > >>>>>> void __fastcall TFtpServerForm::FtpServer1Authenticate(TObject > >>>>>> *Sender, TFtpCtrlSocket *Client, TFtpString &UserName, > >>>>>> TFtpString &Password, bool &Authenticated) > >>>>>> { > >>>>>> String s = UserName; <--------- Bang! > >>>>>> > >>>>>> > >>>>>> I'm unable to trace into the Pascal source for some reason. > >>>>>> > >>>>>> I'm connecting using passive mode. FTP component property values > >>>>>> are: > >>>>>> > >>>>>> object FtpServer1: TFtpServer > >>>>>> Addr = '0.0.0.0' > >>>>>> Port = '10021' > >>>>>> Banner = '220 ICS FTP Server ready' > >>>>>> UserData = 0 > >>>>>> MaxClients = 50 > >>>>>> PasvIpAddr = '192.168.1.10' > >>>>>> PasvPortRangeStart = 10050 > >>>>>> PasvPortRangeSize = 50 > >>>>>> Options = [] > >>>>>> > >>>>>> > >>>>>> Any ideas what's causing this? > >>>>>> > >>>>>> Thanks > >>>>>> > >>>>>> David > >>>>>> -- > >>>>>> 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 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 settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be