JSIL and DllImport
JSIL and DllImport
我尝试将带有P/Invoke的示例.net应用程序转换为使用JSIL的javascript。
C# 代码:
[DllImport("JSTestLib", EntryPoint = "Get42", CallingConvention = CallingConvention.Cdecl)]
public unsafe static extern int Get42();
生成的 JavaScript:
$.ExternalMethod({Static:true , Public:true }, "Get42",
JSIL.MethodSignature.Return($.Int32)
);
我应该在javascript中在哪里添加Get42方法的实现?我应该在 JSIL 中手动注册此方法吗?
我现在只有一个错误:
类型为"Test.Program"的外部方法"System.Int32 Get42()"具有 未实施。
只需使用 JSIL。ImplementExternals - 看看 JSIL。核心.js示例
相关文章:
- Selenium WebDriver and JavaScript change
- PHP and Javascript functions
- Javascript Return and if/else
- SetTimeout and clearTimeout in Javascript
- lightbox in html 5 and javascript
- TimelineJS and AngularJS
- timeago.js with datatable and PHP
- javascript button ajax and php
- Ajax and Json with Rails
- Combine onload, onresize and onclick
- php布尔值's小写AND大写和数字布尔值'可以接受
- setTimeout and V8
- Jquery post and onclick
- Moment js and IOS
- Rails 3.2 and Paloma gem
- Backbone, TypeScript, and super
- iframe and JavaScript on different pages
- JSON and jQuery Search
- Flash and External Javascript
- JSIL and DllImport