VirtualBox

Ticket #5268 (new defect)

Opened 4 years ago

COM interface causes SafeArrayTypeMismatchException in .net

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

Description

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

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use