public USBXpress.ReturnCodes SI_GetNumDevices(ref int lpwdNumDevices) { if (tipo == TypeOS.i64) { return(USBXpress64.SI_GetNumDevices(ref lpwdNumDevices)); } else { return(USBXpress32.SI_GetNumDevices(ref lpwdNumDevices)); } }
public USBXpress() { int numDevices = 0; if (tipo != TypeOS.i64) { try { USBXpress32.SI_GetNumDevices(ref numDevices); tipo = TypeOS.x86; } catch (Exception) { try { USBXpress64.SI_GetNumDevices(ref numDevices); tipo = TypeOS.i64; } catch (Exception) { tipo = TypeOS.None; MessageBox.Show("Error opening DLL API for USB. Check Instalation."); } } } else { try { USBXpress64.SI_GetNumDevices(ref numDevices); tipo = TypeOS.i64; } catch (Exception) { try { USBXpress32.SI_GetNumDevices(ref numDevices); tipo = TypeOS.x86; } catch (Exception) { tipo = TypeOS.None; MessageBox.Show("Error opening DLL API for USB. Check Instalation."); } } } }