This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: DotNetCoCreatedObject crash problem
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 30, 2009
12:44 PM
DotNetCoCreatedObject crash problem
I have a InstallScript MSI project. I am trying to call a manged dll function from InstallScript project using DotNetCoCreateObject. But when the code is run during installation, I got this error:
Error Number: 0x80040707
Description: Dll function call crashed: ISRT.DotNetCoCreateObject
Does anybody know the reason of this problem? Thanks for any help.
Error Number: 0x80040707
Description: Dll function call crashed: ISRT.DotNetCoCreateObject
Does anybody know the reason of this problem? Thanks for any help.
(10) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 30, 2009
03:59 PM
Can you provide any additional information about how you are calling DotNetCoCreateObject? Does this happen with any project you try this code in? Can this issue be reproduced with a sample .NET assembly?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 31, 2009
07:26 AM
I created a very simple dll called MyDll and here is the code.
dllPath = SUPPORTDIR ^ "MyDll.dll";
svReturn = UseDLL(dllPath);
if( svReturn = 0) then
set myObj = DotNetCoCreateObject(dllPath, "MyDll.Class1", "");
endif;
UnUseDLL(dllPath);
It crashed on set myObj line with the following error:
Error Number: 0x8004070
Description: Dll function call crashed: ISRT._DotNetCoCreateObject
Setup will now terminate.
--------------------------------------------------
Thanks for your help.
dllPath = SUPPORTDIR ^ "MyDll.dll";
svReturn = UseDLL(dllPath);
if( svReturn = 0) then
set myObj = DotNetCoCreateObject(dllPath, "MyDll.Class1", "");
endif;
UnUseDLL(dllPath);
It crashed on set myObj line with the following error:
Error Number: 0x8004070
Description: Dll function call crashed: ISRT._DotNetCoCreateObject
Setup will now terminate.
--------------------------------------------------
Thanks for your help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 31, 2009
07:37 AM
Hi,
Please put the dll whole project as zip, too.
Please put the dll whole project as zip, too.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 31, 2009
10:54 AM
(It probably doesn't have a bearing on the issue, but you don't need UseDLL or UnUseDLL for a .NET assembly; that pair is for C-callable DLLs.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 31, 2009
11:23 AM
The class in the attached sample DLL needs to be marked as ComVisible.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 31, 2009
11:35 AM
That worked. Thank you (both) for your help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 12, 2009
04:56 PM
joshstechnij wrote:
The class in the attached sample DLL needs to be marked as ComVisible.
Hi,
I have the same issue here, though in my case DLL was working fine unless I changed Target Framework to 3.5 sp1 and i started getting this error, now I have revereted it back to .NET 2.0 but i am still getting the same error...
I have MSI Installscript project.
Any sugessations?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 14, 2009
01:47 PM
You may try using a utility such as .NET Reflector to ensure the assembly or class you are trying to use in InstallScript is still marked as ComVisible.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 14, 2015
04:37 AM
Mystique wrote:
I have a InstallScript MSI project. I am trying to call a manged dll function from InstallScript project using DotNetCoCreateObject. But when the code is run during installation, I got this error:
Error Number: 0x80040707
Description: Dll function call crashed: ISRT.DotNetCoCreateObject
Does anybody know the reason of this problem? Thanks for any help.
Just install .net framework 4.5 through GUI itself.issue will be solved. Hope it will
