PGET_FIRST_ORDERED_SERVICE callback function (stm.h)

The GetFirstOrderedService function returns the first service in the specified order from the designated subset of services in the table.

Syntax

PGET_FIRST_ORDERED_SERVICE PgetFirstOrderedService;

DWORD PgetFirstOrderedService(
  [in]      DWORD OrderingMethod,
  [in]      DWORD ExclusionFlags,
  [in, out] PIPX_SERVICE Service
)
{...}

Parameters

[in] OrderingMethod

Specifies the order in which the services are searched. This parameter must be one of the following values.

Value Meaning
STM_ORDER_BY_TYPE_AND_NAME
Search the services first by type and then by name.
STM_ORDER_BY_INTERFACE_TYPE_NAME
Search the services first by interface index, then by type, and finally by name.

[in] ExclusionFlags

Specifies the limits the set of examined services to a subset defined by ExclusionFlags and the values in the members of the structure pointed to by the Service parameter. See CreateServiceEnumerationHandle for a description of the possible flags.

[in, out] Service

Pointer to an IPX_SERVICE structure.

On input, the values in the members correspond to flags specified in ExclusionFlags.

On output, the first service that matches specified criteria.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Value Description
ERROR_NO_MORE_ITEMS
Services that match the specified criteria do not exist.
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

CreateServiceEnumerationHandle

IPX Service Table Management

IPX_SERVICE

Service Table Management Functions