public string GetDriverVersion() { ADLVersionsInfoX2 info = new ADLVersionsInfoX2(); try { var r = AdlNativeMethods.ADL2_Graphics_VersionsX2_Get(context, ref info); if (r < AdlStatus.ADL_OK) { Write.DevError($"{nameof(AdlNativeMethods.ADL2_Graphics_VersionsX2_Get)} {r}"); } return(info.strCrimsonVersion); } catch { return("0.0"); } }
public Version GetDriverVersion() { try { ADLVersionsInfoX2 info = new ADLVersionsInfoX2(); var r = AdlNativeMethods.ADL2_Graphics_VersionsX2_Get(_context, ref info); if (r < AdlStatus.ADL_OK) { NTMinerConsole.DevError(() => $"{nameof(AdlNativeMethods.ADL2_Graphics_VersionsX2_Get)} {r.ToString()}"); } if (string.IsNullOrEmpty(info.strCrimsonVersion) || !Version.TryParse(info.strCrimsonVersion, out Version v)) { return(new Version()); } return(v); } catch { return(new Version()); } }
public static extern int nhm_amd_device_get_driver_version(int bus_number, ref ADLVersionsInfoX2 driverVersion);