cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
spiderpig
Level 3

.Net 4 dll Error

Anyone successfull calling a .net 4 dll with installshield 2011. I keep getting error -2147219705 (null). Anyone know what that error means. Using a Basic MSI project. Tried with the Custom action wizard and with DotNetCoCreateObject.
Labels (1)
0 Kudos
(5) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Does this happen with all .NET assemblies you have tried to call or only one? Can you reproduce this behavior with a sample assembly?
0 Kudos
spiderpig
Level 3

Not yet I am going to try one of the sample dlls today. I will let you know the out come.
0 Kudos
spiderpig
Level 3

I get the same error using the SampleClassLibrary.dll. code below, just trying to load it right now, can't seem to get past loading



szDotNetDll = WindowsFolder ^ "temp\\SampleClassLibrary.dll";
szClass ="SampleClassLibrary.ChooseItem";
MessageBox("SaveConnString", INFORMATION);
MessageBox(szDotNetDll, INFORMATION);

UseDLL(szDotNetDll);

try
set SaveString = DotNetCoCreateObject(szDotNetDll, szClass, "");
catch
SprintfBox (INFORMATION, "Error","Error occured: %i\n\n%s\n\n%s", Err.Number, Err.Description, Err.LastDllError);
abort;
endcatch;
0 Kudos
spiderpig
Level 3

Fixed issue, had the developer change the classes and methods to non static.

Also the sample dll can not be used with the dotnetcocreateobject function.
0 Kudos
reshmi_patro
Level 3

You can set assembly: ComVisible(false) to assembly: ComVisible(true). The exception will not come.
0 Kudos