Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a "service" Can I do it? 1

Status
Not open for further replies.

SerialCoder

Programmer
Oct 18, 2002
95
US
I wrote a routine today that goes through the network and does some of the cleanup work that i have to do from time to time. does VB allow you to create a service out of a routinelike this and have it run on a machine transparently? if so what is this called?
 

I am not a programmer, or rather would say I am a poor programmer..

But as an administrator I work with programmers everyday. The tool to use for creating a service out of your VB application on an NT/2000/XP machine is srvany.exe available from the Windows 2000 Resource Kit.

In the resource kit documentation, there is also lots of information/considerations/etc. documentation for programmers in creating your own service and requirements without using a tool. If your company has the Windows 2000 Resource Kit (and your Windows administrator 'should' definatley know), have him give you a copy of srvany.exe, supporting documents and files, and ask him about considerations regarding your application.

Sounds like you are doing things "over the network." As an administrator, whenever a programmer is going to do something "over my network," I would like to know a little about what is going to be done. It allows me to offer solutions that take into account the simple things programmers sometimes forget, like security local to the machine and remotely on other machines..., bandwidth throttling, and port specific traffic/priority.

I have assisted programmers in the past with writing services, and one thing I find is that when you doing stuff to other Windows/LDAP/etc. machines, remember that services can be run in a users credentials from your directory. Many times this allows you to work through security concerns quickly and allow your application to get to and do what it needs to without making security the programmers concern, more so the adminsitrators...

Enjoy!

Galrahn
galrahn@galrahn.com
 
Guys,

with due respect to all the responses, i will say the discussion is getting a little bit off the track. arent we? Praveen Menon
pcmin@rediffmail.com
 
Having written many services in C, C++, VB, and C#, here's my opinion (for what it's worth) of the various approaches:

C: Lean, mean, and hard to write

C++: Same, only even harder to write

VB (ntsvc.ocx): Works, although the OCX is unsupported by Microsoft, and will crash VB if you try to debug the service startup routines.

VB (Desaware): Works well. But expensive.

C#: Way cool. Doesn't run as fast as the others mentioned (the penalty of managed code), but easy to write, easy to support. Same would apply to VB7.

If I were writing new code, I would go with the .NET family to write services simply because they're supported, they work, and you can debug them.

Chip H.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top