lookupMethod() публичный статический Метод

public static lookupMethod ( IntPtr dll, string method ) : IntPtr
dll System.IntPtr
method string
Результат System.IntPtr
Пример #1
0
        public static int PtrForFunc(string dll, string method)
        {
            IntPtr dllLook;

            if ((dllLook = DllImportCaller.lookupDll(dll)) != IntPtr.Zero)
            {
                IntPtr methodLookup;
                if ((methodLookup = DllImportCaller.lookupMethod(dllLook, method)) != IntPtr.Zero)
                {
                    return(methodLookup.ToInt32());
                    //EXECUTE / OK
                }
                else
                {
                    DllImportCaller.lib.FreeLibrary7(dllLook);
                    throw new Exception("Could not find Method (Dll found)");
                }
            }
            else
            {
                throw new Exception("Could not find dll (" + dll + ")");
            }

            throw new InvalidOperationException();
        }