VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



NTService 1.1

by Harry Fischer (2 Submissions)
Category: OLE/COM/DCOM/Active-X
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

Microsoft's ActiveX Control NTSVC.OCX Version 1.1.
I've ported the Source-Code to VC++ 6, and updated it.
Added two methods and one property:
ReportStatus(), GetServiceStatusHandle() and WaitHint.
I think this is an "Open Source"-project and to publish
a new version, won't get me in a trouble regarding license regulations. I hope so.

Assumes
Short history: The reason why I updated this OCX is, I had to write a Service-App for my company in VB. Which is a real challenge. I've found this OCX and used it. But my App has routines which need a long time during the Service-startup. So the NT ServiceCM chancels my Service during Startup. In the MSDN is mentioned a function called "SetServiceStatus()" and a "WaitHint" property. With this, the NT SCM can be informed about longer operations of the Service and it gives more time for Startup. The Control uses this function internally, but has't put it out to the interface. I changed the code, now it does. And it workes fine for my purposes. I also updated the help-file. Description for new interface (refer to the Help-file): .GetServiceStatusHandle(): Returns the status handle for the Service. It is a 32-bit integer value which is assigned to the Service during the StartService() operation. It returns zero if the Service is not started. .ReportStatus(): This function updates the service control manager's status information for the calling service. .WaitHint: Returns or sets an amount of extra time, in milliseconds, which the NT Service Controller have to wait for the Service at a start, stop, pause, or continue operation.

Rate NTService 1.1

Download NTService 1.1

Download NTService 1.1 (93 KB)

NTService 1.1 Comments

No comments have been posted about NTService 1.1. Why not be the first to post a comment about NTService 1.1.

Post your comment

Subject:
Message:
0/1000 characters