EvanK
Technical User
- Nov 18, 2003
- 21
I'm just getting back into using VB6 after a very long time, and am working with the iTunes COM interface...I'm having trouble getting an object reference from a property, because the property takes an index and I guess I'm writing it as method.
The object browser gives me a property, and it takes an index:
I can get a reference to the parent object just fine:
But reading from the property with an argument (the index):
throws the error "Invalid procedure call or argument". am I just missing something obvious?
I would appreciate any help anyone could give me, thanks for taking the time to read this!
The object browser gives me a property, and it takes an index:
Code:
Property Item(Index As Long) As IITSource
read-only
Default member of iTunesLib.IITSourceCollection
Returns an IITSource object corresponding to the given index (1-based).
I can get a reference to the parent object just fine:
Code:
Dim Collection as IITSourceCollection
Set Collection = iTunesApp.Sources
But reading from the property with an argument (the index):
Code:
Dim SourceObj as IITSource
SourceObj = Collection.Item(1)
throws the error "Invalid procedure call or argument". am I just missing something obvious?
I would appreciate any help anyone could give me, thanks for taking the time to read this!