title: Call a method of a class of my dll with installshield
body: <blockquote>
  <p>Maybe duplicate with</p>
  <p><a href="https://stackoverflow.com/questions/4656559/call-a-dll-function-from-installaware-or-installshield">Call a dll function from InstallAware or InstallShield</a></p>
  </blockquote>
  <p>How can i call a method of a class of my dll at the end of the setup in installshield?</p>
  <p>I have wrote something like the following code at the end of the Setup.Rul in my setup project and set the ComVisible of my dll and my class to true but i recieve this error yet :</p>
  <blockquote>
  <p>&quot;DLL function call crashed: ISRT._ DotNetCoCreateObject&quot;</p>
  </blockquote>
  <pre><code>...
   
  szDLLCompletePath = SUPPORTDIR ^ &quot;MyDllName.dll&quot;;
   
  szClassName = &quot;MyDllName.MyClassName&quot;;
   
  //The error occured at the following line
  set Obj = DotNetCoCreateObject( szDLLCompletePath, szClassName, &quot;&quot;);
   
  If(! IsObject(Obj)) then
      MessageBox(&quot;Cannot load&quot;, SEVERE);
   
  else
      Obj.MyMethodName(Parameters);
  endif;
  </code></pre>
  <p>Note: I have added my dll as support file to my setup project.</p>
  <p>Please tell me if there is any sample for this.</p>