登录 注册
当前位置:主页 > 资源下载 > 15 > 一个简单的PB操作系统服务示例

一个简单的PB操作系统服务示例

  • 更新:2024-11-25 08:52:20
  • 大小:13KB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:其它 - 开发技术
  • 格式:RAR

资源介绍

PB操作系统服务的简单例子,目前仅包含判断服务存在,取服务状态,停止和启动服务等 这个链接下,有功能较强的版本 http://download.****.net/source/3557823 FUNCTION ulong OpenSCManager(ref string lpMachineName,ref string lpDatabaseName,ulong dwDesiredAccess) LIBRARY "advapi32.dll" ALIAS FOR "OpenSCManagerA" FUNCTION ulong CreateService(ulong hSCManager,ref string lpServiceName,ref string lpDisplayName,ulong dwDesiredAccess,ulong dwServiceType,ulong dwStartType,ulong dwErrorControl,ref string lpBinaryPathName,ref string lpLoadOrderGroup,ref ulong lpdwTagId,ref string lpDependencies,ref string lp,ref string lpPassword) LIBRARY "advapi32.dll" ALIAS FOR "CreateServiceA" FUNCTION ulong DeleteService(ulong hService) LIBRARY "advapi32.dll" FUNCTION ulong CloseServiceHandle(ulong hSCObject) LIBRARY "advapi32.dll" FUNCTION ulong OpenService(ulong hSCManager,ref string lpServiceName,ulong dwDesiredAccess) LIBRARY "advapi32.dll" ALIAS FOR "OpenServiceA" FUNCTION ulong QueryServiceConfig(ulong hService,ref QUERY_SERVICE_CONFIG lpServiceConfig,ulong cbBufSize,ref ulong pcbBytesNeeded) LIBRARY "advapi32.dll" ALIAS FOR "QueryServiceConfigA" FUNCTION ulong QueryServiceConfig(ulong hService,ref query1 lpServiceConfig,ulong cbBufSize,ref ulong pcbBytesNeeded) LIBRARY "advapi32.dll" ALIAS FOR "QueryServiceConfigA" FUNCTION ulong QueryServiceStatus(ulong hService,ref SERVICE_STATUS lpServiceStatus) LIBRARY "advapi32.dll" FUNCTION ulong ControlService(ulong hService,ulong dwControl,ref SERVICE_STATUS lpServiceStatus) LIBRARY "advapi32.dll" FUNCTION ulong StartService(ulong hService,ulong dwNumServiceArgs,ulong lpServiceArgVectors) LIBRARY "advapi32.dll" ALIAS FOR "StartServiceA" FUNCTION ulong ChangeServiceConfig(ulong hService,ulong dwServiceType,ulong dwStartType,ulong dwErrorControl,ref string lpBinaryPathName,ref string lpLoadOrderGroup,ref ulong lpdwTagId,ref string lpDependencies,ref string lpServiceStartName,ref string lpPassword,ref string lpDisplayName) LIBRARY "advapi32.dll" ALIAS FOR "ChangeServiceConfigA" FUNCTION ulong EnumDependentServices(ulong hService,ulong dwServiceState,ref ENUM_SERVICE_STATUS lpServices,ulong cbBufSize,ref ulong pcbBytesNeeded,ref ulong lpServicesReturned) LIBRARY "advapi32.dll" ALIAS FOR "EnumDependentServicesA"