VirtualBox

Opened 15 years ago

Last modified 8 years ago

#5268 closed defect

COM interface causes SafeArrayTypeMismatchException in .net — at Initial Version

Reported by: jamie pate Owned by:
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

Change History (0)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use