From 09e2b19bc3617e22c8f416f8275f26a90f37804b Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Mon, 7 Jun 2021 21:41:48 +1200 Subject: [PATCH] [WIP] Added initial ADL2_Display_SLSMapConfig_Get() Tried to add the first SLS map config get function into the ADL.cs file, as well as all the supporting data structures. Time will tell whether this will work or not! --- DisplayMagicianShared/AMD/ADL.cs | 434 ++++++++++++++---- .../DisplayMagicianShared.csproj | 5 +- DisplayMagicianShared/ProfileRepository.cs | 25 + 3 files changed, 369 insertions(+), 95 deletions(-) diff --git a/DisplayMagicianShared/AMD/ADL.cs b/DisplayMagicianShared/AMD/ADL.cs index 729e0f1..4c7e785 100644 --- a/DisplayMagicianShared/AMD/ADL.cs +++ b/DisplayMagicianShared/AMD/ADL.cs @@ -40,35 +40,35 @@ namespace ATI.ADL /// ADL Memory allocation function allows ADL to callback for memory allocation /// input size /// retrun ADL Error Code - internal delegate IntPtr ADL_Main_Memory_Alloc (int size); + internal delegate IntPtr ADL2_Main_Memory_Alloc (int size); // ///// ADL Create Function to create ADL Data /// Call back functin pointer which is ised to allocate memeory /// If it is 1, then ADL will only retuen the physical exist adapters ///// retrun ADL Error Code - internal delegate int ADL_Main_Control_Create(ADL_Main_Memory_Alloc callback, int enumConnectedAdapters); + internal delegate int ADL2_Main_Control_Create(ADL2_Main_Memory_Alloc callback, int enumConnectedAdapters); /// ADL Destroy Function to free up ADL Data /// retrun ADL Error Code - internal delegate int ADL_Main_Control_Destroy (); + internal delegate int ADL2_Main_Control_Destroy (); /// ADL Function to get the number of adapters /// return number of adapters /// retrun ADL Error Code - internal delegate int ADL_Adapter_NumberOfAdapters_Get (ref int numAdapters); + internal delegate int ADL2_Adapter_NumberOfAdapters_Get (ref int numAdapters); /// ADL Function to get the GPU adapter information /// return GPU adapter information /// the size of the GPU adapter struct /// retrun ADL Error Code - internal delegate int ADL_Adapter_AdapterInfo_Get (IntPtr info, int inputSize); + internal delegate int ADL2_Adapter_AdapterInfo_Get (IntPtr info, int inputSize); /// Function to determine if the adapter is active or not. /// The function is used to check if the adapter associated with iAdapterIndex is active /// Adapter Index. /// Status of the adapter. True: Active; False: Dsiabled /// Non zero is successfull - internal delegate int ADL_Adapter_Active_Get(int adapterIndex, ref int status); + internal delegate int ADL2_Adapter_Active_Get(int adapterIndex, ref int status); /// Get display information based on adapter index /// Adapter Index @@ -76,12 +76,79 @@ namespace ATI.ADL /// return ADLDisplayInfo Array for supported displays' information /// force detect or not /// return ADL Error Code - internal delegate int ADL_Display_DisplayInfo_Get(int adapterIndex, ref int numDisplays, out IntPtr displayInfoArray, int forceDetect); + internal delegate int ADL2_Display_DisplayInfo_Get(int adapterIndex, ref int numDisplays, out IntPtr displayInfoArray, int forceDetect); + + /// Function to retrieve an SLS configuration. + /// Adapter Index + /// Specifies the SLS map index to be queried. + /// return ADLSLSMap Array for supported displays' information + /// return number of targets in the SLS mapo + /// return ADLSLSTarget Array + /// return the number of native modes + /// return ADLSLSMode Array that contains the native modes + /// return the number of bezel modes + /// return ADLSLSMode Array that contains the bezel modes + /// return the number of transient modes + /// return ADLSLSMode Array that contains the transient modes + /// return the number of SLS offsets + /// return ADLSLSOffset Array that contains the SLS offsets + /// Specifies the layout type of SLS grid data. It is bit vector. There are two types of SLS layout:s, relative to landscape (ref \ADL_DISPLAY_SLSGRID_CAP_OPTION_RELATIVETO_LANDSCAPE) and relative to current angle (ref \ADL_DISPLAY_SLSGRID_CAP_OPTION_RELATIVETO_CURRENTANGLE). + /// return ADL Error Code + internal delegate int ADL2_Display_SLSMapConfig_Get(int adapterIndex, int SLSMapIndex, ref ADLSLSMap SLSMap, ref int numSLSTarget, out IntPtr SLSTargetArray, ref int numNativeMode, + out IntPtr SLSNativeMode, ref int numBezelMode, out IntPtr SLSBezelMode, ref int numTransientMode, out IntPtr SLSTransientMode, ref int numSLSOffset, out IntPtr SLSOffset, int option); #endregion Export Delegates #region Export Struct + #region ADLMode + /// ADLAdapterInfo Array + [StructLayout(LayoutKind.Sequential)] + internal struct ADLMode + { + /// Display IDs. + internal ADLDisplayID DisplayID; + /// Screen refresh rate. + internal float RefreshRate; + /// Adapter index. + internal int AdapterIndex; + /// Screen Color Depth. E.g., 16, 32. + internal int ColourDepth; + /// Vista mode flag indicating Progressive or Interlaced mode. + internal int ModeFlag; + /// The bit mask identifying the number of bits this Mode is currently using. + internal int ModeMask; + /// The bit mask identifying the display status. + internal int ModeValue; + /// Screen orientation. E.g., 0, 90, 180, 270. + internal int Orientation; + /// Screen position X coordinate. + internal int XPos; + /// Screen resolution Width. + internal int XRes; + /// Screen position Y coordinate. + internal int YPos; + /// Screen resolution Height. + internal int YRes; + } + #endregion ADLMode + + #region ADLDisplayTarget + /// ADLDisplayTarget Array + [StructLayout(LayoutKind.Sequential)] + internal struct ADLDisplayTarget + { + /// Display IDs. + internal ADLDisplayID DisplayID; + /// The display map index identify this manner and the desktop surface. + internal int DisplayMapIndex; + /// The bit mask identifies the number of bits DisplayTarget is currently using. + internal int DisplayTargetMask; + /// The bit mask identifies the display status. + internal int DisplayTargetValue; + } + #endregion ADLDisplayTarget + #region ADLAdapterInfo /// ADLAdapterInfo Structure [StructLayout(LayoutKind.Sequential)] @@ -179,6 +246,162 @@ namespace ATI.ADL } #endregion ADLDisplayInfo + #region ADLSLS + + /// ADLSLSGrid Structure + [StructLayout(LayoutKind.Sequential)] + internal struct ADLSLSGrid + { + /// The Adapter index + internal int AdapterIndex; + /// The grid column + internal int SLSGridColumn; + /// The grid index + internal int SLSGridIndex; + /// The grid bit mask identifies the number of bits DisplayMap is currently using. + internal int SLSGridMask; + /// The grid row. + internal int SLSGridRow; + /// The grid bit value identifies the display status. + internal int SLSGridValue; + } + + /// ADLSLSMap Structure + [StructLayout(LayoutKind.Sequential)] + internal struct ADLSLSMap + { + /// The current grid + internal ADLSLSGrid Grid; + /// The Adapter Index + internal int AdapterIndex; + /// The first bezel mode array index in the native mode array + internal int FirstBezelModeArrayIndex; + /// The first bezel offset array index in the native mode array + internal int FirstBezelOffsetArrayIndex; + /// The first native mode array index in the native mode array. + internal int FirstNativeModeArrayIndex; + /// The first target array index in the Target array. + internal int FirstSLSTargetArrayIndex; + /// The number of bezel modes belongs to this map. + internal int NumBezelMode; + /// The number of bezel offsets belongs to this map. + internal int NumBezelOffset; + /// The number of native modes belongs to this map. + internal int NumNativeMode; + /// The number of display targets belongs to this map. + internal int NumSLSTarget; + /// Screen orientation. E.g., 0, 90, 180, 270. + internal int Orientation; + /// The current display map index. It is the OS Desktop index. + internal int SLSMapIndex; + /// Bitmask identifies display map status + internal int SLSMapMask; + /// Bitmask identifies display map status + internal int SLSMapValue; + /// OS Surface Index + internal int SurfaceMapIndex; + } + + /// ADLSLSTarget Structure + [StructLayout(LayoutKind.Sequential)] + internal struct ADLSLSTarget + { + /// The target ID. + internal ADLDisplayTarget DisplayTarget; + /// The Adapter Index + internal int AdapterIndex; + /// Target postion X in SLS grid + internal int SLSGridPositionX; + /// Target postion Y in SLS grid + internal int SLSGridPositionY; + /// The SLS map index. + internal int SLSMapIndex; + /// The bit mask identifies the bits in iSLSTargetValue are currently used. + internal int SLSTargetMask; + /// The bit mask identifies status info. + internal int SLSTargetValue; + /// The view size width, height and rotation angle per SLS Target. + internal ADLMode ViewSize; + } + + /// ADLSLSTarget Array + [StructLayout(LayoutKind.Sequential)] + internal struct ADLSLSTargetArray + { + /// ADLAdapterInfo Array + [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)ADL.ADL_MAX_ADAPTERS)] + internal ADLSLSTarget[] ADLSLSTarget; + } + + /// ADLSLSMode Structure + [StructLayout(LayoutKind.Sequential)] + internal struct ADLSLSMode + { + /// The target ID. + internal ADLMode DisplayMode; + /// The Adapter Index + internal int AdapterIndex; + /// The current display map index. It is the OS Desktop index. + internal int SLSMapIndex; + /// The mode index. + internal int SLSModeIndex; + /// The bit mask identifies the number of bits Mode is currently using. + internal int SLSNativeModeMask; + /// The bit mask identifies the display status. + internal int SLSNativeModeValue; + + } + + /// ADLBezelTransientMode Structure + [StructLayout(LayoutKind.Sequential)] + internal struct ADLBezelTransientMode + { + /// The target ID. + internal ADLMode DisplayMode; + /// The Adapter Index + internal int AdapterIndex; + /// The first bezel offset array index in the native mode array. + internal int FirstBezelOffsetArrayIndex; + /// The number of bezel offsets belongs to this map. + internal int NumBezelOffset; + /// The bit mask identifies the bits this structure is currently using. + internal int SLSBezelTransientModeMask; + /// The bit mask identifies the display status. + internal int SLSBezelTransientModeValue; + /// SLS Map Index. + internal int SLSMapIndex; + /// SLS Mode Index. + internal int SLSModeIndex; + } + + /// ADLSLSOffset Structure + [StructLayout(LayoutKind.Sequential)] + internal struct ADLSLSOffset + { + /// The target ID. + internal ADLMode DisplayMode; + /// The Adapter Index + internal int AdapterIndex; + /// The bit mask identifies the display status. + internal int BezelOffsetValue; + /// SLS Bezel Mode Index. + internal int BezelModeIndex; + /// The bit mask identifies the number of bits Offset is currently using. + internal int BezelOffsetMask; + /// SLS Bezel Offset X. + internal int BezelOffsetX; + /// SLS Bezel Offset Y. + internal int BezelOffsetY; + /// SLS Display Height. + internal int DisplayHeight; + /// SLS Display Width. + internal int DisplayWidth; + /// The current display map index. It is the OS Desktop index. + internal int SLSMapIndex; + } + + #endregion ADLSLS + #endregion Export Struct #region ADL Class @@ -225,28 +448,31 @@ namespace ATI.ADL internal static extern HMODULE GetModuleHandle (string moduleName); [DllImport(Atiadlxx_FileName)] - internal static extern int ADL_Main_Control_Create (ADL_Main_Memory_Alloc callback, int enumConnectedAdapters); + internal static extern int ADL2_Main_Control_Create (ADL2_Main_Memory_Alloc callback, int enumConnectedAdapters); [DllImport(Atiadlxx_FileName)] - internal static extern int ADL_Main_Control_Destroy (); + internal static extern int ADL2_Main_Control_Destroy (); [DllImport(Atiadlxx_FileName)] - internal static extern int ADL_Main_Control_IsFunctionValid (HMODULE module, string procName); + internal static extern int ADL2_Main_Control_IsFunctionValid (HMODULE module, string procName); [DllImport(Atiadlxx_FileName)] - internal static extern FARPROC ADL_Main_Control_GetProcAddress (HMODULE module, string procName); + internal static extern FARPROC ADL2_Main_Control_GetProcAddress (HMODULE module, string procName); [DllImport(Atiadlxx_FileName)] - internal static extern int ADL_Adapter_NumberOfAdapters_Get (ref int numAdapters); + internal static extern int ADL2_Adapter_NumberOfAdapters_Get (ref int numAdapters); [DllImport(Atiadlxx_FileName)] - internal static extern int ADL_Adapter_AdapterInfo_Get (IntPtr info, int inputSize); + internal static extern int ADL2_Adapter_AdapterInfo_Get (IntPtr info, int inputSize); [DllImport(Atiadlxx_FileName)] - internal static extern int ADL_Adapter_Active_Get(int adapterIndex, ref int status); + internal static extern int ADL2_Adapter_Active_Get(int adapterIndex, ref int status); [DllImport(Atiadlxx_FileName)] - internal static extern int ADL_Display_DisplayInfo_Get(int adapterIndex, ref int numDisplays, out IntPtr displayInfoArray, int forceDetect); + internal static extern int ADL2_Display_DisplayInfo_Get(int adapterIndex, ref int numDisplays, out IntPtr displayInfoArray, int forceDetect); + + [DllImport(Atiadlxx_FileName)] + internal static extern int ADL2_Display_SLSMapConfig_Get(int iAdapterIndex, int iSLSMapIndex, ref ADLSLSMap SLSMap, ref int NumSLSTarget, out IntPtr SLSTargetArray, ref int lpNumNativeMode, out IntPtr NativeMode, ref int NumBezelMode, out IntPtr BezelMode, ref int NumTransientMode, out IntPtr TransientMode, ref int NumSLSOffset, out IntPtr SLSOffset, int iOption); #endregion DLLImport } @@ -271,7 +497,7 @@ namespace ATI.ADL { try { - if (1 == ADLImport.ADL_Main_Control_IsFunctionValid(IntPtr.Zero, "ADL_Main_Control_Create")) + if (1 == ADLImport.ADL2_Main_Control_IsFunctionValid(IntPtr.Zero, "ADL2_Main_Control_Create")) { ADLLibrary = ADLImport.GetModuleHandle(ADLImport.Atiadlxx_FileName); } @@ -288,7 +514,7 @@ namespace ATI.ADL { if (System.IntPtr.Zero != ADLCheckLibrary_.ADLLibrary) { - ADLImport.ADL_Main_Control_Destroy(); + ADLImport.ADL2_Main_Control_Destroy(); } } #endregion Destructor @@ -302,7 +528,7 @@ namespace ATI.ADL bool result = false; if (System.IntPtr.Zero != ADLCheckLibrary_.ADLLibrary) { - if (1 == ADLImport.ADL_Main_Control_IsFunctionValid(ADLCheckLibrary_.ADLLibrary, functionName)) + if (1 == ADLImport.ADL2_Main_Control_IsFunctionValid(ADLCheckLibrary_.ADLLibrary, functionName)) { result = true; } @@ -320,7 +546,7 @@ namespace ATI.ADL FARPROC result = System.IntPtr.Zero; if (System.IntPtr.Zero != ADLCheckLibrary_.ADLLibrary) { - result = ADLImport.ADL_Main_Control_GetProcAddress(ADLCheckLibrary_.ADLLibrary, functionName); + result = ADLImport.ADL2_Main_Control_GetProcAddress(ADLCheckLibrary_.ADLLibrary, functionName); } return result; } @@ -330,168 +556,192 @@ namespace ATI.ADL #region Export Functions - #region ADL_Main_Memory_Alloc + #region ADL2_Main_Memory_Alloc /// Build in memory allocation function - internal static ADL_Main_Memory_Alloc ADL_Main_Memory_Alloc = ADL_Main_Memory_Alloc_; + internal static ADL2_Main_Memory_Alloc ADL2_Main_Memory_Alloc = ADL2_Main_Memory_Alloc_; /// Build in memory allocation function /// input size /// return the memory buffer - private static IntPtr ADL_Main_Memory_Alloc_ (int size) + private static IntPtr ADL2_Main_Memory_Alloc_ (int size) { IntPtr result = Marshal.AllocCoTaskMem(size); return result; } - #endregion ADL_Main_Memory_Alloc + #endregion ADL2_Main_Memory_Alloc - #region ADL_Main_Memory_Free + #region ADL2_Main_Memory_Free /// Build in memory free function /// input buffer - internal static void ADL_Main_Memory_Free (IntPtr buffer) + internal static void ADL2_Main_Memory_Free (IntPtr buffer) { if (IntPtr.Zero != buffer) { Marshal.FreeCoTaskMem(buffer); } } - #endregion ADL_Main_Memory_Free + #endregion ADL2_Main_Memory_Free - #region ADL_Main_Control_Create - /// ADL_Main_Control_Create Delegates - internal static ADL_Main_Control_Create ADL_Main_Control_Create + #region ADL2_Main_Control_Create + /// ADL2_Main_Control_Create Delegates + internal static ADL2_Main_Control_Create ADL2_Main_Control_Create { get { - if (!ADL_Main_Control_Create_Check && null == ADL_Main_Control_Create_) + if (!ADL2_Main_Control_Create_Check && null == ADL2_Main_Control_Create_) { - ADL_Main_Control_Create_Check = true; - if (ADLCheckLibrary.IsFunctionValid("ADL_Main_Control_Create")) + ADL2_Main_Control_Create_Check = true; + if (ADLCheckLibrary.IsFunctionValid("ADL2_Main_Control_Create")) { - ADL_Main_Control_Create_ = ADLImport.ADL_Main_Control_Create; + ADL2_Main_Control_Create_ = ADLImport.ADL2_Main_Control_Create; } } - return ADL_Main_Control_Create_; + return ADL2_Main_Control_Create_; } } /// Private Delegate - private static ADL_Main_Control_Create ADL_Main_Control_Create_ = null; + private static ADL2_Main_Control_Create ADL2_Main_Control_Create_ = null; /// check flag to indicate the delegate has been checked - private static bool ADL_Main_Control_Create_Check = false; - #endregion ADL_Main_Control_Create + private static bool ADL2_Main_Control_Create_Check = false; + #endregion ADL2_Main_Control_Create - #region ADL_Main_Control_Destroy - /// ADL_Main_Control_Destroy Delegates - internal static ADL_Main_Control_Destroy ADL_Main_Control_Destroy + #region ADL2_Main_Control_Destroy + /// ADL2_Main_Control_Destroy Delegates + internal static ADL2_Main_Control_Destroy ADL2_Main_Control_Destroy { get { - if (!ADL_Main_Control_Destroy_Check && null == ADL_Main_Control_Destroy_) + if (!ADL2_Main_Control_Destroy_Check && null == ADL2_Main_Control_Destroy_) { - ADL_Main_Control_Destroy_Check = true; - if (ADLCheckLibrary.IsFunctionValid("ADL_Main_Control_Destroy")) + ADL2_Main_Control_Destroy_Check = true; + if (ADLCheckLibrary.IsFunctionValid("ADL2_Main_Control_Destroy")) { - ADL_Main_Control_Destroy_ = ADLImport.ADL_Main_Control_Destroy; + ADL2_Main_Control_Destroy_ = ADLImport.ADL2_Main_Control_Destroy; } } - return ADL_Main_Control_Destroy_; + return ADL2_Main_Control_Destroy_; } } /// Private Delegate - private static ADL_Main_Control_Destroy ADL_Main_Control_Destroy_ = null; + private static ADL2_Main_Control_Destroy ADL2_Main_Control_Destroy_ = null; /// check flag to indicate the delegate has been checked - private static bool ADL_Main_Control_Destroy_Check = false; - #endregion ADL_Main_Control_Destroy + private static bool ADL2_Main_Control_Destroy_Check = false; + #endregion ADL2_Main_Control_Destroy - #region ADL_Adapter_NumberOfAdapters_Get - /// ADL_Adapter_NumberOfAdapters_Get Delegates - internal static ADL_Adapter_NumberOfAdapters_Get ADL_Adapter_NumberOfAdapters_Get + #region ADL2_Adapter_NumberOfAdapters_Get + /// ADL2_Adapter_NumberOfAdapters_Get Delegates + internal static ADL2_Adapter_NumberOfAdapters_Get ADL2_Adapter_NumberOfAdapters_Get { get { - if (!ADL_Adapter_NumberOfAdapters_Get_Check && null == ADL_Adapter_NumberOfAdapters_Get_) + if (!ADL2_Adapter_NumberOfAdapters_Get_Check && null == ADL2_Adapter_NumberOfAdapters_Get_) { - ADL_Adapter_NumberOfAdapters_Get_Check = true; - if (ADLCheckLibrary.IsFunctionValid("ADL_Adapter_NumberOfAdapters_Get")) + ADL2_Adapter_NumberOfAdapters_Get_Check = true; + if (ADLCheckLibrary.IsFunctionValid("ADL2_Adapter_NumberOfAdapters_Get")) { - ADL_Adapter_NumberOfAdapters_Get_ = ADLImport.ADL_Adapter_NumberOfAdapters_Get; + ADL2_Adapter_NumberOfAdapters_Get_ = ADLImport.ADL2_Adapter_NumberOfAdapters_Get; } } - return ADL_Adapter_NumberOfAdapters_Get_; + return ADL2_Adapter_NumberOfAdapters_Get_; } } /// Private Delegate - private static ADL_Adapter_NumberOfAdapters_Get ADL_Adapter_NumberOfAdapters_Get_ = null; + private static ADL2_Adapter_NumberOfAdapters_Get ADL2_Adapter_NumberOfAdapters_Get_ = null; /// check flag to indicate the delegate has been checked - private static bool ADL_Adapter_NumberOfAdapters_Get_Check = false; - #endregion ADL_Adapter_NumberOfAdapters_Get + private static bool ADL2_Adapter_NumberOfAdapters_Get_Check = false; + #endregion ADL2_Adapter_NumberOfAdapters_Get - #region ADL_Adapter_AdapterInfo_Get - /// ADL_Adapter_AdapterInfo_Get Delegates - internal static ADL_Adapter_AdapterInfo_Get ADL_Adapter_AdapterInfo_Get + #region ADL2_Adapter_AdapterInfo_Get + /// ADL2_Adapter_AdapterInfo_Get Delegates + internal static ADL2_Adapter_AdapterInfo_Get ADL2_Adapter_AdapterInfo_Get { get { - if (!ADL_Adapter_AdapterInfo_Get_Check && null == ADL_Adapter_AdapterInfo_Get_) + if (!ADL2_Adapter_AdapterInfo_Get_Check && null == ADL2_Adapter_AdapterInfo_Get_) { - ADL_Adapter_AdapterInfo_Get_Check = true; - if (ADLCheckLibrary.IsFunctionValid("ADL_Adapter_AdapterInfo_Get")) + ADL2_Adapter_AdapterInfo_Get_Check = true; + if (ADLCheckLibrary.IsFunctionValid("ADL2_Adapter_AdapterInfo_Get")) { - ADL_Adapter_AdapterInfo_Get_ = ADLImport.ADL_Adapter_AdapterInfo_Get; + ADL2_Adapter_AdapterInfo_Get_ = ADLImport.ADL2_Adapter_AdapterInfo_Get; } } - return ADL_Adapter_AdapterInfo_Get_; + return ADL2_Adapter_AdapterInfo_Get_; } } /// Private Delegate - private static ADL_Adapter_AdapterInfo_Get ADL_Adapter_AdapterInfo_Get_ = null; + private static ADL2_Adapter_AdapterInfo_Get ADL2_Adapter_AdapterInfo_Get_ = null; /// check flag to indicate the delegate has been checked - private static bool ADL_Adapter_AdapterInfo_Get_Check = false; - #endregion ADL_Adapter_AdapterInfo_Get + private static bool ADL2_Adapter_AdapterInfo_Get_Check = false; + #endregion ADL2_Adapter_AdapterInfo_Get - #region ADL_Adapter_Active_Get - /// ADL_Adapter_Active_Get Delegates - internal static ADL_Adapter_Active_Get ADL_Adapter_Active_Get + #region ADL2_Adapter_Active_Get + /// ADL2_Adapter_Active_Get Delegates + internal static ADL2_Adapter_Active_Get ADL2_Adapter_Active_Get { get { - if (!ADL_Adapter_Active_Get_Check && null == ADL_Adapter_Active_Get_) + if (!ADL2_Adapter_Active_Get_Check && null == ADL2_Adapter_Active_Get_) { - ADL_Adapter_Active_Get_Check = true; - if (ADLCheckLibrary.IsFunctionValid("ADL_Adapter_Active_Get")) + ADL2_Adapter_Active_Get_Check = true; + if (ADLCheckLibrary.IsFunctionValid("ADL2_Adapter_Active_Get")) { - ADL_Adapter_Active_Get_ = ADLImport.ADL_Adapter_Active_Get; + ADL2_Adapter_Active_Get_ = ADLImport.ADL2_Adapter_Active_Get; } } - return ADL_Adapter_Active_Get_; + return ADL2_Adapter_Active_Get_; } } /// Private Delegate - private static ADL_Adapter_Active_Get ADL_Adapter_Active_Get_ = null; + private static ADL2_Adapter_Active_Get ADL2_Adapter_Active_Get_ = null; /// check flag to indicate the delegate has been checked - private static bool ADL_Adapter_Active_Get_Check = false; - #endregion ADL_Adapter_Active_Get + private static bool ADL2_Adapter_Active_Get_Check = false; + #endregion ADL2_Adapter_Active_Get - #region ADL_Display_DisplayInfo_Get - /// ADL_Display_DisplayInfo_Get Delegates - internal static ADL_Display_DisplayInfo_Get ADL_Display_DisplayInfo_Get + #region ADL2_Display_DisplayInfo_Get + /// ADL2_Display_DisplayInfo_Get Delegates + internal static ADL2_Display_DisplayInfo_Get ADL2_Display_DisplayInfo_Get { get { - if (!ADL_Display_DisplayInfo_Get_Check && null == ADL_Display_DisplayInfo_Get_) + if (!ADL2_Display_DisplayInfo_Get_Check && null == ADL2_Display_DisplayInfo_Get_) { - ADL_Display_DisplayInfo_Get_Check = true; - if (ADLCheckLibrary.IsFunctionValid("ADL_Display_DisplayInfo_Get")) + ADL2_Display_DisplayInfo_Get_Check = true; + if (ADLCheckLibrary.IsFunctionValid("ADL2_Display_DisplayInfo_Get")) { - ADL_Display_DisplayInfo_Get_ = ADLImport.ADL_Display_DisplayInfo_Get; + ADL2_Display_DisplayInfo_Get_ = ADLImport.ADL2_Display_DisplayInfo_Get; } } - return ADL_Display_DisplayInfo_Get_; + return ADL2_Display_DisplayInfo_Get_; } } /// Private Delegate - private static ADL_Display_DisplayInfo_Get ADL_Display_DisplayInfo_Get_ = null; + private static ADL2_Display_DisplayInfo_Get ADL2_Display_DisplayInfo_Get_ = null; /// check flag to indicate the delegate has been checked - private static bool ADL_Display_DisplayInfo_Get_Check = false; - #endregion ADL_Display_DisplayInfo_Get + private static bool ADL2_Display_DisplayInfo_Get_Check = false; + #endregion ADL2_Display_DisplayInfo_Get + + #region ADL2_Display_SLSMapConfig_Get + /// ADL2_Display_SLSMapConfig_Get Delegates + internal static ADL2_Display_SLSMapConfig_Get ADL2_Display_SLSMapConfig_Get + { + get + { + if (!ADL2_Display_SLSMapConfig_Get_Check && null == ADL2_Display_SLSMapConfig_Get_) + { + ADL2_Display_SLSMapConfig_Get_Check = true; + if (ADLCheckLibrary.IsFunctionValid("ADL2_Display_SLSMapConfig_Get")) + { + ADL2_Display_SLSMapConfig_Get_ = ADLImport.ADL2_Display_SLSMapConfig_Get; + } + } + return ADL2_Display_SLSMapConfig_Get_; + } + } + /// Private Delegate + private static ADL2_Display_SLSMapConfig_Get ADL2_Display_SLSMapConfig_Get_ = null; + /// check flag to indicate the delegate has been checked + private static bool ADL2_Display_SLSMapConfig_Get_Check = false; + #endregion ADL2_Display_SLSMapConfig_Get + #endregion Export Functions } diff --git a/DisplayMagicianShared/DisplayMagicianShared.csproj b/DisplayMagicianShared/DisplayMagicianShared.csproj index d9b8ee4..5763661 100644 --- a/DisplayMagicianShared/DisplayMagicianShared.csproj +++ b/DisplayMagicianShared/DisplayMagicianShared.csproj @@ -51,6 +51,7 @@ + True @@ -151,9 +152,7 @@ True - - - +