Retrieves the key at the specified index in the collection.
HRESULT key( long lIndex, BSTR *pbstrKey );
- [in] A zero-based index of the list entry, up to the length of the collection.
- [out, retval] Address of a variable of type BSTR that receives the key name.
Returns one of the following values.
S_OK The operation completed successfully. E_INVALIDARG The specified lIndex is too small or too large.
The key can be any string, including the empty string.
The order of keys may change when items are added to the collection.
Free the memory returned in pbstrKey with SysFreeString.