ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 用 Delphi 7 创建 ActiveX 组件DLL 在其他语言中调用

用 Delphi 7 创建 ActiveX 组件DLL 在其他语言中调用

原创 Linux操作系统 作者:niuchao 时间:2019-04-18 20:21:07 0 删除 编辑
DELPHI使用
uses ComObj;
var PZHPrj: Variant;
PZHPrj := CreateOleObject('PZHPrj.ComDLL');
i:=PZHPrj.InitReader(0);



ASP使用:
<%
Dim obj
Set bj=Server.CreateObject("PZHPrj.ComDLL")
obj.InitReader(0)
Set bj=nothing
%>


JSP使用
var PZHPrj = new ActiveXObject('pEncryptDLL.ComDLL');
str=PZHPrj.Auth("12345678","111111111111"); //函数调用



C#使用
添加到 Refrences中
using PZHPrj;

    ComDLL DllFile = new ComDLL();
            try
            {
                int i = int.Parse(DllFile.InitReader(0));
                if (i == 0)
                {
                    textBox1.Text = i.ToString();
                }
            }
            catch (Exception E)
            {
                MessageBox.Show(E.Message);
            }

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/166523/viewspace-764471/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: OO实现ALV TABLE
请登录后发表评论 登录
全部评论

注册时间:2004-11-04

  • 博文量
    141
  • 访问量
    136195