mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-29 13:28:04 +00:00
Release version 0.1.4. Fixed EntryPointNotFoundException for ADL_Adapter_ID_Get by adding two fallback implementations.
This commit is contained in:
parent
7053cc9b13
commit
6dba938c8d
@ -137,6 +137,8 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
|||||||
ref int numAdapters);
|
ref int numAdapters);
|
||||||
public delegate int ADL_Adapter_ID_GetDelegate(int adapterIndex,
|
public delegate int ADL_Adapter_ID_GetDelegate(int adapterIndex,
|
||||||
out int adapterID);
|
out int adapterID);
|
||||||
|
public delegate int ADL_Display_AdapterID_GetDelegate(int adapterIndex,
|
||||||
|
out int adapterID);
|
||||||
public delegate int ADL_Adapter_Active_GetDelegate(int adapterIndex,
|
public delegate int ADL_Adapter_Active_GetDelegate(int adapterIndex,
|
||||||
out int status);
|
out int status);
|
||||||
public delegate int ADL_Overdrive5_CurrentActivity_GetDelegate(
|
public delegate int ADL_Overdrive5_CurrentActivity_GetDelegate(
|
||||||
@ -154,13 +156,15 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
|||||||
private static ADL_Adapter_AdapterInfo_GetDelegate
|
private static ADL_Adapter_AdapterInfo_GetDelegate
|
||||||
_ADL_Adapter_AdapterInfo_Get;
|
_ADL_Adapter_AdapterInfo_Get;
|
||||||
|
|
||||||
public static ADL_Main_Control_DestroyDelegate
|
public static ADL_Main_Control_DestroyDelegate
|
||||||
ADL_Main_Control_Destroy;
|
ADL_Main_Control_Destroy;
|
||||||
public static ADL_Adapter_NumberOfAdapters_GetDelegate
|
public static ADL_Adapter_NumberOfAdapters_GetDelegate
|
||||||
ADL_Adapter_NumberOfAdapters_Get;
|
ADL_Adapter_NumberOfAdapters_Get;
|
||||||
public static ADL_Adapter_ID_GetDelegate
|
public static ADL_Adapter_ID_GetDelegate
|
||||||
ADL_Adapter_ID_Get;
|
_ADL_Adapter_ID_Get;
|
||||||
public static ADL_Adapter_Active_GetDelegate
|
public static ADL_Display_AdapterID_GetDelegate
|
||||||
|
_ADL_Display_AdapterID_Get;
|
||||||
|
public static ADL_Adapter_Active_GetDelegate
|
||||||
ADL_Adapter_Active_Get;
|
ADL_Adapter_Active_Get;
|
||||||
public static ADL_Overdrive5_CurrentActivity_GetDelegate
|
public static ADL_Overdrive5_CurrentActivity_GetDelegate
|
||||||
ADL_Overdrive5_CurrentActivity_Get;
|
ADL_Overdrive5_CurrentActivity_Get;
|
||||||
@ -199,7 +203,9 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
|||||||
GetDelegate("ADL_Adapter_NumberOfAdapters_Get",
|
GetDelegate("ADL_Adapter_NumberOfAdapters_Get",
|
||||||
out ADL_Adapter_NumberOfAdapters_Get);
|
out ADL_Adapter_NumberOfAdapters_Get);
|
||||||
GetDelegate("ADL_Adapter_ID_Get",
|
GetDelegate("ADL_Adapter_ID_Get",
|
||||||
out ADL_Adapter_ID_Get);
|
out _ADL_Adapter_ID_Get);
|
||||||
|
GetDelegate("ADL_Display_AdapterID_Get",
|
||||||
|
out _ADL_Display_AdapterID_Get);
|
||||||
GetDelegate("ADL_Adapter_Active_Get",
|
GetDelegate("ADL_Adapter_Active_Get",
|
||||||
out ADL_Adapter_Active_Get);
|
out ADL_Adapter_Active_Get);
|
||||||
GetDelegate("ADL_Overdrive5_CurrentActivity_Get",
|
GetDelegate("ADL_Overdrive5_CurrentActivity_Get",
|
||||||
@ -242,6 +248,20 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int ADL_Adapter_ID_Get(int adapterIndex,
|
||||||
|
out int adapterID) {
|
||||||
|
try {
|
||||||
|
return _ADL_Adapter_ID_Get(adapterIndex, out adapterID);
|
||||||
|
} catch (EntryPointNotFoundException) {
|
||||||
|
try {
|
||||||
|
return _ADL_Display_AdapterID_Get(adapterIndex, out adapterID);
|
||||||
|
} catch (EntryPointNotFoundException) {
|
||||||
|
adapterID = 1;
|
||||||
|
return ADL_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private delegate IntPtr ADL_Main_Memory_AllocDelegate(int size);
|
private delegate IntPtr ADL_Main_Memory_AllocDelegate(int size);
|
||||||
|
|
||||||
private static IntPtr Main_Memory_Alloc(int size) {
|
private static IntPtr Main_Memory_Alloc(int size) {
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("0.1.3.1")]
|
[assembly: AssemblyVersion("0.1.4.0")]
|
||||||
[assembly: AssemblyFileVersion("0.1.3.1")]
|
[assembly: AssemblyFileVersion("0.1.4.0")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user