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: isdev : error -7323: msi dll custom action cannot call a function in managed code
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
‎Jun 26, 2013
07:30 AM
isdev : error -7323: msi dll custom action cannot call a function in managed code
Hello Forum,
I have installed a licensed version of InstallShield 2013 on Windows XP SP3. I converted an InstallShield 2012 project and tried to build it. During the build I got the following error:
ISDEV : error -7323: MSI DLL Custom Action MyCustomAction cannot call a function in managed code C:\src\MyProject\bin\Win32\Release\myCustomAction.dll.
Also when looking at the custom action in the InstallShield GUI (via Installation Designer->Custom Actions and Sequences->MyCustomAction) and clicking the "DLL Filekey" I see the value "myCustomAction.dll" but in the help window for the "DLL Filekey" I see the text:
Couldn't find node //InlineHelp/Topic[@id="ICAMsiDllInstalled"] in C:\Program Files\InstallShield\2013\Program\0409\IsWsSequences.xml
The custom action myCustomAction.dll is a c++ dll that calls a function in a C# managed dll (CustomActions.dll) like this:
When comparing the InstallShield 2012 and InstallShield 2013 installation against each other I found that the "ICAMsiDllInstalled.htm"-file exists in the 2012 folder "C:\Program Files\InstallShield\2012\Program\0409\" but not in the 2013 folder "C:\Program Files\InstallShield\2013\Program\0409\".
This was fully working when building under InstallShield 2012. Have anyone else encountered this kind of problem? What is the reason ? Should I install a specific package to the InstallShield 2013 or something?
Thank you for your help
Sincerelly,
Fredrik
I have installed a licensed version of InstallShield 2013 on Windows XP SP3. I converted an InstallShield 2012 project and tried to build it. During the build I got the following error:
ISDEV : error -7323: MSI DLL Custom Action MyCustomAction cannot call a function in managed code C:\src\MyProject\bin\Win32\Release\myCustomAction.dll.
Also when looking at the custom action in the InstallShield GUI (via Installation Designer->Custom Actions and Sequences->MyCustomAction) and clicking the "DLL Filekey" I see the value "myCustomAction.dll" but in the help window for the "DLL Filekey" I see the text:
Couldn't find node //InlineHelp/Topic[@id="ICAMsiDllInstalled"] in C:\Program Files\InstallShield\2013\Program\0409\IsWsSequences.xml
The custom action myCustomAction.dll is a c++ dll that calls a function in a C# managed dll (CustomActions.dll) like this:
__declspec(dllexport) UINT __stdcall MyCustomAction(MSIHANDLE hInstall) {
VARIANT_BOOL ret = FALSE;
CoInitialize(NULL);
ICustomActionsPtr Ica(__uuidof(CustomActions));
Ica->MyCustomAction(&ret); // <-- Calling the function in the managed code
CoUninitialize();
if(ret == VARIANT_FALSE) {
return ERROR_INSTALL_FAILURE;
}
return ERROR_SUCCESS;
}
When comparing the InstallShield 2012 and InstallShield 2013 installation against each other I found that the "ICAMsiDllInstalled.htm"-file exists in the 2012 folder "C:\Program Files\InstallShield\2012\Program\0409\" but not in the 2013 folder "C:\Program Files\InstallShield\2013\Program\0409\".
This was fully working when building under InstallShield 2012. Have anyone else encountered this kind of problem? What is the reason ? Should I install a specific package to the InstallShield 2013 or something?
Thank you for your help
Sincerelly,
Fredrik
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 26, 2013
11:45 AM
The attatched is the new IsWsSequences.xml that fixes the missing inline help. In order to appy the fix, please relace the C:\Program Files\InstallShield\2013\Program\0409\IsWsSequences.xml with the new one.
Regarding the build error -7323, it is not reproducible on our end. Which Visual Studio project template did you use to build myCustomAction.dll?
Regarding the build error -7323, it is not reproducible on our end. Which Visual Studio project template did you use to build myCustomAction.dll?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 28, 2013
08:21 AM
Hi Hidenori,
Thank you very much for the fast response. The IsWsSequences.xml file solved the issue with the inline help.
Regarding the -7323 problem I have taken another approach at it. Instead I changed the type of the custom action that cause the -7323 error. I changed from being a custom action that called a function in a dll that was written specifically for Windows Installer to be a custom action that call a public method in a managed assembly that was written in managed code. I looked at the ManagedCustomActions sample included in Samples-folder of the InstallShield 2013 installation and changed my custom action accordingly. This solved my problem, now I can build my product using InstallShield 2013, and the installation runs as expected 🙂
(The Visual Studio project template I used to build MyCustomAction.dll, was a win32 Dynamic Link Library template using standard Windows libraries, and it was built with VisualStudio 2012 targeting .Net framework 4.0. The function inside MyCustomAction.dll that in turn made the call, Ica->MyCustomAction(&ret);, was calling a managed dll, MyManagedCustomActions.dll, written in C#. Thus now with the new approach by changing the type of the custom action, I called the method in the managed dll directly instead, without going via an unmanaged function).
Best regards,
Fredrik
Thank you very much for the fast response. The IsWsSequences.xml file solved the issue with the inline help.
Regarding the -7323 problem I have taken another approach at it. Instead I changed the type of the custom action that cause the -7323 error. I changed from being a custom action that called a function in a dll that was written specifically for Windows Installer to be a custom action that call a public method in a managed assembly that was written in managed code. I looked at the ManagedCustomActions sample included in Samples-folder of the InstallShield 2013 installation and changed my custom action accordingly. This solved my problem, now I can build my product using InstallShield 2013, and the installation runs as expected 🙂
(The Visual Studio project template I used to build MyCustomAction.dll, was a win32 Dynamic Link Library template using standard Windows libraries, and it was built with VisualStudio 2012 targeting .Net framework 4.0. The function inside MyCustomAction.dll that in turn made the call, Ica->MyCustomAction(&ret);, was calling a managed dll, MyManagedCustomActions.dll, written in C#. Thus now with the new approach by changing the type of the custom action, I called the method in the managed dll directly instead, without going via an unmanaged function).
Best regards,
Fredrik
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2014
02:53 AM
Hey Fredrik,
did you ever find out why your unmanaged dll did not work anymore?
I've got the exact same problem when I upgraded to IS2014 (from 2012Spring).
The dll I use is an unmanaged wrapper for a manged code.
However, the stuff is quite old and refactoring the code is a big effort...
Best Regards,
Frank
did you ever find out why your unmanaged dll did not work anymore?
I've got the exact same problem when I upgraded to IS2014 (from 2012Spring).
The dll I use is an unmanaged wrapper for a manged code.
However, the stuff is quite old and refactoring the code is a big effort...
Best Regards,
Frank