Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Arno Garrels
Paul wrote: >> Wilfried Mestdagh wrote: >>> Hello Paul, >>> That's was my first impression also, however RPPollSvc.Handle doesn't exist :-( >>> >>> Correct. TService is derrived from TDataModule and has no windows >>> handle. However you can make one with AllocateHWND. > > > Thanks Wi

Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Angus Robertson - Magenta Systems Ltd
> > That's was my first impression also, however RPPollSvc.Handle > > doesn't exist > > :-( > > Correct. TService is derrived from TDataModule and has no windows > handle. However you can make one with AllocateHWND. I guess message problems may have been why I gave up using the Borland service

Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Paul
> Wilfried Mestdagh wrote: >> Hello Paul, >> >>> That's was my first impression also, however RPPollSvc.Handle doesn't >>> exist :-( >> >> Correct. TService is derrived from TDataModule and has no windows >> handle. However you can make one with AllocateHWND. Thanks Wilfried, got it working wit

Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Arno Garrels
Wilfried Mestdagh wrote: > Hello Paul, > >> That's was my first impression also, however RPPollSvc.Handle doesn't >> exist :-( > > Correct. TService is derrived from TDataModule and has no windows > handle. However you can make one with AllocateHWND. That's probably the best way. If you need t

Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Wilfried Mestdagh
Hello Paul, > That's was my first impression also, however RPPollSvc.Handle doesn't exist > :-( Correct. TService is derrived from TDataModule and has no windows handle. However you can make one with AllocateHWND. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http

Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Paul
Hi Angus, That's was my first impression also, however RPPollSvc.Handle doesn't exist :-( Paul > It should be: > > PostMessage (RPPollSvc.Handle, WM_ERROR, 0, 0); > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocke

Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Angus Robertson - Magenta Systems Ltd
>From a thread within the server object I've tried to post a message >to the service handle/threadID > procedure TRPPollSvc.WMError(var message: TMessage); //message > WM_ERROR; >PostThreadMessage(MainHandle, WM_ERROR, 0, 0); It should be: PostMessage (RPPollSvc.Handle, WM_ERROR, 0, 0); which

Re: [twsocket] Postmessage in Service application

2006-04-12 Thread Paul
> The standard Borland service unit runs a perfectly normal application > message pump, and you can drop event drive components like ICS, timers, > etc, onto the form and they just work, and you can post message to the > form handle. How to post the message to what handle. If you create a new se

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Wilfried Mestdagh
Hello Paul, > Isn't there anyway to get the threadid of the service application ? Service.ServiceThread.ThreadID; --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Angus Robertson - Magenta Systems Ltd
> > If so it's my end ;( Where can I find infos, please? > > Btw: Wilfried's class isn't an interactive service by default. > > I've read it a few times on the borland.delphi newsgroups. > For what I remember, Vista will have a much stronger security and for > that it wont allow any kind of direc

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Paul
Hi Arno, > > If so it's my end ;( Where can I find infos, please? > Btw: Wilfried's class isn't an interactive service by default. I've read it a few times on the borland.delphi newsgroups. For what I remember, Vista will have a much stronger security and for that it wont allow any kind of direct

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Arno Garrels
efault. > > Isn't there anyway to get the threadid of the service application ? > Paul > > > > - Original Message - > From: "Wilfried Mestdagh" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Tuesday, April

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Paul
;[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Tuesday, April 11, 2006 8:50 PM Subject: Re: [twsocket] Postmessage in Service application > Hello Paul, > >> I have made an object of the complete server, so I can compile it as a >> program or as a service applicat

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Paul
> Why not make your object self contained, that is make it as explained > above: > with a thread having a message pump. But the service application already has a message pump, it wouldn't work without it. The Httpserver already works this way without an additional message pump. Is there a way I

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Wilfried Mestdagh
Hello Paul, > I have made an object of the complete server, so I can compile it as a > program or as a service application. Simple, add a hiden window to the object and post messages to that windwos hadnle instead of the form. alternative, you find on my site a simple class to include. then you

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Arno Garrels
Paul wrote: > Normally, when a Http request is done (thru OnRequestdoen) I post a > message to the form to restart a next Http request. > This is normally done as PostMessage(handle, MyMessage, 0, 0) > But where can I find the handle of the service application ? > I have a similar problem with a ne

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Francois PIETTE
/www.overbyte.be - Original Message - From: "Paul" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Tuesday, April 11, 2006 8:21 PM Subject: Re: [twsocket] Postmessage in Service application > Normally, when a Http request is done (thru OnRequestdoen) I post a &

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Paul
Normally, when a Http request is done (thru OnRequestdoen) I post a message to the form to restart a next Http request. This is normally done as PostMessage(handle, MyMessage, 0, 0) But where can I find the handle of the service application ? I have a similar problem with a new Httpserver I'm writ

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Arno Garrels
Paul wrote: > I want to convert a Http client application into a service application. > How do I use PostMessage in a service application. > I've tried with PostMessage /PostThreadMessage with handle= > application.Handle, but is doens't seem to work :-( Who shall receive that message? The service

Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Wilfried Mestdagh
Hello Paul, There is no difference ! PostMessage post a message to a (hidden) window, while PostThreadMessage post a message to a threadID with a messag pump. Can you eventually clarify your question ? --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestd