hSCManager = OpenSCManager (取主机名 (), “ServicesActive”, 2)
hService = CreateService (hSCManager, 服务名称, 服务名称, 983551, 16, 启动类型, 1, 服务程序地址, “”, 0, “”, 0, “”)
CloseServiceHandle (hService)
CloseServiceHandle (hSCManager)
hSCManager = OpenSCManager (取主机名 (), “ServicesActive”, 2)
hService = CreateService (hSCManager, 服务名称, 服务名称, 983551, 16, 启动类型, 1, 服务程序地址, “”, 0, “”, 0, “”)
CloseServiceHandle (hService)
CloseServiceHandle (hSCManager)