Hi Everyone
For a while I have wondered if I could create a xh windows service. I'm not
a very good programmer, let alone a C programmer
I did a little bit of googling and found this page
http://www.devx.com/cplus/Article/9857/1954?pf=true
It explains in very simple terms how to create a windows service in good old
C. It was simple enough that I could follow it
I then cranked up VS C# and made it create me a service so I could see the
class, it's methods etc.
I guess anyone who has written API wrapper (XA team plus others) will know
if I'm wasting my time pretty much straight away
I created the class below as I was reading various things. I would like to
have a crack at a bit of C and am wondering weather I'm wasting my time, ie
it's a much bigger fish than I realise.
Maybe someone with some C experience would/could help me along the way. My
only intention is to learn a bit of C etc, document the object and then
donate the code to the Xailer developers so it can hopefully be used by all
Xailer programmers.
Regards Nick
CLASS TWindowsService FROM TCompondent
PUBLISHED:
EVENT OnStart(oSender)
EVENT OnStop(oSender)
EVENT OnPause(oSender)
EVENT OnContinue(oSender)
PROTECTED:
PROPERTY cServiceName INIT ''
PROPERTY lCanStop INIT .T.
PROPERTY lCanPauseAndContinue INIT .F.
PROPERTY lCanShutDown INIT .T.
PROPERTY nExitCode INIT 0
PROPERTY cServiceStatus INIT SERVICE_START_PENDING
METHOD Initalise()
METHOD SetServiceStatus(cCurrentStatus)
PUBLIC:
METHOD Run()
ENDCLASS
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
TWindowsService
-
- Mensajes: 328
- Registrado: Mar Nov 21, 2006 2:10 am
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TWindowsService
Nick,
Try this free tool:
http://sourceforge.net/projects/uws/
I hope it helps.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Nick Hilder" <nick_Nospam#$%@capsol.com%NOSPAM%.au> escribió en el mensaje
news:[email=47212eb4@ozsrv2.ozlan.local...]47212eb4@ozsrv2.ozlan.local...[/email]
> Hi Everyone
>
> For a while I have wondered if I could create a xh windows service. I'm
> not a very good programmer, let alone a C programmer
>
> I did a little bit of googling and found this page
>
> http://www.devx.com/cplus/Article/9857/1954?pf=true
>
> It explains in very simple terms how to create a windows service in good
> old C. It was simple enough that I could follow it
>
> I then cranked up VS C# and made it create me a service so I could see the
> class, it's methods etc.
>
> I guess anyone who has written API wrapper (XA team plus others) will know
> if I'm wasting my time pretty much straight away
>
> I created the class below as I was reading various things. I would like to
> have a crack at a bit of C and am wondering weather I'm wasting my time,
> ie it's a much bigger fish than I realise.
>
> Maybe someone with some C experience would/could help me along the way. My
> only intention is to learn a bit of C etc, document the object and then
> donate the code to the Xailer developers so it can hopefully be used by
> all Xailer programmers.
>
> Regards Nick
>
> CLASS TWindowsService FROM TCompondent
>
> PUBLISHED:
>
> EVENT OnStart(oSender)
> EVENT OnStop(oSender)
> EVENT OnPause(oSender)
> EVENT OnContinue(oSender)
>
> PROTECTED:
> PROPERTY cServiceName INIT ''
> PROPERTY lCanStop INIT .T.
> PROPERTY lCanPauseAndContinue INIT .F.
> PROPERTY lCanShutDown INIT .T.
> PROPERTY nExitCode INIT 0
>
> PROPERTY cServiceStatus INIT SERVICE_START_PENDING
>
> METHOD Initalise()
> METHOD SetServiceStatus(cCurrentStatus)
>
> PUBLIC:
>
>
> METHOD Run()
>
> ENDCLASS
>
>
Try this free tool:
http://sourceforge.net/projects/uws/
I hope it helps.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Nick Hilder" <nick_Nospam#$%@capsol.com%NOSPAM%.au> escribió en el mensaje
news:[email=47212eb4@ozsrv2.ozlan.local...]47212eb4@ozsrv2.ozlan.local...[/email]
> Hi Everyone
>
> For a while I have wondered if I could create a xh windows service. I'm
> not a very good programmer, let alone a C programmer
>
> I did a little bit of googling and found this page
>
> http://www.devx.com/cplus/Article/9857/1954?pf=true
>
> It explains in very simple terms how to create a windows service in good
> old C. It was simple enough that I could follow it
>
> I then cranked up VS C# and made it create me a service so I could see the
> class, it's methods etc.
>
> I guess anyone who has written API wrapper (XA team plus others) will know
> if I'm wasting my time pretty much straight away
>
> I created the class below as I was reading various things. I would like to
> have a crack at a bit of C and am wondering weather I'm wasting my time,
> ie it's a much bigger fish than I realise.
>
> Maybe someone with some C experience would/could help me along the way. My
> only intention is to learn a bit of C etc, document the object and then
> donate the code to the Xailer developers so it can hopefully be used by
> all Xailer programmers.
>
> Regards Nick
>
> CLASS TWindowsService FROM TCompondent
>
> PUBLISHED:
>
> EVENT OnStart(oSender)
> EVENT OnStop(oSender)
> EVENT OnPause(oSender)
> EVENT OnContinue(oSender)
>
> PROTECTED:
> PROPERTY cServiceName INIT ''
> PROPERTY lCanStop INIT .T.
> PROPERTY lCanPauseAndContinue INIT .F.
> PROPERTY lCanShutDown INIT .T.
> PROPERTY nExitCode INIT 0
>
> PROPERTY cServiceStatus INIT SERVICE_START_PENDING
>
> METHOD Initalise()
> METHOD SetServiceStatus(cCurrentStatus)
>
> PUBLIC:
>
>
> METHOD Run()
>
> ENDCLASS
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
TWindowsService
Nick,
Try this free tool:
http://sourceforge.net/projects/uws/
I hope it helps.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Nick Hilder" <nick_Nospam#$%@capsol.com%NOSPAM%.au> escribió en el mensaje
news:[email=47212eb4@ozsrv2.ozlan.local...]47212eb4@ozsrv2.ozlan.local...[/email]
> Hi Everyone
>
> For a while I have wondered if I could create a xh windows service. I'm
> not a very good programmer, let alone a C programmer
>
> I did a little bit of googling and found this page
>
> http://www.devx.com/cplus/Article/9857/1954?pf=true
>
> It explains in very simple terms how to create a windows service in good
> old C. It was simple enough that I could follow it
>
> I then cranked up VS C# and made it create me a service so I could see the
> class, it's methods etc.
>
> I guess anyone who has written API wrapper (XA team plus others) will know
> if I'm wasting my time pretty much straight away
>
> I created the class below as I was reading various things. I would like to
> have a crack at a bit of C and am wondering weather I'm wasting my time,
> ie it's a much bigger fish than I realise.
>
> Maybe someone with some C experience would/could help me along the way. My
> only intention is to learn a bit of C etc, document the object and then
> donate the code to the Xailer developers so it can hopefully be used by
> all Xailer programmers.
>
> Regards Nick
>
> CLASS TWindowsService FROM TCompondent
>
> PUBLISHED:
>
> EVENT OnStart(oSender)
> EVENT OnStop(oSender)
> EVENT OnPause(oSender)
> EVENT OnContinue(oSender)
>
> PROTECTED:
> PROPERTY cServiceName INIT ''
> PROPERTY lCanStop INIT .T.
> PROPERTY lCanPauseAndContinue INIT .F.
> PROPERTY lCanShutDown INIT .T.
> PROPERTY nExitCode INIT 0
>
> PROPERTY cServiceStatus INIT SERVICE_START_PENDING
>
> METHOD Initalise()
> METHOD SetServiceStatus(cCurrentStatus)
>
> PUBLIC:
>
>
> METHOD Run()
>
> ENDCLASS
>
>
Try this free tool:
http://sourceforge.net/projects/uws/
I hope it helps.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Nick Hilder" <nick_Nospam#$%@capsol.com%NOSPAM%.au> escribió en el mensaje
news:[email=47212eb4@ozsrv2.ozlan.local...]47212eb4@ozsrv2.ozlan.local...[/email]
> Hi Everyone
>
> For a while I have wondered if I could create a xh windows service. I'm
> not a very good programmer, let alone a C programmer
>
> I did a little bit of googling and found this page
>
> http://www.devx.com/cplus/Article/9857/1954?pf=true
>
> It explains in very simple terms how to create a windows service in good
> old C. It was simple enough that I could follow it
>
> I then cranked up VS C# and made it create me a service so I could see the
> class, it's methods etc.
>
> I guess anyone who has written API wrapper (XA team plus others) will know
> if I'm wasting my time pretty much straight away
>
> I created the class below as I was reading various things. I would like to
> have a crack at a bit of C and am wondering weather I'm wasting my time,
> ie it's a much bigger fish than I realise.
>
> Maybe someone with some C experience would/could help me along the way. My
> only intention is to learn a bit of C etc, document the object and then
> donate the code to the Xailer developers so it can hopefully be used by
> all Xailer programmers.
>
> Regards Nick
>
> CLASS TWindowsService FROM TCompondent
>
> PUBLISHED:
>
> EVENT OnStart(oSender)
> EVENT OnStop(oSender)
> EVENT OnPause(oSender)
> EVENT OnContinue(oSender)
>
> PROTECTED:
> PROPERTY cServiceName INIT ''
> PROPERTY lCanStop INIT .T.
> PROPERTY lCanPauseAndContinue INIT .F.
> PROPERTY lCanShutDown INIT .T.
> PROPERTY nExitCode INIT 0
>
> PROPERTY cServiceStatus INIT SERVICE_START_PENDING
>
> METHOD Initalise()
> METHOD SetServiceStatus(cCurrentStatus)
>
> PUBLIC:
>
>
> METHOD Run()
>
> ENDCLASS
>
>