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 goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


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 direct interaction with a service.
> So communication has to go thru other IPC's like pipes, mailslots. 
> Tcp ...

There is nothing complicated about messages in most services 
applications.  

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.  

I've used Wilfried's class for a recent project upgrade to avoid 
maintaining two separate applications.  I did change it slightly since I 
don't want services running interactively, or at least I now have the 
same application running in the service and visible windows 
communicating with wsocket and socket server.  

And I've also tested it in Vista already.  

The main problem with Vista is going to be that even if you are logged 
on as administrator, applications are generally run without 
administrator rights.  This causes lots of problems, for instance you 
can only install a service as an administrator, access the HLM keys ad 
admin, etc.  

There is a right menu option to run a program as an administrator, but 
then you can not pass command arguments.  You can set the properties on 
a short cut to run as administrator, but you don't want to do that for 
install programs.  So installing services is going to be fun under 
Vista.  You can also supposedly set a manifest to run as admin, but it 
does not seem to work, nor do numerous Control Panel applets which lack 
admin rights, but Vista is still an early beta, many things are still 
broken.

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


Re: [twsocket] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Francois PIETTE a écrit :
>> Yop ! it works ! Thanks a lot François !
> 
> I don't know your application, but maybe the template feature would be 
> interesting for you. It is very powerful. For a demo, see 
> TWebServForm.CreateVirtualDocument_Template.
> 
> The principle is simple: you prvide a HTML template with special tags. Those 
> tags are replaced by values computed by your program. This way you can 
> separate presentation (the HTML) from the code which produce data values. 
> Very powerful and easy to use.

The thing is that i'm not using the webserver as a "HTML provider" but much 
more like a HTTP provider.
I'm sending and getting back XML files using a http server.

i needed a convenient way to do the following :
the client part of my application needs to send xml request. Some requests are 
sent through the internet to a PHP/MySQL http 
server that sends back a xml result.

The thing is that this application might be run also in a "standalone" mode. 
that's why, instead of having several client 
interface, i have added to the client application a small http server that is 
used to handle all the requests...

much easier way to proceed :)

but thanks for the hint !

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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


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 interaction with a service.
So communication has to go thru other IPC's like pipes, mailslots. Tcp ...


Paul


Ps, I'm still having problems with the service ThreadId.
You can find it in ServiceThread.Handle (should have known that),
but just assigning a var MainHandle(THandle) to it  without using it, will 
prohibit the service from starting. 

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


Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Arno Garrels
Paul wrote:
> Hello Wilfried,
> 
> Thanks for your class, but I'm looking for another option.
> Interactive services won't be allowed anymore in Vista.

If so it's my end ;( Where can I find infos, please?
Btw: Wilfried's class isn't an interactive service by default.  

> 
> 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 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 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
>> make your life simple and have a normal GUI or NT service without any
>> chnage (same exe).
>> 
>> Angus has just made improvements to the class. I did not have the time
>> to update on the www, but you can taste it as it is :)
-- 
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


Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Paul
Hello Wilfried,

Thanks for your class, but I'm looking for another option.
Interactive services won't be allowed anymore in Vista.

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 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 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
> make your life simple and have a normal GUI or NT service without any
> chnage (same exe).
> 
> Angus has just made improvements to the class. I did not have the time
> to update on the www, but you can taste it as it is :)

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


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 can get this handle ?

Paul

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


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
make your life simple and have a normal GUI or NT service without any
chnage (same exe).

Angus has just made improvements to the class. I did not have the time
to update on the www, but you can taste it as it is :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, April 11, 2006, 20:21, 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 new Httpserver I'm writing.
> I have made an object of the complete server, so I can compile it as a
> program or as a service application.
> It also has a buch of threads running
> This works fine, but now I want one of the threads inform the service thru
> Postmessage so the thread can proceed without the delays of sync objects.

> Paul 


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


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 new Httpserver I'm writing.
> I have made an object of the complete server, so I can compile it as a
> program or as a service application.
> It also has a buch of threads running
> This works fine, but now I want one of the threads inform the service thru
> Postmessage so the thread can proceed without the delays of sync objects.

