使用installshield调用我的dll类的方法

时间:2014-03-15 10:42:31

标签: c# dll installshield-2010

  

可能与

重复      

Call a dll function from InstallAware or InstallShield

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

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

  

" DLL函数调用崩溃: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;

注意:我已将我的dll作为支持文件添加到我的安装项目中。

请告诉我是否有任何样品。

0 个答案:

没有答案
相关问题