词条 | EnumServicesStatus |
释义 | 函数介绍函数原型BOOL WINAPI EnumServicesStatus( __in SC_HANDLE hSCManager, __in DWORD dwServiceType, __in DWORD dwServiceState, __out LPENUM_SERVICE_STATUS lpServices, __in DWORD cbBufSize, __out LPDWORD pcbBytesNeeded, __out LPDWORD lpServicesReturned, __in_out LPDWORD lpResumeHandle ); 函数功能主要功能:枚举当前系统服务。 参数介绍hSCManager : A handle to the service control manager database. This handle is returned by the OpenSCManager function, and must have the SC_MANAGER_ENUMERATE_SERVICE access right. For more information, see Service Security and Access Rights. dwServiceType : The type of services to be enumerated. This parameter can be one or more of the following values. Value Meaning SERVICE_DRIVER SERVICE_WIN32 dwServiceState: The state of the services to be enumerated. This parameter can be one of the following values. Value Meaning SERVICE_ACTIVE SERVICE_INACTIVE SERVICE_STATE_ALL lpServices : A pointer to a buffer that contains an array of ENUM_SERVICE_STATUS structures that receive the name and service status information for each service in the database. The buffer must be large enough to hold the structures, plus the strings to which their members point. cbBufSize : The size of the buffer pointed to by the lpServices parameter, in bytes. pcbBytesNeeded : A pointer to a variable that receives the number of bytes needed to return the remaining service entries, if the buffer is too small. lpServicesReturned : A pointer to a variable that receives the number of service entries returned. lpResumeHandle : A pointer to a variable that, on input, specifies the starting point of enumeration. You must set this value to zero the first time this function is called. On output, this value is zero if the function succeeds. However, if the function returns zero and the GetLastError function returns ERROR_MORE_DATA, this value is used to indicate the next service entry to be read when the function is called to retrieve the additional data. |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。