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
- :
- not able invoke a function in Suite
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
‎Jan 12, 2012
04:35 AM
not able invoke a function in Suite
i am not able invoke a function as defined in this post Calling a Function in a DLL from a Wizard Page or Window in a Suite Installation
http://blogs.flexerasoftware.com/installtalk/2011/12/calling-a-function-in-a-dll-from-a-wizard-page-or-window-in-a-suite-installation.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+InstallTalk+%28Blog%3A+InstallTalk%29
has anyone succeed in this ? Please let me know
http://blogs.flexerasoftware.com/installtalk/2011/12/calling-a-function-in-a-dll-from-a-wizard-page-or-window-in-a-suite-installation.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+InstallTalk+%28Blog%3A+InstallTalk%29
has anyone succeed in this ? Please let me know
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2012
06:06 PM
We are currently using this functionality internally on another project's installer and it calls the DLL successfully and the DLL is able to use the suite UI extension interface passed to the DLL.
Can you provide what steps you've taken to implement the DLL and how you added it to a suite project? Note that implementing and using a UI DLL action requires IS 2012 SP1.
Can you provide what steps you've taken to implement the DLL and how you added it to a suite project? Note that implementing and using a UI DLL action requires IS 2012 SP1.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2012
11:52 PM
[list=1]
Created a Win32 project in VS 2008
updated the project with the code
"#include "stdafx.h"
#include
#import "C:\Program Files\InstallShield\2012\Redist\Language Independent\i386\SetupSuite.exe" no_namespace raw_interfaces_only named_guids
HRESULT __stdcall Action(IDispatch *pDispSuiteUIExtension)
{
CComQIPtr spSuiteUIExtenstion = pDispSuiteUIExtension;
long lResult = 0;
return spSuiteUIExtenstion->MessageBox(CComBSTR(L"Hello"), CComBSTR(L"DLL Action"), MB_OK, &lResult);
}
"
took the build and added the dll to the support files (Language Independent) of a suite project
Created a button in the instalWelcome Dialog
In the Action contol of the button added the call "{TestSuite::Action}"
This was the procedure i did but unfortunately i was not able to see anything...help me out from this freakish situation. I am using IS 2012 Premier Edition Sp1
"#include "stdafx.h"
#include
#import "C:\Program Files\InstallShield\2012\Redist\Language Independent\i386\SetupSuite.exe" no_namespace raw_interfaces_only named_guids
HRESULT __stdcall Action(IDispatch *pDispSuiteUIExtension)
{
CComQIPtr
long lResult = 0;
return spSuiteUIExtenstion->MessageBox(CComBSTR(L"Hello"), CComBSTR(L"DLL Action"), MB_OK, &lResult);
}
"
This was the procedure i did but unfortunately i was not able to see anything...help me out from this freakish situation. I am using IS 2012 Premier Edition Sp1
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 18, 2012
08:18 AM
In scenarios like this, it's useful to get a debuglog from setup.exe. If you listed all the steps you did, then I expect you'll see a line that looks like this:
Could not load custom function from user DLL: &s::TestSuite (oops, that really should be Could not load custom function from user DLL: TestSuite::Action; I'll go fix that).
If that's the case, you can use a tool like Dependency Walker to show the exported function names in TestSuite.dll, where I expect you'll see a "decorated" name starting with ?Action instead of just Action. If that's the case, you need to export it cleanly. The cheat way is to wrap the function in an extern "C" block, but the clean way is to create a .def file.
Could not load custom function from user DLL: &s::TestSuite (oops, that really should be Could not load custom function from user DLL: TestSuite::Action; I'll go fix that).
If that's the case, you can use a tool like Dependency Walker to show the exported function names in TestSuite.dll, where I expect you'll see a "decorated" name starting with ?Action instead of just Action. If that's the case, you need to export it cleanly. The cheat way is to wrap the function in an extern "C" block, but the clean way is to create a .def file.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 19, 2012
01:02 AM
what all this you have mentioned i found exactly those wordings in the log file and the decoration ? also.
i had to change the code to
after this i was able to see the "Action" method in dependacy walker. But the issue still exists. In the log file still its saying that Could not load custom function from user DLL: &s::TestSuite
please guide me...
i had to change the code to
extern "C" {
__declspec(dllexport) HRESULT __stdcall Action(IDispatch *pDispSuiteUIExtension)
{
CComQIPtrspSuiteUIExtenstion = pDispSuiteUIExtension;
long lResult = 0;
return spSuiteUIExtenstion->MessageBox(CComBSTR(L"Hello"), CComBSTR(L"DLL Action"), MB_OK, &lResult);
}
}
after this i was able to see the "Action" method in dependacy walker. But the issue still exists. In the log file still its saying that Could not load custom function from user DLL: &s::TestSuite
please guide me...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 20, 2012
02:29 PM
If you are testing this on a machine other than your development machine, ensure that any dependencies needed to load the DLL are present. A better option is to change the DLL to statically link to any dependencies so that they are not needed at runtime on target machines.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 24, 2012
07:21 AM
hi josh,
i am testing in my development machine only. There is no dependency for this dll. Can you please provide a sample cpp project (as attachment) so that i can try that out in suite installation and compare with that of mine to see whats is going wrong in mine.
Thanks in advance
i am testing in my development machine only. There is no dependency for this dll. Can you please provide a sample cpp project (as attachment) so that i can try that out in suite installation and compare with that of mine to see whats is going wrong in mine.
Thanks in advance
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)