如何在html中调用dll函数 [英] How to call a dll function in html

查看:700
本文介绍了如何在html中调用dll函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过ActiveXObject调用我的dll函数,当我在IE(浏览器)中打开html文件时,我的代码工作,但是当我使用该html文件(用于小工具开发)时,它返回对象错误。这是调用dll功能的代码



Hi, I am trying to call a function of my dll , by the ActiveXObject my code works when i open the html file in IE (browser) but when i use that html file (for gadget development ) it return object error. here is the code for calling dll fuction

<script type ="text/javascript">
function myload()
{
try
{
    var myAx = new ActiveXObject("myadd.AddClass");
    var t = document.getElementById("text1");
    t.value = myAx.add(2,2);

}
catch(e)
{
var textbox = document.getElementById("text1");
    textbox.value = e;
}
}
</script>









ActiveXObject是否适用于小工具?如果它确实指出了我的错误。

还请指导如何使用dll开发C#中的小工具





Does ActiveXObject works in gadgets ? and if it does place point out my mistake .
Please also guide how to develop gadgets in C# using dll

推荐答案

参见这些文章 [ ^ 获取帮助建立小工具。
See these articles[^] for help on building gadgets.


这篇关于如何在html中调用dll函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