Skip to content

枚举 ​

WinServicesLib 包暴露的四个面向用户的枚举。这四个枚举均来自包源码中的公共 ServicesConstantsPublic 模块;源码中调用 advapi32.dll 时使用的更大一组内部 SERVICE_* 常量位于 Private Module 中,不属于公共 API。

枚举使用者
ServiceTypeConstantsServiceManager.Type, ServiceState.Type
ServiceStartConstantsServiceManager.InstallStartMode
ServiceControlCodeConstantsServices.ControlService, ITbService.ChangeState 的 dwControl 参数
ServiceStatusConstantsServiceManager.ReportStatus

成员名称前缀继承自底层 Win32 SDK 常量——配置枚举(ServiceTypeConstants、ServiceStartConstants)使用 tb…,运行时枚举(ServiceControlCodeConstants、ServiceStatusConstants)使用 vb…。这种分裂并非刻意设计;请将前缀视为成员名称的一部分,忽略这种不对称性。

twinBASIC及其LOGO版权为作者"韦恩"所有