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.



DWORD PgetFirstOrderedService(
  [in]      DWORD OrderingMethod,
  [in]      DWORD ExclusionFlags,
  [in, out] PIPX_SERVICE Service


[in] OrderingMethod

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

Value Meaning
Search the services first by type and then by 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
Services that match the specified criteria do not exist.
One of the parameters is invalid.


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

See also


IPX Service Table Management


Service Table Management Functions