<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>11 Nov 2015 11:18:00 Z</lastBuildDate><pubDate>11 Nov 2015 10:12:00 Z</pubDate><description>Hi all,&#13;
I'm trying to create a simple background service that just waits for a socket connection from a client, accepts it and creates a thread for listening purposes to that client.&#13;
Using the Debug Mode of windev makes it work like a charm, never skips a beat, but when i try to run the executable, after creating it through the wizard, it automatically goes to the closing event of the service, without even passing once in the "Running the service of NameOfMyService", which is the main event. Below there's the code that i wrote:&#13;
&#13;
//initializing ServiceHelloWorld&#13;
CONSTANT&#13;
SName = "ServerRF"&#13;
Port = 2100&#13;
END&#13;
IF SocketCreate(SName,Port) THEN&#13;
SocketChangeTransmissionMode(SName,SocketNoEndTag)&#13;
ELSE&#13;
EndProgram("Errore di attivazione connessione")&#13;
END&#13;
&#13;
&#13;
//Running the service of ServiceHelloWorld&#13;
IF SocketWaitForConnection(SName) THEN&#13;
channel is string&#13;
channel = SocketAccept(SName)&#13;
IF channel &lt;&gt; "" THEN&#13;
ThreadExecute(channel,threadNormal,WaitMessage,channel)&#13;
ELSE&#13;
Error(ErrorInfo())&#13;
END&#13;
END&#13;
&#13;
Have i done something stupid? If so, sorry, i'm a newbie about services, so any help would be VERY appreciated</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable/read.awp</link><title>[WD20]Background Service Executable</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executablesolved-54908/read.awp</comments><pubDate>11 Nov 2015 11:18:00 Z</pubDate><description>Arie,&#13;
Yeah, you were right, i've stupidly tried to run the exe straight away instead of installing it first...so, after creatin…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executablesolved-54908/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executablesolved-54908/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable/read.awp">[WD20]Background Service Executable</source><title>Re: [WD20]Background Service Executable[SOLVED]</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54907/read.awp</comments><pubDate>11 Nov 2015 11:06:00 Z</pubDate><description>Yaku,&#13;
are you sure it is running in the first place?&#13;
Can you start and stop the service from services.msc&#13;
&#13;
I have a service …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54907/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54907/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable/read.awp">[WD20]Background Service Executable</source><title>Re: [WD20]Background Service Executable</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54906/read.awp</comments><pubDate>11 Nov 2015 10:32:00 Z</pubDate><description>Hi Arie,&#13;
I've tried to add these lines of code that i've taken from the example provided by Windev:&#13;
&#13;
WHEN EXCEPTION&#13;
ServiceW…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54906/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54906/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable/read.awp">[WD20]Background Service Executable</source><title>Re: [WD20]Background Service Executable</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54905/read.awp</comments><pubDate>11 Nov 2015 10:19:00 Z</pubDate><description>Yaku,&#13;
&#13;
I would add an WHEN_EXCEPTION around the code you mentioned.&#13;
And use ServiceWriteEventLog() to see the exception messa…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54905/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable-54905/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54902-wd20-background-service-executable/read.awp">[WD20]Background Service Executable</source><title>Re: [WD20]Background Service Executable</title></item></channel></rss>
