Ejemplo n.º 1
0
        private static IntPtr SysGetDllProcAddress(IntPtr libHandle, string symbol)
        {
#if UNITY_STANDALONE_WIN
            return(PInvokes_Windows.GetProcAddress(libHandle, symbol));
#elif UNITY_STANDALONE_LINUX
            return(PInvokes_Linux.dlsym(libHandle, symbol));
#elif UNITY_STANDALONE_OSX
            return(PInvokes_Osx.dlsym(libHandle, symbol));
#endif
        }
Ejemplo n.º 2
0
        private static bool SysUnloadDll(IntPtr libHandle)
        {
#if UNITY_STANDALONE_WIN
            return(PInvokes_Windows.FreeLibrary(libHandle));
#elif UNITY_STANDALONE_LINUX
            return(PInvokes_Linux.dlclose(libHandle) == 0);
#elif UNITY_STANDALONE_OSX
            return(PInvokes_Osx.dlclose(libHandle) == 0);
#endif
        }
Ejemplo n.º 3
0
        private static IntPtr SysLoadDll(string filepath)
        {
#if UNITY_STANDALONE_WIN
            return(PInvokes_Windows.LoadLibrary(filepath));
#elif UNITY_STANDALONE_LINUX
            return(PInvokes_Linux.dlopen(filepath, (int)Options.posixDlopenFlags));
#elif UNITY_STANDALONE_OSX
            return(PInvokes_Osx.dlopen(filepath, (int)Options.posixDlopenFlags));
#endif
        }
Ejemplo n.º 4
0
        private static IntPtr SysGetDllProcAddress(IntPtr libHandle, string symbol)
        {
#if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
            return(PInvokes_Linux.dlsym(libHandle, symbol));
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
            return(PInvokes_Osx.dlsym(libHandle, symbol));
#elif UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
            return(PInvokes_Windows.GetProcAddress(libHandle, symbol));
#else
            throw GetUnsupportedPlatformExcpetion();
#endif
        }
Ejemplo n.º 5
0
        private static bool SysUnloadDll(IntPtr libHandle)
        {
#if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
            return(PInvokes_Linux.dlclose(libHandle) == 0);
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
            return(PInvokes_Osx.dlclose(libHandle) == 0);
#elif UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
            return(PInvokes_Windows.FreeLibrary(libHandle));
#else
            throw GetUnsupportedPlatformExcpetion();
#endif
        }
Ejemplo n.º 6
0
        private static IntPtr SysLoadDll(string filepath)
        {
#if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
            return(PInvokes_Linux.dlopen(filepath, (int)Options.posixDlopenFlags));
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
            return(PInvokes_Osx.dlopen(filepath, (int)Options.posixDlopenFlags));
#elif UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
            return(PInvokes_Windows.LoadLibrary(filepath));
#else
            throw GetUnsupportedPlatformExcpetion();
#endif
        }