This post originated from an RSS feed registered with .NET Buzz
by Peter van Ooijen.
Original Post: COM variant arrays and .NET
Feed Title: Peter's Gekko
Feed URL: /error.htm?aspxerrorpath=/blogs/peter.van.ooijen/rss.aspx
Feed Description: My weblog cotains tips tricks and opinions on ASP.NET, tablet PC's and tech in general.
Many a COM server exchanges data with its clients using so called variant arrays. These can contain anything you can imagine. Creating a variant array from a COM client can be a hassle. The Delphi VCL framework has the VarArrayCreate function to help you. Creating a variant array from a .NET COM client is even easier as an array of objects is compatible. Take this snippet where the COM server expects an array containing variant bools. The array is declared as an array of object. It's members are filled with booleans.