Thanks. I wrote this code: http://rafb.net/p/9JVNeQ51.html
Obviously it doesn't work, and I don't understand why. Basically I can use either the IEnumVARIANT, that sounds tricky, or simply the GetItem(), can't I? What's the simplest method?
The variant type in you code is invalid. VT_I2 and VT_I4 are the only types accepted by get_Item(). Variant of type VT_INT causes the method to fail with E_INVALIDARG.
I guess, that for your needs get_Items is enough. IEnumVARIANT returned by get__NewEnum allows you to iterate through viewpoint collection as well, but get_Items is much easier for use in C++. _NewEnum was introduced mostly for Visual Basic. VB uses _NewEnum when executing "For Each" loop.
|
|