Subject: Creating a Service in VB
Posted By: owain Post Date: 1/9/2004 5:23:58 AM
Can anyone provide me with a web link or book I can read on how to create a Windows Service in VB (not VB.Net)?

Is it possible?

Regards
Owain Williams
Reply By: owain Reply Date: 1/9/2004 5:44:02 AM
Oh dear, perhaps I should have read through the previous posts before posting this one !

Dmitriy posted a question on 20th August 2003 entitled Windows NT service and Icon in the System Tray where he provided a link to vbCity.com that describes what is involved in Creating WinNT Services in VB. The article discuses how to create a service using VB6 (or 4 or 5), how to put an icon in the system tray and how to interact with it and how to turn the screen saver on or off.

If anyone has anything else to add then I would be very interested to know the details.

Regards
Owain Williams
Reply By: Yehuda Reply Date: 1/9/2004 9:33:09 AM
Owain,

The only thing I might add is having created services in VB and VB.NET, if you can, reconsider going with .NET.  It is more stable and it avoids a lot of the issues that crop up with a Service in VB 6.0.

If you are determined to go with VB 6.0 here is a sample using the NT Service:
http://members.iinet.net.au/~mpot/software/code/NTService.zip

Yehuda
Reply By: marcostraf Reply Date: 1/9/2004 2:48:18 PM
Look at Q175948:
INFO: Running Visual Basic Applications as Windows NT Services

but I have to agree with Yehuda... stay away from it if you can! Because it CAN be done does not mean it MUST be done. I am the 'right tool for the job' guy. It is much much better to write your VB component as a standard ActiveX dll and to write a simple ATL server that call it (if you are not considering .NET)

Marco


Go to topic 8254

Return to index page 972
Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963