Initial commit
[hashcat.git] / include / ext_ADL.h
1 /**
2 * Author......: Jens Steube <jens.steube@gmail.com>
3 * License.....: MIT
4 */
5
6 #ifndef EXT_ADL_H
7 #define EXT_ADL_H
8
9 #include <common.h>
10
11 // this is ugly but ADL requires the bool datatype
12
13 typedef int bool;
14
15 #include <adl_sdk.h>
16
17 typedef int HM_ADAPTER;
18
19 #ifdef _POSIX
20 void *GetProcAddress (void *pLibrary, const char *name);
21 #endif
22
23 typedef struct
24 {
25 ADLOD6StateInfo state;
26 ADLOD6PerformanceLevel level;
27
28 } ADLOD6MemClockState;
29
30 typedef int (*ADL_MAIN_CONTROL_DESTROY) ();
31 typedef int (*ADL_MAIN_CONTROL_CREATE) (ADL_MAIN_MALLOC_CALLBACK, int);
32 typedef int (*ADL_ADAPTER_NUMBEROFADAPTERS_GET) (int *);
33 typedef int (*ADL_ADAPTER_ADAPTERINFO_GET) (LPAdapterInfo, int);
34 typedef int (*ADL_DISPLAY_DISPLAYINFO_GET) (int, int *, ADLDisplayInfo **, int);
35 typedef int (*ADL_OVERDRIVE5_TEMPERATURE_GET) (int, int, ADLTemperature *);
36 typedef int (*ADL_OVERDRIVE6_TEMPERATURE_GET) (int, int *);
37 typedef int (*HC_ADL_OVERDRIVE5_CURRENTACTIVITY_GET) (int, ADLPMActivity *);
38 typedef int (*HC_ADL_OVERDRIVE5_THERMALDEVICES_ENUM) (int, int, ADLThermalControllerInfo *);
39 typedef int (*HC_ADL_ADAPTER_ID_GET) (int, int *);
40 typedef int (*HC_ADL_ADAPTER_VIDEOBIOSINFO_GET) (int, ADLBiosInfo *);
41 typedef int (*HC_ADL_OVERDRIVE5_FANSPEEDINFO_GET) (int, int, ADLFanSpeedInfo *);
42 typedef int (*ADL_OVERDRIVE5_FANSPEED_GET) (int, int, ADLFanSpeedValue *);
43 typedef int (*ADL_OVERDRIVE6_FANSPEED_GET) (int, ADLOD6FanSpeedInfo *);
44 typedef int (*ADL_OVERDRIVE5_FANSPEED_SET) (int, int, ADLFanSpeedValue *);
45 typedef int (*ADL_OVERDRIVE6_FANSPEED_SET) (int, ADLOD6FanSpeedValue *);
46 typedef int (*ADL_OVERDRIVE5_FANSPEEDTODEFAULT_SET) (int, int);
47 typedef int (*HC_ADL_OVERDRIVE5_ODPARAMETERS_GET) (int, ADLODParameters *);
48 typedef int (*HC_ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET) (int, int, ADLODPerformanceLevels *);
49 typedef int (*HC_ADL_OVERDRIVE5_ODPERFORMANCELEVELS_SET) (int, ADLODPerformanceLevels *);
50 typedef int (*HC_ADL_OVERDRIVE6_POWERCONTROL_SET) (int, int);
51 typedef int (*HC_ADL_OVERDRIVE6_POWERCONTROL_GET) (int, int *, int *);
52 typedef int (*HC_ADL_OVERDRIVE6_POWERCONTROLINFO_GET) (int, ADLOD6PowerControlInfo *);
53 typedef int (*ADL_ADAPTER_ACTIVE_GET) (int, int *);
54 typedef int (*ADL_DISPLAYENABLE_SET) (int, int *, int, int);
55 typedef int (*ADL_OVERDRIVE_CAPS) (int, int *, int *, int *);
56 typedef int (*ADL_OVERDRIVE6_CURRENTSTATUS_GET) (int, ADLOD6CurrentStatus *);
57 typedef int (*ADL_OVERDRIVE6_STATEINFO_GET) (int, int, ADLOD6MemClockState *);
58 typedef int (*ADL_OVERDRIVE6_CAPABILITIES_GET) (int, ADLOD6Capabilities *);
59 typedef int (*ADL_OVERDRIVE6_STATE_SET) (int, int, ADLOD6StateInfo *);
60 typedef int (*ADL_OVERDRIVE6_POWERCONTROL_CAPS) (int, int *);
61 typedef int (*ADL_OVERDRIVE6_TARGETTEMPERATUREDATA_GET) (int, int *, int *);
62
63 int hc_ADL_Main_Control_Destroy (HM_LIB hDLL);
64 int hc_ADL_Main_Control_Create (HM_LIB hDLL, ADL_MAIN_MALLOC_CALLBACK callback, int iEnumConnectedAdapters);
65 int hc_ADL_Adapter_NumberOfAdapters_Get (HM_LIB hDLL, int *lpNumAdapters);
66 int hc_ADL_Adapter_AdapterInfo_Get (HM_LIB hDLL, LPAdapterInfo lpInfo, int iInputSize);
67 int hc_ADL_Display_DisplayInfo_Get (HM_LIB hDLL, int iAdapterIndex, int *iNumDisplays, ADLDisplayInfo **lppInfo, int iForceDetect);
68 int hc_ADL_Overdrive5_Temperature_Get (HM_LIB hDLL, int iAdapterIndex, int iThermalControllerIndex, ADLTemperature *lpTemperature);
69 int hc_ADL_Overdrive6_Temperature_Get (HM_LIB hDLL, int iAdapterIndex, int *iTemperature);
70 int hc_ADL_Overdrive_CurrentActivity_Get (HM_LIB hDLL, int iAdapterIndex, ADLPMActivity *lpActivity);
71 int hc_ADL_Overdrive_ThermalDevices_Enum (HM_LIB hDLL, int iAdapterIndex, int iThermalControllerIndex, ADLThermalControllerInfo *lpThermalControllerInfo);
72 int hc_ADL_Adapter_ID_Get (HM_LIB hDLL, int iAdapterIndex, int *lpAdapterID);
73 int hc_ADL_Adapter_VideoBiosInfo_Get (HM_LIB hDLL, int iAdapterIndex, ADLBiosInfo *lpBiosInfo);
74 int hc_ADL_Overdrive5_FanSpeedInfo_Get (HM_LIB hDLL, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedInfo *lpFanSpeedInfo);
75 int hc_ADL_Overdrive5_FanSpeed_Get (HM_LIB hDLL, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
76 int hc_ADL_Overdrive6_FanSpeed_Get (HM_LIB hDLL, int iAdapterIndex, ADLOD6FanSpeedInfo *lpFanSpeedInfo);
77 int hc_ADL_Overdrive5_FanSpeed_Set (HM_LIB hDLL, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
78 int hc_ADL_Overdrive6_FanSpeed_Set (HM_LIB hDLL, int iAdapterIndex, ADLOD6FanSpeedValue *lpFanSpeedValue);
79 int hc_ADL_Overdrive5_FanSpeedToDefault_Set (HM_LIB hDLL, int iAdapterIndex, int iThermalControllerIndex);
80 int hc_ADL_Overdrive_ODParameters_Get (HM_LIB hDLL, int iAdapterIndex, ADLODParameters *lpOdParameters);
81 int hc_ADL_Overdrive_ODPerformanceLevels_Get (HM_LIB hDLL, int iAdapterIndex, int iDefault, ADLODPerformanceLevels *lpOdPerformanceLevels);
82 int hc_ADL_Overdrive_ODPerformanceLevels_Set (HM_LIB hDLL, int iAdapterIndex, ADLODPerformanceLevels *lpOdPerformanceLevels);
83 int hc_ADL_Overdrive_PowerControlInfo_Get (HM_LIB hDLL, int iAdapterIndex, ADLOD6PowerControlInfo *);
84 int hc_ADL_Overdrive_PowerControl_Get (HM_LIB hDLL, int iAdapterIndex, int *level);
85 int hc_ADL_Overdrive_PowerControl_Set (HM_LIB hDLL, int iAdapterIndex, int level);
86 int hc_ADL_Adapter_Active_Get (HM_LIB hDLL, int iAdapterIndex, int *lpStatus);
87 int hc_ADL_DisplayEnable_Set (HM_LIB hDLL, int iAdapterIndex, int *lpDisplayIndexList, int iDisplayListSize, int bPersistOnly);
88 int hc_ADL_Overdrive_Caps (HM_LIB hDLL, int iAdapterIndex, int *od_supported, int *od_enabled, int *od_version);
89 int hc_ADL_Overdrive_CurrentStatus_Get (HM_LIB hDLL, int iAdapterIndex, ADLOD6CurrentStatus *status);
90 int hc_ADL_Overdrive_StateInfo_Get (HM_LIB hDLL, int iAdapterIndex, int type, ADLOD6MemClockState *state);
91 int hc_ADL_Overdrive_Capabilities_Get (HM_LIB hDLL, int iAdapterIndex, ADLOD6Capabilities *caps);
92 int hc_ADL_Overdrive_State_Set (HM_LIB hDLL, int iAdapterIndex, int type, ADLOD6StateInfo *state);
93 int hc_ADL_Overdrive6_PowerControl_Caps (HM_LIB hDLL, int iAdapterIndex, int *lpSupported);
94 int hc_ADL_Overdrive6_TargetTemperatureData_Get (HM_LIB hDLL, int iAdapterIndex, int *cur_temp, int *default_temp);
95
96 #endif