|Products Purchase Publishing Articles Support Company Contact|
support > Product FAQ > NT Service Toolkit > Compatibility
Event Log Toolkit
NT Service Toolkit
NT Service Toolkit Support
Frequently Asked Questions - Compatibility
Yes, version 1.1 of the NT Service Toolkit includes a new ReportEvent2 function that you can call to report events that are compatible with the Event Source file created with the Event Log Toolkit. You can run the NT Service Toolkit Files Update utility (NTUpdate.exe) to retrieve the latest .svt and dwntserv.tlb files, add the changes to your VB project, then remake your Service EXE. NOTE: If you are running behind an internet firewall or through a proxy server, you can contact Desaware Support firstname.lastname@example.org and we can send you the latest files, please include your registered name, company name, and serial number.
A sample snippet is shown below:
Public Const EVENTAPPNAME = "Beeper" Private Function IdwEasyService_OnStart(ByVal _ ControlObject As EASYSERVLib.IdwServiceCtl) As Long Dim msgid As Long 'You can build the eventid by combining the facility 'code, the event id number and severity code together 'as in the sample below. Or use the constants 'generated by the Event Log Toolkit as in this example 'EventID = &H4FFF0001 msgid = &HFFF * &H10000 ' facility = Application msgid = msgid Or 1 ' message event number = 1 msgid = msgid Or &H40000000 ' severity = info ' use &H80000000 for warning ' use &HC0000000 for error ' use 0 for success ControlObject.ReportEvent2 EVENTAPPNAME, _ svcEventlogInformation, CategoryNumber, _ EventID End Function
Absolutely! Examples that we include with the toolkit demonstrate how you can create services that:
If you can use the component from VB, you should be able to use it in a service. The only things you'll have to watch for are the same issues relating to security and account priviliges that apply to any service, regardless of the language it is written in.
|Products Purchase Articles Support Company Contact