如何使用installshield调用我的dll类的方法 [英] How to call a method of a class of my dll with installshield

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

问题描述

嗨朋友们,



如何在installshield的安装结束时调用我的dll类的方法?



我在安装项目的 Setup.Rul 末尾写了类似下面的代码,并设置了我的 ComVisible dll到 true 但我收到了这个错误:

Hi friends,

How can i call a method of a class of my dll at the end of the setup in installshield?

I have wrote something like the following code at the end of the Setup.Rul in my setup project and also set the ComVisible of my dll to true but i recieve this error yet :

"DLL function call crashed: ISRT._ DotNetCoCreateObject"




...

szDLLCompletePath = SUPPORTDIR ^ "MyDllName.dll";

szClassName = "MyDllName.MyClassName";

//The error occured at the following line
set Obj = DotNetCoCreateObject( szDLLCompletePath, szClassName, "");

If(! IsObject(Obj)) then
    MessageBox("Cannot load", SEVERE);

else
    Obj.MyMethodName(Parameters);
endif;

推荐答案

将该类标记为ComVisible。
Mark that class as ComVisible.


问题是使用我的dll .net框架版本。
The problem is with the version of .net framework of my dll.


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

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