Hm, as far as I recall the delphi service framework implements a service as a 
service thread of type TServiceThread.
TServiceThread has it's own message pump (ProcessRequests) that
processes messages from the SCM only. You probably need a base/main
worker thread?


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

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


Re: [twsocket] Postmessage in Service application

2006-04-11 Thread Francois PIETTE
It is better to put a "main thread" in your service application and provide 
a message pump for it. Then is the rest of your application you consider 
this main thread with his hidden window handle as the form in your GUI 
application.

> I have made an object of the complete server, so I can compile
> it as a program or as a service application.

Why not make your object self contained, that is make it as explained above: 
with a thread having a message pump.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://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 
> 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 writing.
> I have made an object of the complete server, so I can compile it as a
> program or as a service application.
> It also has a buch of threads running
> This works fine, but now I want one of the threads inform the service thru
> Postmessage so the thread can proceed without the delays of sync objects.
>
> Paul
>
> -- 
> 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


Re: [twsocket] [HELP] THttpServer

2006-04-11 Thread Francois PIETTE
>>> do i have to do like :
>>> ClientCnx.AnswerStream();
>>> ClientCnx.Docstream:=;
>>> ClientCnx.SendStream;
>>
>> Forget anbout the two last lines !
>> Have a look at THttpConnection.AnswerStream and you'll understand.
>
> Yop ! it works ! Thanks a lot François !

I don't know your application, but maybe the template feature would be 
interesting for you. It is very powerful. For a demo, see 
TWebServForm.CreateVirtualDocument_Template.

The principle is simple: you prvide a HTML template with special tags. Those 
tags are replaced by values computed by your program. This way you can 
separate presentation (the HTML) from the code which produce data values. 
Very powerful and easy to use.

--
[EMAIL PROTECTED]
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


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 writing.
I have made an object of the complete server, so I can compile it as a 
program or as a service application.
It also has a buch of threads running
This works fine, but now I want one of the threads inform the service thru 
Postmessage so the thread can proceed without the delays of sync objects.

Paul 

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


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 application, the service
thread, a worker thread or a window? Or do you want to send a message
to the service from another application?

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
 

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


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.mestdagh.biz

Tuesday, April 11, 2006, 19:43, 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 :-(


> Paul 


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


[twsocket] Postmessage in Service application

2006-04-11 Thread Paul
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 :-(


Paul 

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


Re: [twsocket] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Francois PIETTE a écrit :
>> do i have to do like :
>> ClientCnx.AnswerStream();
>> ClientCnx.Docstream:=;
>> ClientCnx.SendStream;
> 
> Forget anbout the two last lines !
> Have a look at THttpConnection.AnswerStream and you'll understand.

Yop ! it works ! Thanks a lot François !

regards,

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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


Re: [twsocket] [HELP] THttpServer

2006-04-11 Thread Francois PIETTE
> do i have to do like :
> ClientCnx.AnswerStream();
> ClientCnx.Docstream:=;
> ClientCnx.SendStream;

Forget anbout the two last lines !
Have a look at THttpConnection.AnswerStream and you'll understand.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, April 11, 2006 6:21 PM
Subject: [twsocket] [HELP] THttpServer


> Hi guys,
>
> i must be blind at this time but i don't know how to send back the content 
> of a stream.
>
> i explain :
> i receive a http request with posted data. everything runs fine, i can 
> have the posted content and analyze it, process it
> and then at the stage of returning the resulting stream... i don't know 
> how to do it...
>
> do i have to do like :
> ClientCnx.AnswerStream();
> ClientCnx.Docstream:=;
> ClientCnx.SendStream;
>
> 
>
> thanks in advance for your help !
>
> -- 
>
> Guillaume MAISON
> eXpress Network Agen - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : +33 5 53 87 91 48
> Mobile  : +33 6 30 14 91 23
> Fax : +33 5 53 68 73 50
> e-mail  : [EMAIL PROTECTED]
> Web : http://nauteus.com
>
> Mon Profil sur Viaduc: 
> http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
> Vous inscrire sur Viaduc : 
> http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
> -- 
> 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


[twsocket] Mailing list usage

2006-04-11 Thread Francois PIETTE
To all subscribers:

1) Please do not use HTML or RTF messages in the list. Use only plain/text
messages (by default Outlook uses HTML ! You must change the setting).
When replying, be sure to use plain/text. If someone email to list
accidently NOT in plain text and if you reply to it, do take care you
reply in plain text
2) Please do not include VCF to your messages.
3) Stay on topic ! Do not post off-topic messages and do not answer
off-topic messages.
4) Always us a subject and change message subject when required. Do not
change subject when not needed because message thread is lost.
Always mention which component you talk about and OS version.
5) Do not attach files to your messages. If you have something to give, just
tell us in the list. Interested people will contact you to get the file.
6) Post messages using the EMail address you used to subscribe.
No alias allowed. If you use an alias, your message will not appears in
the list.
7) If you change message subject please dont hit 'reply', but compose a
new message. Some mail readers group messages per ID instead
of subject.
8) Do not forget to send your registration postcard :-)
9) Forgive me if I didn't notifyed you for your postcard yet :-(
10) Add yourself to http://www.frappr.com/icsandmidware
11) Don't forget there is an announce mailing list if you find traffic is
  too high on support list.
