public static bool Open(string devicePath, out MacUsbDevice usbDevice) { throw new NotImplementedException(); //usbDevice = null; //SafeFileHandle sfhDev; //bool bSuccess = WinUsbAPI.OpenDevice(out sfhDev, devicePath); //if (bSuccess) //{ // SafeWinUsbInterfaceHandle handle = new SafeWinUsbInterfaceHandle(); // bSuccess = WinUsbAPI.WinUsb_Initialize(sfhDev, ref handle); // if (bSuccess) // { // usbDevice = new WinUsbDevice(WinUsbApi, sfhDev, handle, devicePath); // } // else // UsbError.Error(ErrorCode.Win32Error, Marshal.GetLastWin32Error(), "Open:Initialize", typeof(UsbDevice)); //} //else // UsbError.Error(ErrorCode.Win32Error, Marshal.GetLastWin32Error(), "Open", typeof(UsbDevice)); //return bSuccess; }
public bool Open(out MacUsbDevice usbDevice) { usbDevice = null; if (String.IsNullOrEmpty(SymbolicName)) return false; if (MacUsbDevice.Open(SymbolicName, out usbDevice)) { usbDevice.mUsbRegistry = this; return true; } return false; }