Esempio n. 1
0
        private SafeLibraryHandle ExtractAndLoadFromPath(string dir)
        {
            string libPath        = Path.GetFullPath(Path.Combine(dir, _extractedFileName));
            string platformSuffix = "." + CurrentArch;

            if (!ManifestResource.Extract(_systemFileName + platformSuffix, libPath))
            {
                return(null);
            }

            return(NullifyInvalidHandle(Platform.OpenHandle(libPath)));
        }
Esempio n. 2
0
        private SafeLibraryHandle ExtractAndLoadFromPath(string dir)
        {
            string libPath        = Path.GetFullPath(Path.Combine(dir, _extractedFileName));
            string platformSuffix = "." + CurrentArch;

            if (!ManifestResource.Extract(_systemFileName + platformSuffix, libPath))
            {
                Tracer.Warning("Unable to extract native library to " + libPath, TraceCategory);
                return(null);
            }

            Tracer.Info("Extracted and loading " + libPath, TraceCategory);
            return(NullifyInvalidHandle(Platform.OpenHandle(libPath)));
        }