• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NativeLibrary类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NativeLibrary的典型用法代码示例。如果您正苦于以下问题:C# NativeLibrary类的具体用法?C# NativeLibrary怎么用?C# NativeLibrary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NativeLibrary类属于命名空间,在下文中一共展示了NativeLibrary类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Bind

 internal static void Bind(NativeLibrary nativeLibrary)
 {
     Math.yepMath_Log_V64f_V64f = (yepMath_Log_V64f_V64f_Delegate)nativeLibrary.GetFunction("yepMath_Log_V64f_V64f", typeof(yepMath_Log_V64f_V64f_Delegate));
     Math.yepMath_Exp_V64f_V64f = (yepMath_Exp_V64f_V64f_Delegate)nativeLibrary.GetFunction("yepMath_Exp_V64f_V64f", typeof(yepMath_Exp_V64f_V64f_Delegate));
     Math.yepMath_Sin_V64f_V64f = (yepMath_Sin_V64f_V64f_Delegate)nativeLibrary.GetFunction("yepMath_Sin_V64f_V64f", typeof(yepMath_Sin_V64f_V64f_Delegate));
     Math.yepMath_Cos_V64f_V64f = (yepMath_Cos_V64f_V64f_Delegate)nativeLibrary.GetFunction("yepMath_Cos_V64f_V64f", typeof(yepMath_Cos_V64f_V64f_Delegate));
     Math.yepMath_Tan_V64f_V64f = (yepMath_Tan_V64f_V64f_Delegate)nativeLibrary.GetFunction("yepMath_Tan_V64f_V64f", typeof(yepMath_Tan_V64f_V64f_Delegate));
     Math.yepMath_EvaluatePolynomial_V32fV32f_V32f = (yepMath_EvaluatePolynomial_V32fV32f_V32f_Delegate)nativeLibrary.GetFunction("yepMath_EvaluatePolynomial_V32fV32f_V32f", typeof(yepMath_EvaluatePolynomial_V32fV32f_V32f_Delegate));
     Math.yepMath_EvaluatePolynomial_V64fV64f_V64f = (yepMath_EvaluatePolynomial_V64fV64f_V64f_Delegate)nativeLibrary.GetFunction("yepMath_EvaluatePolynomial_V64fV64f_V64f", typeof(yepMath_EvaluatePolynomial_V64fV64f_V64f_Delegate));
 }
开发者ID:DanWBR,项目名称:dwsim3,代码行数:10,代码来源:Bind.cs


示例2: NativeLibrary

 protected NativeLibrary(NativeLibrary.Internal* native, bool isInternalImpl = false)
 {
     __Instance = new global::System.IntPtr(native);
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:4,代码来源:AST.cs


示例3: __CopyValue

 private static NativeLibrary.Internal* __CopyValue(NativeLibrary.Internal native)
 {
     var ret = Marshal.AllocHGlobal(80);
     CppSharp.Parser.AST.NativeLibrary.Internal.cctor_2(ret, new global::System.IntPtr(&native));
     return (NativeLibrary.Internal*) ret;
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:6,代码来源:AST.cs


示例4: __CreateInstance

 public static NativeLibrary __CreateInstance(NativeLibrary.Internal native)
 {
     return new NativeLibrary(native);
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:4,代码来源:AST.cs


示例5: NativeLibrary

 protected NativeLibrary(NativeLibrary.Internal* native, bool skipVTables = false)
 {
     if (native == null)
         return;
     __Instance = new global::System.IntPtr(native);
 }
开发者ID:CSRedRat,项目名称:CppSharp,代码行数:6,代码来源:AST.cs


示例6: __CreateInstance

 public static NativeLibrary __CreateInstance(NativeLibrary.Internal native, bool skipVTables = false)
 {
     return new NativeLibrary(native, skipVTables);
 }
开发者ID:CSRedRat,项目名称:CppSharp,代码行数:4,代码来源:AST.cs


示例7: __CopyValue

 private static void* __CopyValue(NativeLibrary.__Internal native)
 {
     var ret = Marshal.AllocHGlobal(52);
     global::CppSharp.Parser.AST.NativeLibrary.__Internal.cctor_1(ret, new global::System.IntPtr(&native));
     return ret.ToPointer();
 }
开发者ID:ddobrev,项目名称:CppSharp,代码行数:6,代码来源:CppSharp.CppParser.cs


示例8: NativeLibrary

 internal NativeLibrary(NativeLibrary.Internal native)
     : this(&native)
 {
 }
开发者ID:kidleon,项目名称:CppSharp,代码行数:4,代码来源:AST.cs


示例9: NativeLibrary

 private NativeLibrary(NativeLibrary.Internal native)
     : this(__CopyValue(native))
 {
     __ownsNativeInstance = true;
 }
开发者ID:KonajuGames,项目名称:CppSharp,代码行数:5,代码来源:AST.cs


示例10: NativeLibrary

 internal NativeLibrary(NativeLibrary.Internal native)
     : this(__CopyValue(native))
 {
 }
开发者ID:vovkasm,项目名称:CppSharp,代码行数:4,代码来源:AST.cs


示例11: Core

        /// <summary>
        /// Loads the specified libretro implementation. 
        /// <para></para>
        /// This core is not actually initialized until Initialize is called.
        /// </summary>
        /// <param name="filename">The filename of the dynamic library.</param>
        /// <param name="info">Info about the frontend to pass to the core.</param>
        /// <param name="multipleInstances">If this is true, the library may be copied to a temporary directory if another instance of it has already been loaded into process memory.</param>
        public Core(string filename, FrontendInfo info, bool multipleInstances = true)
        {
            if (!instances.ContainsKey(filename))
            {
                instances.Add(filename, 0);
            }
            instances[filename]++;
            if (multipleInstances && instances[filename] > 1)
            {
                string newFilename = Path.GetTempPath() + Path.DirectorySeparatorChar + Path.GetFileName(filename) + "." + instances[filename].ToString();
                File.Copy(filename, newFilename, true);
                filename = newFilename;
                deleteOnExit = true;
            }
            frontEndInfo = info;
            core = new NativeLibrary(filename);
            LoadFunctions();    
            Variables = new Variables(new string[0], new string[0], new string[0][]);
            Screen = new Screen();
            Timing = new TimingInfo();
            envCallback = Core_Environment;
            vidCallback = Core_VideoRefresh;
            audCallback = Core_AudioSample;
            asbCallback = Core_AudioSampleBatch;
            inpCallback = Core_InputPoll;
            insCallback = Core_InputState;
            rumCallback = Core_Rumble;
            this.filename = filename;
            // this is used by Core_Environment
            unsafe
            {
                boolFalse = Marshal.AllocHGlobal(1);
                boolTrue = Marshal.AllocHGlobal(1);

                *((bool*)boolFalse) = false;
                *((bool*)boolTrue) = true;
            }
        }
开发者ID:HannesMann,项目名称:libretro.NET,代码行数:46,代码来源:Core.cs



注:本文中的NativeLibrary类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NativeMethods类代码示例发布时间:2022-05-24
下一篇:
C# NativeActivityMetadata类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap