#ifndef LSADL_API_H
#define LSADL_API_H 1



#include "include/adl_sdk.h"
#include "Globals.h"
#include <dlfcn.h>  //dyopen, dlsym, dlclose
#include <stdlib.h>
#include <stdio.h>
#include <string.h> //memeset
#include <unistd.h> //sleep

extern char ADL_Func_Enabled[LSADL_FUNCS];
extern char ADL_Func_Notes[LSADL_FUNCS];



// #Main Group of APIs
/////  FIXME: DISABLE DEPRECATED  ie: This API has been deprecated because the controller index is no longer used with DAL2. Replaced by ADL_Display_LUTColor_Get /////
typedef int( *LSADL_MAIN_CONTROL_CREATE )(ADL_MAIN_MALLOC_CALLBACK, int);
	//ADL_Main_Control_Create (ADL_MAIN_MALLOC_CALLBACK callback, int iEnumConnectedAdapters)
	//Function to initialize the ADL interface. This function should be called first.
typedef int(*LSADL_MAIN_CONTROL_DESTROY)(void);
	//ADL_Main_Control_Refresh ()
	//Function to refresh adapter information. This function generates an adapter index value for all logical adapters that have ever been present in the system.
typedef int(*LSADL_MAIN_CONTROL_REFRESH)(void);
	//ADL_Main_Control_Destroy ()
	//Function to destroy ADL global pointers. This function should be called last.
typedef int(*LSADL_GRAPHICS_PLATFORM_GET)(int *);
	//ADL_Graphics_Platform_Get (int *lpPlatForm)
	//Function to retrieve the type of graphics platform the system is currently running.
// #General Adapter APIs
typedef int(*LSADL_ADAPTER_ACTIVE_GET)(int, int *);
	//ADL_Adapter_Active_Get (int iAdapterIndex, int *lpStatus)
	//Function to determine if the adapter is active or not.
typedef int(*LSADL_ADAPTER_NUMBEROFADAPTERS_GET)(int *);
	//ADL_Adapter_NumberOfAdapters_Get (int *lpNumAdapters)
	//Function to retrieve the number of OS-known adapters.
typedef int(*LSADL_ADAPTER_ADAPTERINFO_GET)(LPAdapterInfo, int);
	//ADL_Adapter_AdapterInfo_Get (LPAdapterInfo lpInfo, int iInputSize)
	//Retrieves all OS-known adapter information.
typedef int(*LSADL_ADAPTER_ASICFAMILYTYPE_GET)(int, int *, int *);
	//ADL_Adapter_ASICFamilyType_Get (int iAdapterIndex, int *lpAsicTypes, int *lpValids)
typedef int(*LSADL_ADAPTER_SPEED_CAPS)(int, int *, int *);
	//ADL_Adapter_Speed_Caps (int iAdapterIndex, int *lpCaps, int *lpValid)
typedef int(*LSADL_ADAPTER_SPEED_GET)(int, int *, int *);
	//ADL_Adapter_Speed_Get (int iAdapterIndex, int *lpCurrent, int *lpDefault)
typedef int(*LSADL_ADAPTER_SPEED_SET)(int, int);
	//ADL_Adapter_Speed_Set (int iAdapterIndex, int iSpeed)
typedef int(*LSADL_ADAPTER_ACCESSIBILITY_GET)(int, int *);
	//ADL_Adapter_Accessibility_Get (int iAdapterIndex, int *lpAccessibility)
typedef int(*LSADL_ADAPTER_VIDEOBIOSINFO_GET)(int, ADLBiosInfo *);
	//ADL_Adapter_VideoBiosInfo_Get (int iAdapterIndex, ADLBiosInfo *lpBiosInfo)
typedef int(*LSADL_ADAPTER_ID_GET)(int, int *);
	//ADL_Adapter_ID_Get (int iAdapterIndex, int *lpAdapterID)
// #CrossDisplay APIs
typedef int(*LSADL_ADAPTER_CROSSDISPLAYADAPTERROLE_CAPS)(int, int *, int *, int *, int **, int *, int **, int *);
	//ADL_Adapter_CrossdisplayAdapterRole_Caps (int iAdapterIndex, int *lpCrossDisplaySupport, int *lpAdapterRole, int *lpNumPossDisplayAdapters, int **lppPossDisplayAdapters,
	//int *lpNnumPosRenderingAdapters, int **lppPosRenderingAdapters, int *lpErrorStatus)
typedef int(*LSADL_ADAPTER_CROSSDISPLAYINFO_GET)(int, int *, int *, int *,	int **, int *, int **, int *);
	//ADL_Adapter_CrossdisplayInfo_Get (int iAdapterIndex, int *lpAdapterRole, int *lpCrossdisplayMode, int *lpNumDisplayAdapters,
	//int **lppDisplayAdapters, int *lpNumRenderingAdapters, int **lppRenderingAdapters, int *lpErrorCodeStatus)
typedef int(*LSADL_ADAPTER_CROSSDISPLAYINFO_SET)(int, int, int, int, int *);
	//ADL_Adapter_CrossdisplayInfo_Set (int iAdapterIndex, int iDisplayAdapterIndex, int iRenderingAdapterIndex, int crossdisplayMode, int *lpErrorCode)
// #CrossFire APIs
typedef int(*LSADL_ADAPTER_CROSSFIRE_CAPS)(int, int *, int *, ADLCrossfireComb **);
	//ADL_Adapter_Crossfire_Caps (int iAdapterIndex, int *lpPreferred, int *lpNumComb, ADLCrossfireComb **ppCrossfireComb)
typedef int(*LSADL_ADAPTER_CROSSFIRE_GET)(int, ADLCrossfireComb *, ADLCrossfireInfo *);
	//ADL_Adapter_Crossfire_Get (int iAdapterIndex, ADLCrossfireComb *lpCrossfireComb, ADLCrossfireInfo *lpCrossfireInfo)
typedef int(*LSADL_ADAPTER_CROSSFIRE_SET)(int, ADLCrossfireComb *);
	//ADL_Adapter_Crossfire_Set (int iAdapterIndex, ADLCrossfireComb *lpCrossfireComb)
// #Miscellaneous Display APIs
typedef int(*LSADL_DISPLAY_DISPLAYINFO_GET)(int, int *, ADLDisplayInfo **, int);
	//ADL_Display_DisplayInfo_Get (int iAdapterIndex, int *lpNumDisplays, ADLDisplayInfo **lppInfo, int iForceDetect)
	//Function to retrieve the adapter display information.
typedef int(*LSADL_DISPLAY_NUMBEROFDISPLAYS_GET)(int, int *);
	//ADL_Display_NumberOfDisplays_Get (int iAdapterIndex, int *lpNumDisplays)
typedef int(*LSADL_DISPLAY_PRESERVEDASPECTRATIO_GET)(int, int, int *, int *, int *);
	//ADL_Display_PreservedAspectRatio_Get (int iAdapterIndex, int iDisplayIndex, int *lpSupport, int *lpCurrent, int *lpDefault)
typedef int(*LSADL_DISPLAY_PRESERVEDASPECTRATIO_SET)(int, int, int);
	//ADL_Display_PreservedAspectRatio_Set (int iAdapterIndex, int iDisplayIndex, int iCurrent)
typedef int(*LSADL_DISPLAY_IMAGEEXPANSION_GET)(int, int, int *, int *, int *);
	//ADL_Display_ImageExpansion_Get (int iAdapterIndex, int iDisplayIndex, int *lpSupport, int *lpCurrent, int *lpDefault)
typedef int(*LSADL_DISPLAY_IMAGEEXPANSION_SET)(int, int, int);
	//ADL_Display_ImageExpansion_Set (int iAdapterIndex, int iDisplayIndex, int iCurrent)
typedef int(*LSADL_DISPLAY_POSITION_GET)(int, int, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *);
	//ADL_Display_Position_Get (int iAdapterIndex, int iDisplayIndex, int *lpX, int *lpY, int *lpXDefault, int *lpYDefault, int *lpMinX,
	//int *lpMinY, int *lpMaxX, int *lpMaxY, int *lpStepX, int *lpStepY)
typedef int(*LSADL_DISPLAY_POSITION_SET)(int, int, int, int);
	//ADL_Display_Position_Set (int iAdapterIndex, int iDisplayIndex, int iX, int iY)
typedef int(*LSADL_DISPLAY_SIZE_GET)(int, int, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *);
	//ADL_Display_Size_Get (int iAdapterIndex, int iDisplayIndex, int *lpWidth, int *lpHeight, int *lpDefaultWidth, int *lpDefaultHeight,
	//int *lpMinWidth, int *lpMinHeight, int *lpMaxWidth, int *lpMaxHeight, int *lpStepWidth, int *lpStepHeight)
typedef int(*LSADL_DISPLAY_SIZE_SET)(int, int, int, int);
	//ADL_Display_Size_Set (int iAdapterIndex, int iDisplayIndex, int iWidth, int iHeight)
typedef int(*LSADL_DISPLAY_ADJUSTCAPS_GET)(int, int, int *);
	//ADL_Display_AdjustCaps_Get (int iAdapterIndex, int iDisplayIndex, int *lpInfo)
 	//Function to retrieve the adjustment display information.
typedef int(*LSADL_DISPLAY_CAPABILITIES_GET)(int, int *, int *);
	//ADL_Display_Capabilities_Get (int iAdapterIndex, int *lpNumberOfControlers, int *lpNumberOfDisplays)
 	//Function to get the number of displays and controllers supported by an adapter.
typedef int(*LSADL_DISPLAY_CONNECTEDDISPLAYS_GET)(int, int *);
	//ADL_Display_ConnectedDisplays_Get (int iAdapterIndex, int *lpConnections)
 	//Function to indicate whether displays are physically connected to an adapter.
typedef int(*LSADL_DISPLAY_DEVICECONFIG_GET)(int, int, ADLDisplayConfig *);
	//ADL_Display_DeviceConfig_Get (int iAdapterIndex, int iDisplayIndex, ADLDisplayConfig *lpDisplayConfig)
 	//Function to get HDTV capability settings.
typedef int(*LSADL_DISPLAY_PROPERTY_GET)(int, int, ADLDisplayProperty *);
	//ADL_Display_Property_Get (int iAdapterIndex, int iDisplayIndex, ADLDisplayProperty *lpDisplayProperty)
 	//Function to get the current display property value.
typedef int(*LSADL_DISPLAY_PROPERTY_SET)(int, int, ADLDisplayProperty *);
	//ADL_Display_Property_Set (int iAdapterIndex, int iDisplayIndex, ADLDisplayProperty *lpDisplayProperty)
 	//Function to set current display property value.
typedef int(*LSADL_DISPLAY_SWITCHINGCAPABILITY_GET)(int, int *);
	//ADL_Display_SwitchingCapability_Get (int iAdapterIndex, int *lpResult)
 	//Function to retrieve the Display Switching Flag from the registry.
typedef int(*LSADL_DISPLAY_DITHERSTATE_GET)(int, int, int *);
	//ADL_Display_DitherState_Get (int iAdapterIndex, int iDisplayIndex, int *lpDitherState)
 	//Function to retrieve the dither state.
typedef int(*LSADL_DISPLAY_DITHERSTATE_SET)(int, int, int);
	//ADL_Display_DitherState_Set (int iAdapterIndex, int iDisplayIndex, int iDitherState)
 	//Function to set the dither state.
typedef int(*LSADL_DISPLAY_SUPPORTEDPIXELFORMAT_GET)(int, int, int *);
	//ADL_Display_SupportedPixelFormat_Get (int iAdapterIndex, int iDisplayIndex, int *lpPixelFormat)
 	//Function to retrieve the supported pixel format. HDMI only .
typedef int(*LSADL_DISPLAY_PIXELFORMAT_GET)(int, int, int *);
	//ADL_Display_PixelFormat_Get (int iAdapterIndex, int iDisplayIndex, int *lpPixelFormat)
 	//Function to retrieve the current display pixel format. HDMI only .
typedef int(*LSADL_DISPLAY_PIXELFORMAT_SET)(int, int, int);
	//ADL_Display_PixelFormat_Set (int iAdapterIndex, int iDisplayIndex, int iPixelFormat)
 	//Function to set the current display pixel format. HDMI only .
typedef int(*LSADL_DISPLAY_ODCLOCKINFO_GET)(int, ADLAdapterODClockInfo *);
	//ADL_Display_ODClockInfo_Get (int iAdapterIndex, ADLAdapterODClockInfo *lpOdClockInfo)
 	//Function to retrieve the OD clock information.
typedef int(*LSADL_DISPLAY_ODCLOCKCONFIG_SET)(int, ADLAdapterODClockConfig *);
	//ADL_Display_ODClockConfig_Set (int iAdapterIndex, ADLAdapterODClockConfig *lpOdClockConfig)
 	//Function to set the OD clock configuration.
typedef int(*LSADL_DISPLAY_ADJUSTMENTCOHERENT_GET)(int, int, int *, int *);
	//ADL_Display_AdjustmentCoherent_Get (int iAdapterIndex, int iDisplayIndex, int *lpAdjustmentCoherentCurrent, int *lpAdjustmentCoherentDefault)
 	//Function to retrieve the adjustment coherent setting.
typedef int(*LSADL_DISPLAY_ADJUSTMENTCOHERENT_SET)(int, int, int);
	//ADL_Display_AdjustmentCoherent_Set (int iAdapterIndex, int iDisplayIndex, int iAdjustmentCoherent)
 	//Function to set the adjustment coherent setting.
typedef int(*LSADL_DISPLAY_REDUCEDBLANKING_GET)(int, int, int *, int *);
	//ADL_Display_ReducedBlanking_Get (int iAdapterIndex, int iDisplayIndex, int *lpReducedBlankingCurrent, int *lpReducedBlankingDefault)
 	//Function to retrieve the reduced blanking setting.
typedef int(*LSADL_DISPLAY_REDUCEDBLANKING_SET)(int, int, int);
	//ADL_Display_ReducedBlanking_Set (int iAdapterIndex, int iDisplayIndex, int iReducedBlanking)
 	//Function to set the reduced blanking setting.
typedef int(*LSADL_DISPLAY_FORMATSOVERRIDE_GET)(int, int, int *, int *, int *);
	//ADL_Display_FormatsOverride_Get (int iAdapterIndex, int iDisplayIndex, int *lpSettingsSupported, int *lpSettingsSupportedEx, int *lpCurSettings)
 	//Function to retrieve the available display formats.
typedef int(*LSADL_DISPLAY_FORMATSOVERRIDE_SET)(int, int, int);
	//ADL_Display_FormatsOverride_Set (int iAdapterIndex, int iDisplayIndex, int iOverrideSettings)
 	//Function to overide the display formats.
typedef int(*LSADL_DISPLAY_MVPUCAPS_GET)(int, ADLMVPUCaps *);
	//ADL_Display_MVPUCaps_Get (int iAdapterIndex, ADLMVPUCaps *lpMvpuCaps)
 	//Function to retrieve the information about MultiVPU capabilities.
typedef int(*LSADL_DISPLAY_MVPUSTATUS_GET)(int, ADLMVPUStatus *);
	//ADL_Display_MVPUStatus_Get (int iAdapterIndex, ADLMVPUStatus *lpMvpuStatus)
 	//Function to retrieve information about MultiVPU status.
// #Eyefinity APIs
typedef int(*LSADL_ADAPTER_ACTIVE_SET)(int, int, int *);
	//ADL_Adapter_Active_Set (int iAdapterIndex, int iStatus, int *lpNewlyActivate)
 	//Function to set the current extended desktop mode status for a display.
typedef int(*LSADL_ADAPTER_ACTIVE_SETPREFER)(int, int, int, ADLDisplayTarget *, int *);
	//ADL_Adapter_Active_SetPrefer (int iAdapterIndex, int iStatus, int iNumPreferTarget, ADLDisplayTarget *lpPreferTarget, int *lpNewlyActivate)
 	//Function to set the current extended desktop mode status for the display.
typedef int(*LSADL_ADAPTER_PRIMARY_GET)(int *);
	//ADL_Adapter_Primary_Get (int *lpPrimaryAdapterIndex)
 	//Function to retrieve the primary display adapter index.
typedef int(*LSADL_ADAPTER_PRIMARY_SET)(int);
	//ADL_Adapter_Primary_Set (int iAdapterIndex)
 	//Function to set the primary display adapter index.
typedef int(*LSADL_ADAPTER_MODESWITCH)(int);
	//ADL_Adapter_ModeSwitch (int iAdapterIndex)
 	//Function to perform a mode switch for an adapter.
typedef int(*LSADL_DISPLAY_MODES_GET)(int, int, int *, ADLMode **);
	//ADL_Display_Modes_Get (int iAdapterIndex, int iDisplayIndex, int *lpNumModes, ADLMode **lppModes)
 	//Function to retrieve the display mode information.
typedef int(*LSADL_DISPLAY_MODES_SET)(int, int, int, ADLMode *);
	//ADL_Display_Modes_Set (int iAdapterIndex, int iDisplayIndex, int iNumModes, ADLMode *lpModes)
 	//Function to set display mode information.
typedef int(*LSADL_DISPLAY_POSSIBLEMODE_GET)(int, int *, ADLMode **);
	//ADL_Display_PossibleMode_Get (int iAdapterIndex, int *lpNumModes, ADLMode **lppModes)
 	//Function to retrieve the OS possible modes list for an adapter (all OS platforms).
typedef int(*LSADL_DISPLAY_FORCIBLEDISPLAY_GET)(int, int, int *);
	//ADL_Display_ForcibleDisplay_Get (int iAdapterIndex, int iDisplayIndex, int *lpStatus)
 	//Function to retrieve the forcible connected status of a display.
typedef int(*LSADL_DISPLAY_FORCIBLEDISPLAY_SET)(int, int, int);
	//ADL_Display_ForcibleDisplay_Set (int iAdapterIndex, int iDisplayIndex, int iStatus)
 	//Function to set the forcible connected status of a display.
typedef int(*LSADL_ADAPTER_NUMBEROFACTIVATABLESOURCES_GET)(int, int *, ADLActivatableSource **);
	//ADL_Adapter_NumberOfActivatableSources_Get (int iAdapterIndex, int *lpNumSources, ADLActivatableSource **lppSources)
 	//Function to retrieve the number of Activatable sources based on ADL Index.
typedef int(*LSADL_ADAPTER_DISPLAY_CAPS)(int, int *, ADLAdapterDisplayCap **);
	//ADL_Adapter_Display_Caps (int iAdapterIndex, int *lpNumDisplayCaps, ADLAdapterDisplayCap **lppAdapterDisplayCaps)
 	//Function to retrieve the adapter display manner capabilities based on ADL index.
typedef int(*LSADL_DISPLAY_DISPLAYMAPCONFIG_GET)(int, int *, ADLDisplayMap **, int *, ADLDisplayTarget **, int);
	//ADL_Display_DisplayMapConfig_Get (int iAdapterIndex, int *lpNumDisplayMap, ADLDisplayMap **lppDisplayMap, int *lpNumDisplayTarget,
	//ADLDisplayTarget **lppDisplayTarget, int iOptions)
 	//Function to retrieve current display map configurations.
typedef int(*LSADL_DISPLAY_DISPLAYMAPCONFIG_SET)(int, int, ADLDisplayMap *, int, ADLDisplayTarget *);
	//ADL_Display_DisplayMapConfig_Set (int iAdapterIndex, int iNumDisplayMap, ADLDisplayMap *lpDisplayMap, int iNumDisplayTarget, ADLDisplayTarget *lpDisplayTarget)
 	//Function to set the current display configuration.
typedef int(*LSADL_DISPLAY_POSSIBLEMAPPING_GET)(int, int, ADLPossibleMapping *, int, int *, ADLPossibleMapping **);
	//ADL_Display_PossibleMapping_Get (int iAdapterIndex, int iNumberOfPresetMapping, ADLPossibleMapping *lpPresetMappings, int iEnquiryControllerIndex,
	//int *lpNumberOfEnquiryPossibleMappings, ADLPossibleMapping **lppEnquiryPossibleMappings)
 	//Function to retrieve the possible display mappings.
typedef int(*LSADL_DISPLAY_DISPLAYMAPCONFIG_VALIDATE)(int, int, ADLPossibleMap *, int *, ADLPossibleMapResult **);
	//ADL_Display_DisplayMapConfig_Validate (int iAdapterIndex, int iNumPossibleMap, ADLPossibleMap *lpPossibleMaps, int *lpNumPossibleMapResult,
	//ADLPossibleMapResult **lppPossibleMapResult)
 	//Function to validate the list of the display configurations based on ADL Index.
typedef int(*LSADL_DISPLAY_DISPLAYMAPCONFIG_POSSIBLEADDANDREMOVE)(int, int, ADLDisplayMap *, int, ADLDisplayTarget *, int *, ADLDisplayTarget **, int *, ADLDisplayTarget **);
	//ADL_Display_DisplayMapConfig_PossibleAddAndRemove (int iAdapterIndex, int iNumDisplayMap, ADLDisplayMap *lpDisplayMap, int iNumDisplayTarget,
	//ADLDisplayTarget *lpDisplayTarget, int *lpNumPossibleAddTarget, ADLDisplayTarget **lppPossibleAddTarget, int *lpNumPossibleRemoveTarget, ADLDisplayTarget **lppPossibleRemoveTarget)
 	//Function to validate a list of display configurations.
typedef int(*LSADL_DISPLAY_SLSGRID_CAPS)(int, int *, ADLSLSGrid **, int);
	//ADL_Display_SLSGrid_Caps (int iAdapterIndex, int *lpNumSLSGrid, ADLSLSGrid **lppSLSGrid, int iOption)
 	//Function to get the current supported SLS grid patterns (MxN) for a GPU.
typedef int(*LSADL_DISPLAY_SLSMAPINDEXLIST_GET)(int, int *, int **, int);
	//ADL_Display_SLSMapIndexList_Get (int iAdapterIndex, int *lpNumSLSMapIndexList, int **lppSLSMapIndexList, int iOptions)
 	//Function to get the active SLS map index list for a given GPU.
typedef int(*LSADL_DISPLAY_SLSMAPINDEX_GET)(int, int, ADLDisplayTarget *, int *);
	//ADL_Display_SLSMapIndex_Get (int iAdapterIndex, int iADLNumDisplayTarget, ADLDisplayTarget *lpDisplayTarget, int *lpSLSMapIndex)
 	//Function to get the SLS map index for a given adapter and a given display device.
typedef int(*LSADL_DISPLAY_SLSMAPCONFIG_GET)(int, int, ADLSLSMap *, int *, ADLSLSTarget **, int *, ADLSLSMode **, int *, ADLBezelTransientMode **, int *, ADLBezelTransientMode **,
	int *, ADLSLSOffset **, int);
	//ADL_Display_SLSMapConfig_Get (int iAdapterIndex, int iSLSMapIndex, ADLSLSMap *lpSLSMap, int *lpNumSLSTarget, ADLSLSTarget **lppSLSTarget, int *lpNumNativeMode,
	//ADLSLSMode **lppNativeMode, int *lpNumBezelMode, ADLBezelTransientMode **lppBezelMode, int *lpNumTransientMode, ADLBezelTransientMode **lppTransientMode,
	//int *lpNumSLSOffset, ADLSLSOffset **lppSLSOffset, int iOption)
 	//Function to retrieve an SLS configuration.
typedef int(*LSADL_DISPLAY_SLSMAPCONFIG_CREATE)(int, ADLSLSMap, int, ADLSLSTarget *, int, int *, int);
	//ADL_Display_SLSMapConfig_Create (int iAdapterIndex, ADLSLSMap SLSMap, int iNumTargetTarget, ADLSLSTarget *lpSLSTarget, int iBezelModePercent,
	//int *lpSLSMapIndex, int iOption)
 	//Function to create an SLS configuration.
typedef int(*LSADL_DISPLAY_SLSMAPCONFIG_DELETE)(int, int);
	//ADL_Display_SLSMapConfig_Delete (int iAdapterIndex, int iSLSMapIndex)
 	//Function to delete an SLS map from the driver database.
typedef int(*LSADL_DISPLAY_SLSMAPCONFIG_SETSTATE)(int, int, int);
	//ADL_Display_SLSMapConfig_SetState (int iAdapterIndex, int iSLSMapIndex, int iState)
 	//Function to enable/disable SLS bind.
typedef int(*LSADL_DISPLAY_SLSMAPCONFIG_REARRANGE)(int, int, int, ADLSLSTarget *, ADLSLSMap, int);
	//ADL_Display_SLSMapConfig_Rearrange (int iAdapterIndex, int iSLSMapIndex, int iNumDisplayTarget, ADLSLSTarget *lpSLSTarget, ADLSLSMap slsMap, int iOption)
 	//Function to rearrange display orders in an SLS map.
typedef int(*LSADL_DISPLAY_POSSIBLEMODE_WINXP_GET)(int, int, ADLDisplayTarget *, int, int, int *, ADLMode **);
	//ADL_Display_PossibleMode_WinXP_Get (int iAdapterIndex, int iNumDisplayTargets, ADLDisplayTarget *lpDisplayTargets, int iLargeDesktopSupportedType,
	//int iDevicePanningControl, int *lpNumModes, ADLMode **lppModes)
 	//Function to retrieve the ATI possible modes list for an adapter and preset mapping (Windows XP).
typedef int(*LSADL_DISPLAY_BEZELOFFSETSTEPPINGSIZE_GET)(int, int *, ADLBezelOffsetSteppingSize **);
	//ADL_Display_BezelOffsetSteppingSize_Get (int iAdapterIndex, int *lpNumBezelOffsetSteppingSize, ADLBezelOffsetSteppingSize **lppBezelOffsetSteppingSize)
 	//Get bezel offset stepping size for the input adapter.
typedef int(*LSADL_DISPLAY_BEZELOFFSET_SET)(int, int, int, LPADLSLSOffset, ADLSLSMap, int);
	//ADL_Display_BezelOffset_Set (int iAdapterIndex, int iSLSMapIndex, int iNumBezelOffset, LPADLSLSOffset lpBezelOffset, ADLSLSMap SLSMap, int iOption)
 	//Set SLS bezel offsets for each display index.
typedef int(*LSADL_DISPLAY_BEZELSUPPORTED_VALIDATE)(int, int, LPADLPossibleSLSMap, int *, LPADLPossibleMapResult *);
	//ADL_Display_BezelSupported_Validate (int iAdapterIndex, int iNumPossibleSLSMap, LPADLPossibleSLSMap lpPossibleSLSMaps, int *lpNumPossibleSLSMapResult,
	//LPADLPossibleMapResult *lppPossibleMapResult)
 	//Validate the list of the SLS display configurations to determine if bezel is supported or not.
// #Color related APIs
typedef int(*LSADL_DISPLAY_COLORCAPS_GET)(int, int, int *, int *);
	//ADL_Display_ColorCaps_Get (int iAdapterIndex, int iDisplayIndex, int *lpCaps, int *lpValids)
 	//Function to get the Color Caps display information.
typedef int(*LSADL_DISPLAY_COLOR_SET)(int, int, int, int);
	//ADL_Display_Color_Set (int iAdapterIndex, int iDisplayIndex, int iColorType, int iCurrent)
 	//Function to set the current value of a specific color and type.
typedef int(*LSADL_DISPLAY_COLOR_GET)(int, int, int, int *, int *, int *, int *, int *);
	//ADL_Display_Color_Get (int iAdapterIndex, int iDisplayIndex, int iColorType, int *lpCurrent, int *lpDefault, int *lpMin, int *lpMax, int *lpStep)
 	//Function to retrieve the detailed information a specified display color item.
typedef int(*LSADL_DISPLAY_COLORTEMPERATURESOURCE_GET)(int, int, int *);
	//ADL_Display_ColorTemperatureSource_Get (int iAdapterIndex, int iDisplayIndex, int *lpTempSource)
 	//Function to get color temperature source.
typedef int(*LSADL_DISPLAY_COLORTEMPERATURESOURCE_SET)(int, int, int);
	//ADL_Display_ColorTemperatureSource_Set (int iAdapterIndex, int iDisplayIndex, int iTempSource)
 	//Function to set the color temperature source.
// #Timing Override APIs
typedef int(*LSADL_DISPLAY_MODETIMINGOVERRIDE_GET)(int, int, ADLDisplayMode *, ADLDisplayModeInfo *);
	//ADL_Display_ModeTimingOverride_Get (int iAdapterIndex, int iDisplayIndex, ADLDisplayMode *lpModeIn, ADLDisplayModeInfo *lpModeInfoOut)
 	//Function to retrieve display mode timing override information.
typedef int(*LSADL_DISPLAY_MODETIMINGOVERRIDE_SET)(int, int, ADLDisplayModeInfo *, int);
	//ADL_Display_ModeTimingOverride_Set (int iAdapterIndex, int iDisplayIndex, ADLDisplayModeInfo *lpMode, int iForceUpdate)
 	//Function to set display mode timing override information.
typedef int(*LSADL_DISPLAY_MODETIMINGOVERRIDELIST_GET)(int, int, int, ADLDisplayModeInfo *, int *);
	//ADL_Display_ModeTimingOverrideList_Get (int iAdapterIndex, int iDisplayIndex, int iMaxNumOfOverrides, ADLDisplayModeInfo *lpModeInfoList, int *lpNumOfOverrides)
 	//Function to get the display mode timing override list.
// #Customized Modes APIs
typedef int(*LSADL_DISPLAY_CUSTOMIZEDMODELISTNUM_GET)(int, int, int *);
	//ADL_Display_CustomizedModeListNum_Get (int iAdapterIndex, int iDisplayIndex, int *lpListNum)
 	//Function to retrieve the number of customized modes.
typedef int(*LSADL_DISPLAY_CUSTOMIZEDMODELIST_GET)(int, int, ADLCustomMode *, int);
	//ADL_Display_CustomizedModeList_Get (int iAdapterIndex, int iDisplayIndex, ADLCustomMode *lpCustomModeList, int iBuffSize)
 	//Function to retrieve the customized mode list.
typedef int(*LSADL_DISPLAY_CUSTOMIZEDMODE_ADD)(int, int, ADLCustomMode);
	//ADL_Display_CustomizedMode_Add (int iAdapterIndex, int iDisplayIndex, ADLCustomMode customMode)
 	//Function to add a customized mode.
typedef int(*LSADL_DISPLAY_CUSTOMIZEDMODE_DELETE)(int, int, int);
	//ADL_Display_CustomizedMode_Delete (int iAdapterIndex, int iDisplayIndex, int iIndex)
 	//Function to delete a customized mode.
typedef int(*LSADL_DISPLAY_CUSTOMIZEDMODE_VALIDATE)(int, int, ADLCustomMode, int *);
	//ADL_Display_CustomizedMode_Validate (int iAdapterIndex, int iDisplayIndex, ADLCustomMode customMode, int *lpValid)
 	//Function to validate a customized mode.
// #Overscan/Underscan APIs
typedef int(*LSADL_DISPLAY_UNDERSCAN_SET)(int, int, int);
	//ADL_Display_Underscan_Set (int iAdapterIndex, int iDisplayIndex, int iCurrent)
 	//Function to set the current value of underscan.
typedef int(*LSADL_DISPLAY_UNDERSCAN_GET)(int, int, int *, int *, int *, int *, int *);
	//ADL_Display_Underscan_Get (int iAdapterIndex, int iDisplayIndex, int *lpCurrent, int *lpDefault, int *lpMin, int *lpMax, int *lpStep)
 	//Function to retrieve the detailed information for underscan.
typedef int(*LSADL_DISPLAY_OVERSCAN_SET)(int, int, int);
	//ADL_Display_Overscan_Set (int iAdapterIndex, int iDisplayIndex, int iCurrent)
 	//Function to set the current value of gamma for each controller.
typedef int(*LSADL_DISPLAY_OVERSCAN_GET)(int, int, int *, int *, int *, int *, int *);
	//ADL_Display_Overscan_Get (int iAdapterIndex, int iDisplayIndex, int *lpCurrent, int *lpDefualt, int *lpMin, int *lpMax, int *lpStep)
 	//Function to retrieve the current value of gamma for each controller.
// #Overlay APIs
typedef int(*LSADL_DISPLAY_CONTROLLEROVERLAYADJUSTMENTCAPS_GET)(int, ADLControllerOverlayInput *, ADLControllerOverlayInfo *);
	//ADL_Display_ControllerOverlayAdjustmentCaps_Get (int iAdapterIndex, ADLControllerOverlayInput *lpOverlayInput, ADLControllerOverlayInfo *lpCapsInfo)
 	//Function to get the minimum, maximum, and default values of an overlay adjustment.
typedef int(*LSADL_DISPLAY_CONTROLLEROVERLAYADJUSTMENTDATA_GET)(int, ADLControllerOverlayInput *);
	//ADL_Display_ControllerOverlayAdjustmentData_Get (int iAdapterIndex, ADLControllerOverlayInput *lpOverlay)
 	//Function to retrieve the current setting of an overlay adjustment.
typedef int(*LSADL_DISPLAY_CONTROLLEROVERLAYADJUSTMENTDATA_SET)(int, ADLControllerOverlayInput *);
	//ADL_Display_ControllerOverlayAdjustmentData_Set (int iAdapterIndex, ADLControllerOverlayInput *lpOverlay)
 	//Function to set the current setting of an overlay adjustment.
// #PowerXpress APIs
typedef int(*LSADL_DISPLAY_POWERXPRESSVERSION_GET)(int, int *);
	//ADL_Display_PowerXpressVersion_Get (int iAdapterIndex, int *lpVersion)
 	//Function to retrieve the PowerXpress version.
typedef int(*LSADL_DISPLAY_POWERXPRESSACTIVEGPU_GET)(int, int *);
	//ADL_Display_PowerXpressActiveGPU_Get (int iAdapterIndex, int *lpActiveGPU)
 	//Function to get the active GPU in PowerXpress.
typedef int(*LSADL_DISPLAY_POWERXPRESSACTIVEGPU_SET)(int, int, int *);
	//ADL_Display_PowerXpressActiveGPU_Set (int iAdapterIndex, int iActiveGPU, int *lpOperationResult)
 	//Function to set the active GPU in PowerXpress.
typedef int(*LSADL_DISPLAY_POWERXPRESS_AUTOSWITCHCONFIG_GET)(int, int *, int *);
	//ADL_Display_PowerXpress_AutoSwitchConfig_Get (int iAdapterIndex, int *lpAutoSwitchOnACDCEvent, int *lpAutoSwitchOnDCACEvent)
 	//Function to retrieve the auto switch configuration setting for PowerXpress.
typedef int(*LSADL_DISPLAY_POWERXPRESS_AUTOSWITCHCONFIG_SET)(int, int, int);
	//ADL_Display_PowerXpress_AutoSwitchConfig_Set (int iAdapterIndex, int iAutoSwitchOnACDCEvent, int iAutoSwitchOnDCACEvent)
 	//Function to set the auto switch configuration setting for PowerXpress.
// #Digital Flat Panel APIs
typedef int(*LSADL_DFP_BASEAUDIOSUPPORT_GET)(int, int, int *);
	//ADL_DFP_BaseAudioSupport_Get (int iAdapterIndex, int iDisplayIndex, int *lpSupport)
 	//Function to get the display base audio support.
typedef int(*LSADL_DFP_HDMISUPPORT_GET)(int, int, int *);
	//ADL_DFP_HDMISupport_Get (int iAdapterIndex, int iDisplayIndex, int *lpSupport)
 	//Function to get the display HDMI support.
typedef int(*LSADL_DFP_MVPUANALOGSUPPORT_GET)(int, int, int *);
	//ADL_DFP_MVPUAnalogSupport_Get (int iAdapterIndex, int iDisplayIndex, int *lpSupport)
 	//Function to get the display MVPU analog support.
typedef int(*LSADL_DFP_PIXELFORMAT_CAPS)(int, int, int *, int *);
	//ADL_DFP_PixelFormat_Caps (int iAdapterIndex, int iDisplayIndex, int *lpValidBits, int *lpValidCaps)
 	//Function to retrieve PixelFormat caps.
typedef int(*LSADL_DFP_PIXELFORMAT_GET)(int, int, int *, int *);
	//ADL_DFP_PixelFormat_Get (int iAdapterIndex, int iDisplayIndex, int *lpCurState, int *lpDefault)
 	//Function to retrieve current pixel format setting.
typedef int(*LSADL_DFP_PIXELFORMAT_SET)(int, int, int);
	//ADL_DFP_PixelFormat_Set (int iAdapterIndex, int iDisplayIndex, int iState)
 	//Function to set the current pixel format setting.
typedef int(*LSADL_DFP_GPUSCALINGENABLE_GET)(int, int, int *, int *, int *);
	//ADL_DFP_GPUScalingEnable_Get (int iAdapterIndex, int iDisplayIndex, int *lpSupport, int *lpCurrent, int *lpDefault)
 	//Function to get the GPUScalingEnable setting.
typedef int(*LSADL_DFP_GPUSCALINGENABLE_SET)(int, int, int);
	//ADL_DFP_GPUScalingEnable_Set (int iAdapterIndex, int iDisplayIndex, int iCurrent)
 	//Function to set the GPUScalingEnable setting.
typedef int(*LSADL_DFP_ALLOWONLYCETIMINGS_GET)(int, int, int *, int *, int *);
	//ADL_DFP_AllowOnlyCETimings_Get (int iAdapterIndex, int iDisplayIndex, int *lpSupport, int *lpCurrent, int *lpDefault)
 	//Function to get the Allow Only CE Timings setting.
typedef int(*LSADL_DFP_ALLOWONLYCETIMINGS_SET)(int, int, int);
	//ADL_DFP_AllowOnlyCETimings_Set (int iAdapterIndex, int iDisplayIndex, int iCurrent)
 	//Function to set the Allow Only CE Timings setting.
// #TV APIs
typedef int(*LSADL_DISPLAY_TVCAPS_GET)(int, int, int *);
	//ADL_Display_TVCaps_Get (int iAdapterIndex, int iDisplayIndex, int *lpcaps)
 	//Function to retrieve the TV Caps display information.
typedef int(*LSADL_TV_STANDARD_SET)(int, int, int);
	//ADL_TV_Standard_Set (int iAdapterIndex, int iDisplayIndex, int iCurrent)
 	//Function to set the TV standard.
typedef int(*LSADL_TV_STANDARD_GET)(int, int, int *, int *, int *);
	//ADL_TV_Standard_Get (int iAdapterIndex, int iDisplayIndex, int *lpCurrent, int *lpDefault, int *lpSupportedStandards)
 	//Function to retrieve the TV standard.
// #Component Video APIs
typedef int(*LSADL_CV_DONGLESETTINGS_GET)(int, int, int *, int *, int *);
	//ADL_CV_DongleSettings_Get (int iAdapterIndex, int iDisplayIndex, int *lpDongleSetting, int *lpOverrideSettingsSupported, int *lpCurOverrideSettings)
 	//Function to retrieve the settings of the CV dongle.
typedef int(*LSADL_CV_DONGLESETTINGS_SET)(int, int, int);
	//ADL_CV_DongleSettings_Set (int iAdapterIndex, int iDisplayIndex, int iOverrideSettings)
 	//Function to set the current CV dongle settings.
typedef int(*LSADL_CV_DONGLESETTINGS_RESET)(int, int);
	//ADL_CV_DongleSettings_Reset (int iAdapterIndex, int iDisplayIndex)
 	//Function to reset the CV settings to its default settings.
// #Overdrive5 APIs
typedef int(*LSADL_OD5_CURRENTACTIVITY_GET)(int, ADLPMActivity *);
	//ADL_Overdrive5_CurrentActivity_Get (int iAdapterIndex, ADLPMActivity *lpActivity)
 	//Function to retrieve current power management-related activity.
typedef int(*LSADL_OD5_THERMALDEVICES_ENUM)(int, int, ADLThermalControllerInfo *);
	//ADL_Overdrive5_ThermalDevices_Enum (int iAdapterIndex, int iThermalControllerIndex, ADLThermalControllerInfo *lpThermalControllerInfo)
 	//Function to retrieve thermal devices information.
typedef int(*LSADL_OD5_TEMPERATURE_GET)(int, int, ADLTemperature *);
	//ADL_Overdrive5_Temperature_Get (int iAdapterIndex, int iThermalControllerIndex, ADLTemperature *lpTemperature)
 	//Function to retrieve thermal controller temperatures.
typedef int(*LSADL_OD5_FANSPEEDINFO_GET)(int, int, ADLFanSpeedInfo *);
	//ADL_Overdrive5_FanSpeedInfo_Get (int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedInfo *lpFanSpeedInfo)
 	//Function to retrieve the fan speed reporting capability for thermal controllers.
typedef int(*LSADL_OD5_FANSPEED_GET)(int, int, ADLFanSpeedValue *);
	//ADL_Overdrive5_FanSpeed_Get (int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue)
 	//Function to retrieve the fan speed reported by the thermal controller.
typedef int(*LSADL_OD5_FANSPEED_SET)(int, int, ADLFanSpeedValue *);
	//ADL_Overdrive5_FanSpeed_Set (int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue)
 	//Function to set the fan speed.
typedef int(*LSADL_OD5_FANSPEEDTODEFAULT_SET)(int, int);
	//ADL_Overdrive5_FanSpeedToDefault_Set (int iAdapterIndex, int iThermalControllerIndex)
 	//Function to set the fan speed to the default fan speed value.
typedef int(*LSADL_OD5_ODPARAMETERS_GET)(int, ADLODParameters *);
	//ADL_Overdrive5_ODParameters_Get (int iAdapterIndex, ADLODParameters *lpOdParameters)
 	//Function to retrieve the current Overdrive parameters.
typedef int(*LSADL_OD5_ODPERFORMANCELEVELS_GET)(int, int, ADLODPerformanceLevels *);
	//ADL_Overdrive5_ODPerformanceLevels_Get (int iAdapterIndex, int iDefault, ADLODPerformanceLevels *lpOdPerformanceLevels)
 	//Function to retrieve the current or default Overdrive performance levels.
typedef int(*LSADL_OD5_ODPERFORMANCELEVELS_SET)(int, ADLODPerformanceLevels *);
	//ADL_Overdrive5_ODPerformanceLevels_Set (int iAdapterIndex, ADLODPerformanceLevels *lpOdPerformanceLevels)
 	//Function to set the current Overdrive performance levels.
// #I2C, DDC and EDID APIs
typedef int(*LSADL_DISPLAY_WRITEANDREADI2CREV_GET)(int, int *, int *);
	//ADL_Display_WriteAndReadI2CRev_Get (int iAdapterIndex, int *lpMajor, int *lpMinor)
 	//Function to retrieve the I2C API revision.
typedef int(*LSADL_DISPLAY_WRITEANDREADI2C)(int, ADLI2C *);
	//ADL_Display_WriteAndReadI2C (int iAdapterIndex, ADLI2C *plI2C)
 	//Function to write and read I2C.
typedef int(*LSADL_DISPLAY_DDCBLOCKACCESS_GET)(int, int, int, int, int, char *, int *, char *);
	//ADL_Display_DDCBlockAccess_Get (int iAdapterIndex, int iDisplayIndex, int iOption, int iCommandIndex, int iSendMsgLen,
	//char *lpucSendMsgBuf, int *lpulRecvMsgLen, char *lpucRecvMsgBuf)
 	//Function to get Display DDC block access.
typedef int(*LSADL_DISPLAY_DDCINFO_GET)(int, int, ADLDDCInfo *);
	//ADL_Display_DDCInfo_Get (int iAdapterIndex, int iDisplayIndex, ADLDDCInfo *lpInfo)
 	//Function to get the DDC info.
typedef int(*LSADL_DISPLAY_EDIDDATA_GET)(int, int, ADLDisplayEDIDData *);
	//ADL_Display_EdidData_Get (int iAdapterIndex, int iDisplayIndex, ADLDisplayEDIDData *lpEDIDData)
 	//Function to get the EDID data. 
// #Workstation APIs
typedef int(*LSADL_WORKSTATION_CAPS)(int, int *, int *);
	//ADL_Workstation_Caps (int iAdapterIndex, int *lpValidBits, int *lpCaps)
 	//Function to retrieve current workstation capabilities.
typedef int(*LSADL_WORKSTATION_STEREO_GET)(int, int *, int *);
	//ADL_Workstation_Stereo_Get (int iAdapterIndex, int *lpDefState, int *lpCurState)
 	//Function to retreive the worstation stereo mode.
typedef int(*LSADL_WORKSTATION_STEREO_SET)(int, int);
	//ADL_Workstation_Stereo_Set (int iAdapterIndex, int iCurState)
 	//Function to set the workstation stereo mode.
typedef int(*LSADL_WORKSTATION_ADAPTERNUMOFGLSYNCCONNECTORS_GET)(int, int *);
	//ADL_Workstation_AdapterNumOfGLSyncConnectors_Get (int iAdapterIndex, int *lpNumOfGLSyncConnectors)
 	//Function to retrieve the number of GL-Sync connectors on an adapter.
typedef int(*LSADL_WORKSTATION_DISPLAYGENLOCKCAPABLE_GET)(int, int, int *);
	//ADL_Workstation_DisplayGenlockCapable_Get (int iAdapterIndex, int iDisplayIndex, int *lpCanGenlock)
 	//Function to determine whether or not a display is capable of Genlock functionality.
typedef int(*LSADL_WORKSTATION_GLSYNCMODULEDETECT_GET)(int, int, ADLGLSyncModuleID *);
	//ADL_Workstation_GLSyncModuleDetect_Get (int iAdapterIndex, int iGlSyncConnector, ADLGLSyncModuleID *lpGlSyncModuleID)
 	//Function to detect the GL-Sync module.
typedef int(*LSADL_WORKSTATION_GLSYNCMODULEINFO_GET)(int, int, int *, int *, int *, int *, ADLGLSyncPortCaps **);
	//ADL_Workstation_GLSyncModuleInfo_Get (int iAdapterIndex, int iGlSyncConnector, int *lpNumGLSyncGPUPorts, int *lpNumGlSyncPorts, int *lpMaxSyncDelay,
	//int *lpMaxSampleRate, ADLGLSyncPortCaps **ppGlSyncPorts)
 	//Function to describe the GL-Sync module caps.
typedef int(*LSADL_WORKSTATION_GLSYNCGENLOCKCONFIGURATION_GET)(int, int, int, ADLGLSyncGenlockConfig *);
	//ADL_Workstation_GLSyncGenlockConfiguration_Get (int iAdapterIndex, int iGlSyncConnector, int iGlValidMask, ADLGLSyncGenlockConfig *lpGlSyncGenlockConfig)
 	//Function to retrieve the GL-Sync Genlock configuration settings.
typedef int(*LSADL_WORKSTATION_GLSYNCGENLOCKCONFIGURATION_SET)(int, int, ADLGLSyncGenlockConfig);
	//ADL_Workstation_GLSyncGenlockConfiguration_Set (int iAdapterIndex, int iGlSyncConnector, ADLGLSyncGenlockConfig glSyncGenlockConfig)
 	//Function to set the GL-Sync Genlock configuration settings.
typedef int(*LSADL_WORKSTATION_GLSYNCPORTSTATE_GET)(int, int, int, int, ADLGlSyncPortInfo *, int **);
	//ADL_Workstation_GLSyncPortState_Get (int iAdapterIndex, int iGlSyncConnector, int iGlSyncPortType, int iNumLEDs, ADLGlSyncPortInfo *lpGlSyncPortInfo, int **ppGlSyncLEDs)
 	//Function to retrieve GL-Sync port information.
typedef int(*LSADL_WORKSTATION_GLSYNCPORTSTATE_SET)(int, int, ADLGlSyncPortControl);
	//ADL_Workstation_GLSyncPortState_Set (int iAdapterIndex, int iGlSyncConnector, ADLGlSyncPortControl glSyncPortControl)
 	//Function to perform GL-Sync port control.
typedef int(*LSADL_WORKSTATION_DISPLAYGLSYNCMODE_GET)(int, int, ADLGlSyncMode *);
	//ADL_Workstation_DisplayGLSyncMode_Get (int iAdapterIndex, int iDisplayIndex, ADLGlSyncMode *lpGlSyncMode)
 	//Function to retrieve the GL-Sync mode for a display.
typedef int(*LSADL_WORKSTATION_DISPLAYGLSYNCMODE_SET)(int, int, ADLGlSyncMode);
	//ADL_Workstation_DisplayGLSyncMode_Set (int iAdapterIndex, int iDisplayIndex, ADLGlSyncMode glSyncMode)
 	//Function to set the GL-Sync mode for a display.
typedef int(*LSADL_WORKSTATION_GLSYNCSUPPORTEDTOPOLOGY_GET)(int, int, ADLGlSyncMode2 *, int *, ADLGlSyncMode2 **);
	//ADL_Workstation_GLSyncSupportedTopology_Get (int iAdapterIndex, int iNumSyncModes, ADLGlSyncMode2 *glSyncModes, int *iNumSugSyncModes, ADLGlSyncMode2 **glSugSyncModes)
 	//Function to get the supported GL-Sync topology.
typedef int(*LSADL_WORKSTATION_LOADBALANCING_GET)(int *, int *, int *);
	//ADL_Workstation_LoadBalancing_Get (int *lpResultMask, int *lpCurResultValue, int *lpDefResultValue)
 	//Function to get the load balancing state of the specified adapter.
typedef int(*LSADL_WORKSTATION_LOADBALANCING_SET)(int);
	//ADL_Workstation_LoadBalancing_Set (int iCurState)
 	//Function to set the load balancing state of the specified adapter.
typedef int(*LSADL_WORKSTATION_LOADBALANCING_CAPS)(int, int *, int *);
	//ADL_Workstation_LoadBalancing_Caps (int iAdapterIndex, int *lpResultMask, int *lpResultValue)
 	//Function to set the load balancing capabilities for the specified adapter.
// #Linux Specific APIs
typedef int(*LSADL_ADAPTER_MEMORYINFO_GET)(int, ADLMemoryInfo *);
	//ADL_Adapter_MemoryInfo_Get (int iAdapterIndex, ADLMemoryInfo *lpMemoryInfo)
 	//Function to retrieve memory information from the adapter.
typedef int(*LSADL_CONTROLLER_COLOR_SET)(int, int, ADLGamma);
	//ADL_Controller_Color_Set (int iAdapterIndex, int iControllerIndex, ADLGamma adlGamma)
 	//Function to set the current gamma value for a controller.
typedef int(*LSADL_CONTROLLER_COLOR_GET)(int, int, ADLGamma *, ADLGamma *, ADLGamma *, ADLGamma *);
	//ADL_Controller_Color_Get (int iAdapterIndex, int iControllerIndex, ADLGamma *lpGammaCurrent, ADLGamma *lpGammaDefault, ADLGamma *lpGammaMin, ADLGamma *lpGammaMax)
 	//Function to get the current value of gamma for a controller.
typedef int(*LSADL_DESKTOPCONFIG_GET)(int, int *);
	//ADL_DesktopConfig_Get (int iAdapterIndex, int *lpDesktopConfig)
 	//Function to get the Desktop Configuration.
typedef int(*LSADL_DESKTOPCONFIG_SET)(int, int);
	//ADL_DesktopConfig_Set (int iAdapterIndex, int iDesktopConfig)
 	//Function to set the Desktop Configuration.
typedef int(*LSADL_NUMBEROFDISPLAYENABLE_GET)(int, int *);
	//ADL_NumberOfDisplayEnable_Get (int iAdapterIndex, int *lpNumberOfDisplays)
 	//Function to retrieve the number of enabled displays.
typedef int(*LSADL_DISPLAYENABLE_SET)(int, int *, int, int);
	//ADL_DisplayEnable_Set (int iAdapterIndex, int *lpDisplayIndexList, int iDisplayListSize, int bPersistOnly)
 	//Function to dynamically enable displays on a GPU.
typedef int(*LSADL_DISPLAY_IDENTIFYDISPLAY)(int, int, int, int, int, int, int);
	//ADL_Display_IdentifyDisplay (int iAdapterIndex, int iDisplayIndex, int iDisplayControllerIndex, int iShow, int iDisplayNum, int iPosX, int iPosY)
 	//Function to set the desktop configuration.
typedef int(*LSADL_DISPLAY_LUTCOLOR_SET)(int, int, ADLGamma);
	//ADL_Display_LUTColor_Set (int iAdapterIndex, int iDisplayIndex, ADLGamma adlGamma)
 	//Function to set the current gamma value for a LUT (controller).
typedef int(*LSADL_DISPLAY_LUTCOLOR_GET)(int, int, ADLGamma *, ADLGamma *, ADLGamma *, ADLGamma *);
	//ADL_Display_LUTColor_Get (int iAdapterIndex, int iDisplayIndex, ADLGamma *lpGammaCurrent, ADLGamma *lpGammaDefault, ADLGamma *lpGammaMin, ADLGamma *lpGammaMax)
 	//Function to get the current value of gamma for a LUT (controller).
//NOT DEFINED IN API ?
typedef int(*LSADL_ADAPTER_XSCREENINFO_GET)(LPXScreenInfo, int);
	//ADL_Adapter_XScreenInfo_Get (LPXScreenInfo lpXScreenInfo, int iInputSize)
 	//Function to retrieve all X Screen information for all OS-known adapters.
typedef int(*LSADL_DISPLAY_XRANDRDISPLAYNAME_GET)(int, int, char *, int);
	//ADL_Display_XrandrDisplayName_Get (int iAdapterIndex, int iDisplayIndex, char *lpXrandrDisplayName, int iBuffSize)
 	//Function to retrieve the name of the Xrandr display.


// Placed down here for easy reference

LSADL_MAIN_CONTROL_CREATE          LSADL_Main_Control_Create;
LSADL_MAIN_CONTROL_DESTROY                 LSADL_Main_Control_Destroy;
LSADL_MAIN_CONTROL_REFRESH                 LSADL_Main_Control_Refresh;
LSADL_GRAPHICS_PLATFORM_GET                LSADL_Graphics_Platform_Get;
LSADL_ADAPTER_ACTIVE_GET                   LSADL_Adapter_Active_Get;
LSADL_ADAPTER_NUMBEROFADAPTERS_GET         LSADL_Adapter_NumberOfAdapters_Get;
LSADL_ADAPTER_ADAPTERINFO_GET              LSADL_Adapter_AdapterInfo_Get;
LSADL_ADAPTER_ASICFAMILYTYPE_GET           LSADL_Adapter_ASICFamilyType_Get;
LSADL_ADAPTER_SPEED_CAPS                   LSADL_Adapter_Speed_Caps;
LSADL_ADAPTER_SPEED_GET                    LSADL_Adapter_Speed_Get;
LSADL_ADAPTER_SPEED_SET                    LSADL_Adapter_Speed_Set;
LSADL_ADAPTER_ACCESSIBILITY_GET            LSADL_Adapter_Accessibility_Get;
LSADL_ADAPTER_VIDEOBIOSINFO_GET            LSADL_Adapter_VideoBiosInfo_Get;
LSADL_ADAPTER_ID_GET                       LSADL_Adapter_ID_Get;
LSADL_ADAPTER_CROSSDISPLAYADAPTERROLE_CAPS LSADL_Adapter_CrossdisplayAdapterRole_Caps;
LSADL_ADAPTER_CROSSDISPLAYINFO_GET         LSADL_Adapter_CrossdisplayInfo_Get;
LSADL_ADAPTER_CROSSDISPLAYINFO_SET         LSADL_Adapter_CrossdisplayInfo_Set;
LSADL_ADAPTER_CROSSFIRE_CAPS               LSADL_Adapter_Crossfire_Caps;
LSADL_ADAPTER_CROSSFIRE_GET                LSADL_Adapter_Crossfire_Get;
LSADL_ADAPTER_CROSSFIRE_SET                LSADL_Adapter_Crossfire_Set;
LSADL_DISPLAY_DISPLAYINFO_GET              LSADL_Display_DisplayInfo_Get;
LSADL_DISPLAY_NUMBEROFDISPLAYS_GET         LSADL_Display_NumberOfDisplays_Get;
LSADL_DISPLAY_PRESERVEDASPECTRATIO_GET     LSADL_Display_PreservedAspectRatio_Get;
LSADL_DISPLAY_PRESERVEDASPECTRATIO_SET     LSADL_Display_PreservedAspectRatio_Set;
LSADL_DISPLAY_IMAGEEXPANSION_GET           LSADL_Display_ImageExpansion_Get;
LSADL_DISPLAY_IMAGEEXPANSION_SET           LSADL_Display_ImageExpansion_Set;
LSADL_DISPLAY_POSITION_GET                 LSADL_Display_Position_Get;
LSADL_DISPLAY_POSITION_SET                 LSADL_Display_Position_Set;
LSADL_DISPLAY_SIZE_GET                     LSADL_Display_Size_Get;
LSADL_DISPLAY_SIZE_SET                     LSADL_Display_Size_Set;
LSADL_DISPLAY_ADJUSTCAPS_GET               LSADL_Display_AdjustCaps_Get;
LSADL_DISPLAY_CAPABILITIES_GET             LSADL_Display_Capabilities_Get;
LSADL_DISPLAY_CONNECTEDDISPLAYS_GET        LSADL_Display_ConnectedDisplays_Get;
LSADL_DISPLAY_DEVICECONFIG_GET             LSADL_Display_DeviceConfig_Get;
LSADL_DISPLAY_PROPERTY_GET                 LSADL_Display_Property_Get;
LSADL_DISPLAY_PROPERTY_SET                 LSADL_Display_Property_Set;
LSADL_DISPLAY_SWITCHINGCAPABILITY_GET      LSADL_Display_SwitchingCapability_Get;
LSADL_DISPLAY_DITHERSTATE_GET              LSADL_Display_DitherState_Get;
LSADL_DISPLAY_DITHERSTATE_SET              LSADL_Display_DitherState_Set;
LSADL_DISPLAY_SUPPORTEDPIXELFORMAT_GET     LSADL_Display_SupportedPixelFormat_Get;
LSADL_DISPLAY_PIXELFORMAT_GET              LSADL_Display_PixelFormat_Get;
LSADL_DISPLAY_PIXELFORMAT_SET              LSADL_Display_PixelFormat_Set;
LSADL_DISPLAY_ODCLOCKINFO_GET              LSADL_Display_ODClockInfo_Get;
LSADL_DISPLAY_ODCLOCKCONFIG_SET            LSADL_Display_ODClockConfig_Set;
LSADL_DISPLAY_ADJUSTMENTCOHERENT_GET       LSADL_Display_AdjustmentCoherent_Get;
LSADL_DISPLAY_ADJUSTMENTCOHERENT_SET       LSADL_Display_AdjustmentCoherent_Set;
LSADL_DISPLAY_REDUCEDBLANKING_GET          LSADL_Display_ReducedBlanking_Get;
LSADL_DISPLAY_REDUCEDBLANKING_SET          LSADL_Display_ReducedBlanking_Set;
LSADL_DISPLAY_FORMATSOVERRIDE_GET          LSADL_Display_FormatsOverride_Get;
LSADL_DISPLAY_FORMATSOVERRIDE_SET          LSADL_Display_FormatsOverride_Set;
LSADL_DISPLAY_MVPUCAPS_GET                 LSADL_Display_MVPUCaps_Get;
LSADL_DISPLAY_MVPUSTATUS_GET               LSADL_Display_MVPUStatus_Get;
LSADL_ADAPTER_ACTIVE_SET                   LSADL_Adapter_Active_Set;
LSADL_ADAPTER_ACTIVE_SETPREFER             LSADL_Adapter_Active_SetPrefer;
LSADL_ADAPTER_PRIMARY_GET                  LSADL_Adapter_Primary_Get;
LSADL_ADAPTER_PRIMARY_SET                  LSADL_Adapter_Primary_Set;
LSADL_ADAPTER_MODESWITCH                   LSADL_Adapter_ModeSwitch;
LSADL_DISPLAY_MODES_GET                    LSADL_Display_Modes_Get;
LSADL_DISPLAY_MODES_SET                    LSADL_Display_Modes_Set;
LSADL_DISPLAY_POSSIBLEMODE_GET             LSADL_Display_PossibleMode_Get;
LSADL_DISPLAY_FORCIBLEDISPLAY_GET          LSADL_Display_ForcibleDisplay_Get;
LSADL_DISPLAY_FORCIBLEDISPLAY_SET                    LSADL_Display_ForcibleDisplay_Set;
LSADL_ADAPTER_NUMBEROFACTIVATABLESOURCES_GET         LSADL_Adapter_NumberOfActivatableSources_Get;
LSADL_ADAPTER_DISPLAY_CAPS                           LSADL_Adapter_Display_Caps;
LSADL_DISPLAY_DISPLAYMAPCONFIG_GET                   LSADL_Display_DisplayMapConfig_Get;
LSADL_DISPLAY_DISPLAYMAPCONFIG_SET                   LSADL_Display_DisplayMapConfig_Set;
LSADL_DISPLAY_POSSIBLEMAPPING_GET                    LSADL_Display_PossibleMapping_Get;
LSADL_DISPLAY_DISPLAYMAPCONFIG_VALIDATE              LSADL_Display_DisplayMapConfig_Validate;
LSADL_DISPLAY_DISPLAYMAPCONFIG_POSSIBLEADDANDREMOVE  LSADL_Display_DisplayMapConfig_PossibleAddAndRemove;
LSADL_DISPLAY_SLSGRID_CAPS                           LSADL_Display_SLSGrid_Caps;
LSADL_DISPLAY_SLSMAPINDEXLIST_GET          LSADL_Display_SLSMapIndexList_Get;
LSADL_DISPLAY_SLSMAPINDEX_GET              LSADL_Display_SLSMapIndex_Get;
LSADL_DISPLAY_SLSMAPCONFIG_GET             LSADL_Display_SLSMapConfig_Get;
LSADL_DISPLAY_SLSMAPCONFIG_CREATE          LSADL_Display_SLSMapConfig_Create;
LSADL_DISPLAY_SLSMAPCONFIG_DELETE          LSADL_Display_SLSMapConfig_Delete;
LSADL_DISPLAY_SLSMAPCONFIG_SETSTATE        LSADL_Display_SLSMapConfig_SetState;
LSADL_DISPLAY_SLSMAPCONFIG_REARRANGE       LSADL_Display_SLSMapConfig_Rearrange;
LSADL_DISPLAY_POSSIBLEMODE_WINXP_GET       LSADL_Display_PossibleMode_WinXP_Get;
LSADL_DISPLAY_BEZELOFFSETSTEPPINGSIZE_GET  LSADL_Display_BezelOffsetSteppingSize_Get;
LSADL_DISPLAY_BEZELOFFSET_SET              LSADL_Display_BezelOffset_Set;
LSADL_DISPLAY_BEZELSUPPORTED_VALIDATE      LSADL_Display_BezelSupported_Validate;
LSADL_DISPLAY_COLORCAPS_GET                LSADL_Display_ColorCaps_Get;
LSADL_DISPLAY_COLOR_SET                    LSADL_Display_Color_Set;
LSADL_DISPLAY_COLOR_GET                    LSADL_Display_Color_Get;
LSADL_DISPLAY_COLORTEMPERATURESOURCE_GET   LSADL_Display_ColorTemperatureSource_Get;
LSADL_DISPLAY_COLORTEMPERATURESOURCE_SET   LSADL_Display_ColorTemperatureSource_Set;
LSADL_DISPLAY_MODETIMINGOVERRIDE_GET       LSADL_Display_ModeTimingOverride_Get;
LSADL_DISPLAY_MODETIMINGOVERRIDE_SET       LSADL_Display_ModeTimingOverride_Set;
LSADL_DISPLAY_MODETIMINGOVERRIDELIST_GET   LSADL_Display_ModeTimingOverrideList_Get;
LSADL_DISPLAY_CUSTOMIZEDMODELISTNUM_GET    LSADL_Display_CustomizedModeListNum_Get;
LSADL_DISPLAY_CUSTOMIZEDMODELIST_GET       LSADL_Display_CustomizedModeList_Get;
LSADL_DISPLAY_CUSTOMIZEDMODE_ADD           LSADL_Display_CustomizedMode_Add;
LSADL_DISPLAY_CUSTOMIZEDMODE_DELETE        LSADL_Display_CustomizedMode_Delete;
LSADL_DISPLAY_CUSTOMIZEDMODE_VALIDATE      LSADL_Display_CustomizedMode_Validate;
LSADL_DISPLAY_UNDERSCAN_SET                LSADL_Display_Underscan_Set;
LSADL_DISPLAY_UNDERSCAN_GET                LSADL_Display_Underscan_Get;
LSADL_DISPLAY_OVERSCAN_SET                 LSADL_Display_Overscan_Set;
LSADL_DISPLAY_OVERSCAN_GET                           LSADL_Display_Overscan_Get;
LSADL_DISPLAY_CONTROLLEROVERLAYADJUSTMENTCAPS_GET    LSADL_Display_ControllerOverlayAdjustmentCaps_Get;
LSADL_DISPLAY_CONTROLLEROVERLAYADJUSTMENTDATA_GET    LSADL_Display_ControllerOverlayAdjustmentData_Get;
LSADL_DISPLAY_CONTROLLEROVERLAYADJUSTMENTDATA_SET    LSADL_Display_ControllerOverlayAdjustmentData_Set;
LSADL_DISPLAY_POWERXPRESSVERSION_GET                 LSADL_Display_PowerXpressVersion_Get;
LSADL_DISPLAY_POWERXPRESSACTIVEGPU_GET               LSADL_Display_PowerXpressActiveGPU_Get;
LSADL_DISPLAY_POWERXPRESSACTIVEGPU_SET               LSADL_Display_PowerXpressActiveGPU_Set;
LSADL_DISPLAY_POWERXPRESS_AUTOSWITCHCONFIG_GET       LSADL_Display_PowerXpress_AutoSwitchConfig_Get;
LSADL_DISPLAY_POWERXPRESS_AUTOSWITCHCONFIG_SET       LSADL_Display_PowerXpress_AutoSwitchConfig_Set;
LSADL_DFP_BASEAUDIOSUPPORT_GET                       LSADL_DFP_BaseAudioSupport_Get;
LSADL_DFP_HDMISUPPORT_GET                  LSADL_DFP_HDMISupport_Get;
LSADL_DFP_MVPUANALOGSUPPORT_GET            LSADL_DFP_MVPUAnalogSupport_Get;
LSADL_DFP_PIXELFORMAT_CAPS                 LSADL_DFP_PixelFormat_Caps;
LSADL_DFP_PIXELFORMAT_GET                  LSADL_DFP_PixelFormat_Get;
LSADL_DFP_PIXELFORMAT_SET                  LSADL_DFP_PixelFormat_Set;
LSADL_DFP_GPUSCALINGENABLE_GET             LSADL_DFP_GPUScalingEnable_Get;
LSADL_DFP_GPUSCALINGENABLE_SET             LSADL_DFP_GPUScalingEnable_Set;
LSADL_DFP_ALLOWONLYCETIMINGS_GET           LSADL_DFP_AllowOnlyCETimings_Get;
LSADL_DFP_ALLOWONLYCETIMINGS_SET           LSADL_DFP_AllowOnlyCETimings_Set;
LSADL_DISPLAY_TVCAPS_GET                   LSADL_Display_TVCaps_Get;
LSADL_TV_STANDARD_SET                      LSADL_TV_Standard_Set;
LSADL_TV_STANDARD_GET                      LSADL_TV_Standard_Get;
LSADL_CV_DONGLESETTINGS_GET                LSADL_CV_DongleSettings_Get;
LSADL_CV_DONGLESETTINGS_SET                LSADL_CV_DongleSettings_Set;
LSADL_CV_DONGLESETTINGS_RESET              LSADL_CV_DongleSettings_Reset;
LSADL_OD5_CURRENTACTIVITY_GET              LSADL_OD5_CurrentActivity_Get;
LSADL_OD5_THERMALDEVICES_ENUM              LSADL_OD5_ThermalDevices_Enum;
LSADL_OD5_TEMPERATURE_GET                  LSADL_OD5_Temperature_Get;
LSADL_OD5_FANSPEEDINFO_GET                 LSADL_OD5_FanSpeedInfo_Get;
LSADL_OD5_FANSPEED_GET                     LSADL_OD5_FanSpeed_Get;
LSADL_OD5_FANSPEED_SET                     LSADL_OD5_FanSpeed_Set;
LSADL_OD5_FANSPEEDTODEFAULT_SET            LSADL_OD5_FanSpeedToDefault_Set;
LSADL_OD5_ODPARAMETERS_GET                 LSADL_OD5_ODParameters_Get;
LSADL_OD5_ODPERFORMANCELEVELS_GET          LSADL_OD5_ODPerformanceLevels_Get;
LSADL_OD5_ODPERFORMANCELEVELS_SET          LSADL_OD5_ODPerformanceLevels_Set;
LSADL_DISPLAY_WRITEANDREADI2CREV_GET       LSADL_Display_WriteAndReadI2CRev_Get;
LSADL_DISPLAY_WRITEANDREADI2C              LSADL_Display_WriteAndReadI2C;
LSADL_DISPLAY_DDCBLOCKACCESS_GET           LSADL_Display_DDCBlockAccess_Get;
LSADL_DISPLAY_DDCINFO_GET                  LSADL_Display_DDCInfo_Get;
LSADL_DISPLAY_EDIDDATA_GET                 LSADL_Display_EdidData_Get;
LSADL_WORKSTATION_CAPS                     LSADL_Workstation_Caps;
LSADL_WORKSTATION_STEREO_GET               LSADL_Workstation_Stereo_Get;
LSADL_WORKSTATION_STEREO_SET               LSADL_Workstation_Stereo_Set;
LSADL_WORKSTATION_ADAPTERNUMOFGLSYNCCONNECTORS_GET   LSADL_Workstation_AdapterNumOfGLSyncConnectors_Get;
LSADL_WORKSTATION_DISPLAYGENLOCKCAPABLE_GET          LSADL_Workstation_DisplayGenlockCapable_Get;
LSADL_WORKSTATION_GLSYNCMODULEDETECT_GET             LSADL_Workstation_GLSyncModuleDetect_Get;
LSADL_WORKSTATION_GLSYNCMODULEINFO_GET               LSADL_Workstation_GLSyncModuleInfo_Get;
LSADL_WORKSTATION_GLSYNCGENLOCKCONFIGURATION_GET     LSADL_Workstation_GLSyncGenlockConfiguration_Get;
LSADL_WORKSTATION_GLSYNCGENLOCKCONFIGURATION_SET     LSADL_Workstation_GLSyncGenlockConfiguration_Set;
LSADL_WORKSTATION_GLSYNCPORTSTATE_GET                LSADL_Workstation_GLSyncPortState_Get;
LSADL_WORKSTATION_GLSYNCPORTSTATE_SET                LSADL_Workstation_GLSyncPortState_Set;
LSADL_WORKSTATION_DISPLAYGLSYNCMODE_GET              LSADL_Workstation_DisplayGLSyncMode_Get;
LSADL_WORKSTATION_DISPLAYGLSYNCMODE_SET              LSADL_Workstation_DisplayGLSyncMode_Set;
LSADL_WORKSTATION_GLSYNCSUPPORTEDTOPOLOGY_GET        LSADL_Workstation_GLSyncSupportedTopology_Get;
LSADL_WORKSTATION_LOADBALANCING_GET      LSADL_Workstation_LoadBalancing_Get;
LSADL_WORKSTATION_LOADBALANCING_SET      LSADL_Workstation_LoadBalancing_Set;
LSADL_WORKSTATION_LOADBALANCING_CAPS     LSADL_Workstation_LoadBalancing_Caps;
LSADL_ADAPTER_MEMORYINFO_GET             LSADL_Adapter_MemoryInfo_Get;
LSADL_CONTROLLER_COLOR_SET               LSADL_Controller_Color_Set;
LSADL_CONTROLLER_COLOR_GET               LSADL_Controller_Color_Get;
LSADL_DESKTOPCONFIG_GET                  LSADL_DesktopConfig_Get;
LSADL_DESKTOPCONFIG_SET                  LSADL_DesktopConfig_Set;
LSADL_NUMBEROFDISPLAYENABLE_GET          LSADL_NumberOfDisplayEnable_Get;
LSADL_DISPLAYENABLE_SET                  LSADL_DisplayEnable_Set;
LSADL_DISPLAY_IDENTIFYDISPLAY            LSADL_Display_IdentifyDisplay;
LSADL_DISPLAY_LUTCOLOR_SET               LSADL_Display_LUTColor_Set;
LSADL_DISPLAY_LUTCOLOR_GET               LSADL_Display_LUTColor_Get;
LSADL_ADAPTER_XSCREENINFO_GET            LSADL_Adapter_XScreenInfo_Get;
LSADL_DISPLAY_XRANDRDISPLAYNAME_GET      LSADL_Display_XrandrDisplayName_Get;

struct OverDrive5s{
	ADLPMActivity *lpActivity;
	int iThermalControllerIndex;
	ADLThermalControllerInfo *lpThermalControllerInfo;
	ADLTemperature *lpTemperature;
	ADLFanSpeedInfo *lpFanSpeedInfo;
	ADLFanSpeedValue *lpFanSpeedValue;
	ADLODParameters *lpOdParameters;
	ADLODPerformanceLevels *lpOdPerformanceLevels;
	int iDefault;
};

//void *ADL_Main_Memory_Alloc(int iSize);
//void __stdcall ADL_Main_Memory_Free(void **lpBuffer);
int DL_and_Check(void *hDLL);
//void Read_Default_Perlevels(void);
//void Read_Temperature(void);
void Print_Code(int code);
void *GetProcAddress(void *pLibrary, const char *name);
//void Sleep(int time);
void *__stdcall ADL_Main_Memory_Alloc(int iSize);
void __stdcall ADL_Main_Memory_Free(void **lpBuffer);

#endif