Microsoft DirectX 8.1 (C++)

Services.ItemWithKey

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The ItemWithKey property retrieves an object using the collection's key metaproperty. A collection has a key metaproperty if it was retrieved by using Services.ItemsByKey.

Syntax

objServices.ItemWithKey(varIndex) As Service

Parameters

varIndex

[in]  Specifies a value for the key metaproperty of the collection. The key metaproperty was specified by the pproptype parameter in the call to ItemsByKey that returned this collection. The first object that has a matching value is retrieved.

Error Codes

If the property fails, an error is raised and Err.Number is set to a value other than zero.

Return Values

This property returns a Service object.

See Also