Is it possible to create a windows service in vb6? if yes, how?
相关问题
- Why does a windows service, hosting an NserviceBus
- Convert VB's Val to Java?
- Invalid Picture In Visual basic 6
- How to upgrade/install Upstart deamon version 1.5
- Compile is really slow for a solution with many pr
相关文章
- Service层和Dao层一定要对应吗?
- k8s 访问Pod 时好时坏
- XCopy or MOVE do not work when a WCF Service runs
- Async task does not work properly (doInBackground
- Problem installing windows service
- Reading (with Filesystem.FileGet) VB6 record file
- Can't start Tomcat as Windows Service
- Trim all types of whitespace, including tabs
Like gouging your own eyes out with a spoon, it is technically possible but I wouldn't recommend it.
To answer your question, yes it is possible to create a Windows service with VB6. To offer you advice, there are much better tools to use. I did it once as a proof of concept project, but never liked it well enough to try to use it for anything that we used in the company. A co-worker did do this for a production app and it was error prone. After he left we found out just how hard he was working to keep his service running and ended up replacing his app without reviewing his code. So my advice is, if you want to do it as an exercise go ahead, but if you are looking at this for a workable solution you should consider other tools. Here is a link to one way to do it.
I've never tried it, but Desaware offer a commercial package, the NT Service Toolkit that claims to allow you to host a VB6 DLL inside a Windows Service. Desaware was founded (and I think is still owned by) VB6 guru Dan Appleman, which is a good recommendation.
Microsoft created a control to allow you to create services in VB6.
http://support.microsoft.com/default.aspx/kb/170883
http://support.microsoft.com/kb/175948/EN-US/
Yes, it works, is it the best way to create a service, no, but if VB6 is a requirement (you have a bunch of code you have to re-use), then I can state from experience that it works. We have the original control from the January 1997 MSDN, however you can easily find it on the net if need be ( http://www.google.ca/search?q=ntsvc.ocx+download )
Yes, you can. Just follow the directions in this tutorial:
http://www.vbrad.com/article.aspx?id=92