NTService105

所属分类:单片机开发
开发工具:Visual C++
文件大小:57KB
下载次数:9
上传日期:2006-12-28 14:11:21
上 传 者angleyang
说明:  NTService控制程序源代码
(NTService control program source code.)

文件列表:
MyService (0, 2000-05-30)
MyService\main.cpp (457, 1999-03-17)
MyService\MSG00000.bin (100, 1999-03-17)
MyService\MyService.cpp (2436, 1999-03-17)
MyService\MyService.dsp (5449, 1999-03-17)
MyService\MyService.dsw (541, 1999-03-17)
MyService\MyService.h (667, 1999-03-17)
MyService\MyService.ncb (41984, 1999-03-17)
MyService\MyService.opt (48640, 1999-03-17)
MyService\MyService.plg (1794, 1999-03-17)
MyService\NTService.cpp (32381, 1999-03-17)
MyService\NTService.h (13055, 1999-03-17)
MyService\NTServiceEventLogMsg.mc (1394, 1999-03-17)
Original (0, 2000-05-30)
Original\ntservice.rul (16867, 1998-11-19)
Scripts (0, 2000-05-30)
Scripts\ntservice.h (4803, 2000-05-30)
Scripts\ntservice.rul (16273, 1999-03-17)
Service Test (0, 2000-05-30)
Service Test\Component Definitions (0, 2000-05-30)
Service Test\Component Definitions\Default.cdf (784, 1997-09-29)
Service Test\Component Definitions\Default.fgl (988, 1998-08-28)
Service Test\Description.txt (19, 1999-03-17)
Service Test\File Groups (0, 2000-05-30)
Service Test\File Groups\Default.fdf (305, 1998-08-28)
Service Test\File Groups\New File Group 1.fgl (46, 1998-08-28)
Service Test\Instructions.txt (0, 1999-03-17)
Service Test\Media (0, 2000-05-30)
Service Test\Media\Default (0, 2000-05-30)
Service Test\Media\Default\default.mda (872, 1999-03-17)
Service Test\Media\Default\Disk Images (0, 2000-05-30)
Service Test\Media\Default\Disk Images\Disk1 (0, 2000-05-30)
Service Test\Media\Default\Log Files (0, 2000-05-30)
Service Test\Media\Default\Report Files (0, 2000-05-30)
Service Test\Notes.txt (0, 1999-03-17)
Service Test\Registry Entries (0, 2000-05-30)
Service Test\Registry Entries\Default.rge (50, 1997-09-29)
Service Test\Script Files (0, 2000-05-30)
... ...

NT Service handling functions v1.05 General ------- This set of functions will allow you to start, stop, pause, resume, create and delete services under WinNT; it all takes place natively in InstallShield, no external DLLs needed. Scripts: These are the current working copies - simple include into your setup Original: Original ntservice.rul file before the rewrite MyService: Sample service (VC++ 6.0) Service Test: IS 5.5 created sample, exercising all the functions against MyService Functions: ---------- prototype _InitServiceConnections(STRING); prototype _CloseServiceConnections(); Internal functions not normally needed to be called directly. These open a connection to the SCManager and Service (if applicable). prototype _IsServiceAvailable(STRING); prototype _StartNTService(STRING); prototype _StopNTService(STRING); prototype _IsNTServiceStopped(STRING); prototype _PauseNTService(STRING); prototype _ResumeNTService(STRING); prototype _DeleteNTService(STRING); These functions do exactly what you'd think; the parameter is the service *name*, not the display name. See the example install if you need clarification. prototype _CreateNTService(STRING, STRING, NUMBER, NUMBER, NUMBER, STRING, STRING, NUMBER, STRING, STRING, STRING); This one is the hardest of the bunch; the parameters are rather complex, so it is advised you read the MSDN/VC++ help for "CreateService". Read the function itself for the inline comments to help you. In the most basic sense, you can directly port your C parameters over to this function, the function internally takes care of the pointer stuff. Bugs: ----- The pause function doesn't seem to work with the MyService sample; if anyone would like to debug, feel free. Credits: -------- Authors: Mike Hegyi - Original Stephan Hagedorn - Revisions Alan F. Barksdale - Extensions Giorgio Cognigni - IS3 Support Troy Engel - Rewrite, Extensions, Docs, Samples Other: Ken Dyck - Reading his code helped ;-) Stefan Krueger - InstallSite guru Last revised by: Troy Engel If you make any revisions please try to keep the package up to date, intact, and whole. The package on InstallSite should be considered the master.

近期下载者

相关文件


收藏者