LoadDLL() public static method

public static LoadDLL ( string filename, int flags ) : IntPtr
filename string
flags int
return System.IntPtr
Exemplo n.º 1
0
        public static object LoadLibrary(string library, [DefaultParameterValue(0)] int mode)
        {
            IntPtr res = NativeFunctions.LoadDLL(library, mode);

            if (res == IntPtr.Zero)
            {
                throw PythonOps.OSError("cannot load library {0}", library);
            }

            return(res.ToPython());
        }
Exemplo n.º 2
0
        public static object LoadLibrary(string library, int mode = 0)
        {
            IntPtr res = NativeFunctions.LoadDLL(library, mode);

            if (res == IntPtr.Zero)
            {
                throw PythonOps.OSError($"cannot load library {library}");
            }

            return(res.ToPython());
        }