CreateServiceEnumerationHandle

[This is preliminary documentation and subject to change.]

The CreateServiceEnumerationHandle function returns a handle that allows use of fast and change-tolerant enumeration APIs that can scan through all services or a specified subset.

HANDLE CreateServiceEnumerationHandle (
  IN DWORD           ExclusionFlags,
  IN PIPX_SERVICE    CriteriaService
  );
 

Parameters

ExclusionFlags
Limits the set of services CreateServiceEnumerationHandle returns to a subset defined by a combination of ExclusionFlags and values in the corresponding fields of CriteriaService. This parameter must be one of the following values.
Value Defintion
STM_ONLY_THIS_INTERFACE Enumerate only those services that were obtained through the interface specified in the InterfaceIndex field of CriteriaService.
STM_ONLY_THIS_PROTOCOL Enumerate only those services that were obtained through the protocol specified in the Protocol field 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 field of CriteriaService.

CriteriaService
Points to an IPX_SERVICE structure with field values that correspond to those specified in ExclusionFlags.

Return Values

Handle for use with the service enumeration function. A NULL handle indicates no services exists with the specified criteria, or that the operation failed. Call GetLastError to obtain more information:

ERROR_NO_SERVICES
No services exist with the specified criteria.
ERROR_INVALID_PARAMETER
One or more of the input parameters is invalid. For example, invalid enumeration flags or invalid fields in CriteriaService.

QuickInfo

  Windows NT: Use version 5.0 and later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in user-defined.
  Import Library: user-defined.

See Also

CloseServiceEnumerationHandle, EnumerateGetNextService, GetLastError, IPX_SERVICE