VB to Service 
Author Message
 VB to Service

Hi all!

i was wondering if its possible to make an vb app (net purposes) and make it
a NT Service easly?
Or if i have to put my hands on C??? any comments are very welcome!

thanks in advance.

all the best

Tiago Vidigal



Sun, 22 May 2005 00:06:10 GMT  
 VB to Service
Tiago,

Find a Control (ServiceMill from Active+ or NTSvc from Our
Friends in Redmond) to handle the actual Service-y stuff.

Tweak your code to use the (start and Stop) Events provided
by these controls.

Add *lots* of error-trapping code into your application.
Add some more error-trapping code.
Add some more error-trapping code.

*If* your application has no forms (very unlikely), turn on the
"Unattended Execution" and "Retained in Memory"
compilation options.  This will redirect any (unhandled)
run-time errors into the NT Event Log.

More likely you *do* have forms, so you can't use these
options.  That means that you have to catch each and every
possible error; if you don't, your Service will pop up a
MsgBox; on a non-visible, inaccessible, virtual desktop and
stop dead in the water until it goes away - seriously Bad News.

HTH,
    Phill  W.


. . .

Quote:
> i was wondering if its possible to make an vb app (net
> purposes) and make it a NT Service easly?



Sun, 22 May 2005 01:26:39 GMT  
 VB to Service
It can be done. Go to Google and type in "nt service ocx". Good luck, but be
warned,
Microsoft does not recommend building an NT service out of VB. I believe
that I used
the ntsvc.ocx component and, for my purposes, it worked fine.

Saga


Quote:
> Hi all!

> i was wondering if its possible to make an vb app (net purposes) and make
it
> a NT Service easly?
> Or if i have to put my hands on C??? any comments are very welcome!

> thanks in advance.

> all the best

> Tiago Vidigal



Sun, 22 May 2005 01:26:17 GMT  
 VB to Service
You can do it even without external componennts, but it is not easy. See
here:
http://smsoft.chat.ru/en/ntservice.htm

--
Sergey Merzlikin
http://smsoft.chat.ru


Quote:
> Hi all!

> i was wondering if its possible to make an vb app (net purposes) and make
it
> a NT Service easly?
> Or if i have to put my hands on C??? any comments are very welcome!

> thanks in advance.

> all the best

> Tiago Vidigal



Thu, 26 May 2005 07:35:48 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Created and installed VB.Net service but don't see it in services

2. Loading and unloading vb forms(vb 6.0 service pack 5)

3. Setting up VB Expression Service ...

4. Outlook won't start from VB NT Service

5. Parsing html page with Vb.Net service

6. VB.Net Serviced Components

7. Timer Stops firing when 2 VB.NET services running

8. Parsing html page with Vb.Net service

9. VB.Net Service Qustion: Detecting Program Start/Stop

10. .mdb share access in vb.net service

11. Send an alphanumeric page to a cell phone/pager from a vb.net service

12. Calling COM EXE from VB.NET Service leaves COM EXE in Memory

 

 
Powered by phpBB® Forum Software