public Delegate GetFunction(string name, Type type) { IntPtr function = _loader.FindFunction(_handle, name); if (function == IntPtr.Zero) #if NET451 { throw new EntryPointNotFoundException(name); } #else { throw new Exception(name); } #endif return(System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(function, type)); }
public Delegate GetFunction(string name, Type type) { IntPtr function = _loader.FindFunction(_handle, name); if (function == IntPtr.Zero) { if (function == IntPtr.Zero) { throw new EntryPointNotFoundException(name); } } return(Marshal.GetDelegateForFunctionPointer(function, type)); }