2009-09-14 7 views
0

J'utilise la bibliothèque de type VirtualBox de C# comme suit:SafeArrayTypeMismatchException en utilisant VirtualBox de C#

using System; 
using System.Collections.Generic; 
using System.Text; 
using VirtualBox; 

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

      IHost h = vbox.Host; 

      Array a = h.USBDevices;   
     } 
    } 
} 

La ligne tableau a = h.USBDevices; provoque une exception SafeArrayTypeMismatchException. Est-ce que quelqu'un d'autre a eu le même problème?

Merci!

+0

Question similaire: http://stackoverflow.com/questions/1126012 – dtb

Répondre

0
var a = (IUSBDevice[])h.USBDevices