12) If you have problems with the list, do not complain in the list but
directly to me.
13) Let Wilfried Mestdagh and me moderate the list.
--
[EMAIL PROTECTED]
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


[twsocket] ICS Registration

2006-04-11 Thread Francois PIETTE

As you subscribed to ICS support mailing list, you probably use ICS. 
Good !
But have you taken time to register your ICS copy ?

ICS is freeware but to use it, you must register it.
Registration is very simple: just mail a [real, paper] picture postcard to
the author (me). You can find instructions in readme.txt file.

Thanks.

PS: If you already sent your picture postcard, simply ignore this message.
If you wants to know if I received it, then you must tell me when you sent
it, from which country and what the picture is (I have several thousands
postcards !).

--
[EMAIL PROTECTED]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
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


[twsocket] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Hi guys,

i must be blind at this time but i don't know how to send back the content of a 
stream.

i explain :
i receive a http request with posted data. everything runs fine, i can have the 
posted content and analyze it, process it
and then at the stage of returning the resulting stream... i don't know how to 
do it...

do i have to do like :
ClientCnx.AnswerStream();
ClientCnx.Docstream:=;
ClientCnx.SendStream;



thanks in advance for your help !

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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


[twsocket] BCB Contest

2006-04-11 Thread Francois Piette
Borland and DonationCoder (http://bcbcontest.donationcoder.com) organize a 
programming contest with
C++ Builder. As the programs have to be written with C++ Builder but can use 
other languages as
well, I think it is an opportunity for ICS users to submit an entry. You are 
free to collaborate
with others and enter as a team.

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


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


Re: [twsocket] OT: SMTP tray program

2006-04-11 Thread David Rose
> I forgot this one http://www.xrayapp.com/xray/screenshots/

many thanks, that looks like it'll do the job nicely :)

regards

David


David Rose

Navigator Systems Ltd,
Network Business Centre, 3 Gloucester Street,
Bath, BA1 2SE,UK

Main Tel: +44 (0)7000 NAVSYS (628797)
Fax: +44 (0)7000 NAVFAX (628329)

Company Email: [EMAIL PROTECTED] (Private e-mail on request)

CONFIDENTIALITY NOTICE

The contents of this e-mail are confidential to the ordinary user of
the e-mail address to which it was addressed and may also be
privileged.  If you are not the addressee of this e-mail you may not
copy, forward, disclose or otherwise use it or any part of it in any
form whatsoever.  If you have received this e-mail in error please
e-mail the sender by replying to this message.
-- 
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