PCREATE_SERVICE_ENUMERATION_HANDLE callback function (stm.h)

The CreateServiceEnumerationHandle function returns a handle that allows the use of fast and change-tolerant enumeration functions. Such functions can scan through all services or a specified subset. The functions are change-tolerant in that they automatically enumerate any changes that other processes make to the set of enumerated services

Syntax

PCREATE_SERVICE_ENUMERATION_HANDLE PcreateServiceEnumerationHandle;

HANDLE PcreateServiceEnumerationHandle(
  [in] DWORD ExclusionFlags,
  [in] PIPX_SERVICE CriteriaService
)
{...}

Parameters

[in] ExclusionFlags

Specifies the limits the set of services that CreateServiceEnumerationHandle returns to a subset defined by a combination of ExclusionFlags and values in the corresponding members of CriteriaService. This parameter is one of the following values.

Value Meaning
STM_ONLY_THIS_INTERFACE
Enumerate only those services that were obtained through the interface specified in the InterfaceIndex member of CriteriaService.
STM_ONLY_THIS_PROTOCOL
Enumerate only those services that were obtained through the protocol specified in the Protocol member of CriteriaService. For example, IPX_PROTOCOL_SAP for services obtained by the DLL protocol or IPX_PROTOCOL_STATIC for services maintained by the router manager.
STM_ONLY_THIS_TYPE
Enumerate only those services that have the same type as those in the Service member of CriteriaService

[in] CriteriaService

Pointer to an IPX_SERVICE structure with member values that correspond to those specified in ExclusionFlags.

Return value

If the function succeeds, the return value is a handle for use with the service enumeration function.

A NULL handle indicates no services exists with the specified criteria, or that the operation failed. For more information, call GetLastError and check the error code against the table below.

Value Description
ERROR_NO_SERVICES
No services exist with the specified criteria.
ERROR_INVALID_PARAMETER
One of the parameters is invalid.
 
 

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header stm.h

See also

CloseServiceEnumerationHandle

EnumerateGetNextService

GetLastError

IPX Service Table Management

IPX_SERVICE

Service Table Management Functions