Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Using DotNetCoCreateObject Getting error 2147219705


2 replies to this topic

deramor

deramor
  • Full Members
  • 187 posts

Posted 09 March 2015 - 21:06

Hello-

 

I am trying to call a C# dll from a deferred custom action.

The assembly is marked as COM visible.

 

When I try to set an object with DotNetCoCreateObject, I get the error number 2147219705.

 

Does anyone know what this error number refers to?

 

I have done similar operations in the past but in custom actions that were triggered through the UI sequence.  I'm wondering if the fact that the execute sequence is involved is giving me this issue.

In this implementation and the other that works, I can see no differences except those associated with a different dll name and class name. 



deramor

deramor
  • Full Members
  • 187 posts

Posted 31 March 2015 - 00:05

Turns out, the class was static which was causing the call to fail.



deramor

deramor
  • Full Members
  • 187 posts

Posted 13 April 2015 - 22:10

I now have a working assembly when I have a local copy of the assembly.  My situation is the following:

I have an installer that installs my Com Visible assembly into the GAC.

I have another installation that attempts to call this assembly by just saying:

 

set object = DotNetCoCreateObject(szMyDllNamewithExtention, szMyAssemblyandClassName, "");

 

After running through the debugger, I ended up noticing that the dll could not be found.

I ran it once with just the dll name in the first argument. (expecting the function to use the GAC)

I ran it again with a fully qualified path and it worked fine. 

 

My question is, is there a function that can load a .Net assembly in Installscript that will or can load the assembly from the GAC?