Parameter type for a complex object in a COM-visible function (VB6)
Question
Should we use object
or variant
? What difference does it make?
Solution
If you use Object, then clients must pass in something that supports IUnknown
or IDispatch
- in short the parameter must be an object. If you use Variant, then clients can pass in anything.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow