Exemplo n.º 1
0
                public static IntPtr GetProcAddress(string functionName)
                {
                    if (ADLLibrary == IntPtr.Zero)
                    {
                        return(IntPtr.Zero);
                    }

                    return(ADLImport.ADL_Main_Control_GetProcAddress(ADLLibrary, functionName));
                }
Exemplo n.º 2
0
                public static bool IsFunctionValid(string functionName)
                {
                    if (ADLLibrary == IntPtr.Zero)
                    {
                        return(false);
                    }

                    return(ADLImport.ADL_Main_Control_IsFunctionValid(ADLLibrary, functionName) == 1);
                }
Exemplo n.º 3
0
 /// <summary> Constructor</summary>
 private ADLCheckLibrary()
 {
     try {
         if (1 == ADLImport.ADL_Main_Control_IsFunctionValid(IntPtr.Zero, "ADL_Main_Control_Create"))
         {
             ADLLibrary = ADLImport.GetModuleHandle(ADLImport.Atiadlxx_FileName);
         }
     } catch (DllNotFoundException) { } catch (EntryPointNotFoundException) { } catch (Exception) { }
 }
Exemplo n.º 4
0
            /// <summary> Get the unmanaged function pointer </summary>
            /// <param name="functionName"> function name</param>
            /// <returns>return function pointer, if function exists</returns>
            internal static IntPtr GetProcAddress(string functionName)
            {
                IntPtr result = System.IntPtr.Zero;

                if (System.IntPtr.Zero != ADLCheckLibrary_.ADLLibrary)
                {
                    result = ADLImport.ADL_Main_Control_GetProcAddress(ADLCheckLibrary_.ADLLibrary, functionName);
                }
                return(result);
            }
Exemplo n.º 5
0
            /// <summary> Get the unmanaged function pointer </summary>
            /// <param name="functionName"> function name</param>
            /// <returns>return function pointer, if function exists</returns>
            internal static FARPROC GetProcAddress(string functionName)
            {
                var result = IntPtr.Zero;

                if (IntPtr.Zero != ADLCheckLibrary_.ADLLibrary)
                {
                    result = ADLImport.ADL_Main_Control_GetProcAddress(ADLCheckLibrary_.ADLLibrary, functionName);
                }
                return(result);
            }
Exemplo n.º 6
0
            /// <summary> Check the import function to see it exists or not</summary>
            /// <param name="functionName"> function name</param>
            /// <returns>return true, if function exists</returns>
            internal static bool IsFunctionValid(string functionName)
            {
                bool result = false;

                if (System.IntPtr.Zero != ADLCheckLibrary_.ADLLibrary)
                {
                    if (1 == ADLImport.ADL_Main_Control_IsFunctionValid(ADLCheckLibrary_.ADLLibrary, functionName))
                    {
                        result = true;
                    }
                }
                return(result);
            }