VirtualBox

Opened 15 years ago

Closed 8 years ago

#5268 closed defect (obsolete)

COM interface causes SafeArrayTypeMismatchException in .net

Reported by: jamie pate Owned by:
Component: other Version: VirtualBox 3.0.8
Keywords: Cc:
Guest type: other Host type: Windows

Description (last modified by aeichner)

For unknown reasons' I can't get C# to iterate arrays using the COM interface. It always throws SafeArrayTypeMismatchException. Other people have had this problem as well. http://stackoverflow.com/questions/1126012

ie:

namespace VirtualBoxSample {
	class Program {
		static void Main(string[] args) {
			IVirtualBox vb = new VirtualBoxClass();

			foreach (IMachine machine in vb.Machines) {
				Console.WriteLine(machine.Name);
			}

			Console.ReadLine();
		}
	}
}

referencing {46137EEC-703B-4FE5-AFD4-7C9BBBBA0259}\1.3\0 lbimp

Change History (1)

comment:1 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette