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
- :
- Msi Dll
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
‎Nov 24, 2008
06:52 PM
How do I return a STRING from standard DLL custom action?
InstallShield 2009 on Windows XP
I'm trying to set up a custom action that calls a function in a C++ DLL. The function returns a const char * which I want to interperet as a STRING and takes no parameters.
I don't have a problem calling the function. To verify that I call MessageBox() inside the function and the message box gets displayed.
My problem is that if I define the return type in IS as STRING, I get the informative message "The DLL being called encountered a problem." If I define the return type as POINTER I get a decimal representation of the pointer.
So I guess there's 2 ways of looking at the question. 1) How do I define the return type to interperet a char * as a STRING? 2) What do I return from the DLL function so that STRING can be used as the return type.
Thanks in advance.
I'm trying to set up a custom action that calls a function in a C++ DLL. The function returns a const char * which I want to interperet as a STRING and takes no parameters.
I don't have a problem calling the function. To verify that I call MessageBox() inside the function and the message box gets displayed.
My problem is that if I define the return type in IS as STRING, I get the informative message "The DLL being called encountered a problem." If I define the return type as POINTER I get a decimal representation of the pointer.
So I guess there's 2 ways of looking at the question. 1) How do I define the return type to interperet a char * as a STRING? 2) What do I return from the DLL function so that STRING can be used as the return type.
Thanks in advance.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 25, 2008
05:43 PM
Before going down this road, if you're the author of the DLL, is it an option to make it an MSI DLL and have the string returned as a property value?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 02, 2008
01:12 PM
RobertDickau wrote:
Before going down this road, if you're the author of the DLL, is it an option to make it an MSI DLL and have the string returned as a property value?
I am not the DLL author. I have the source, but I do not know how much lattitude I have for modifying it.
From your response though, it sounds like there isn't an easy way to get a string from a standard DLL.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 09, 2008
05:23 AM
RobertDickau wrote:
Before going down this road, if you're the author of the DLL, is it an option to make it an MSI DLL and have the string returned as a property value?
Hi
What is MSI DLL? Is it specific to MSI?
If yes, is it possible to create MSI DLLs and use it as an utility in an MSI?
Installshield concepts are pretty new to me and any help would be appreciated
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 09, 2008
01:02 PM
I'm no expert on the matter but an MSI DLL functions have a particular signature and use MsiGetProperty and MsiSetProperty to transfer data between the DLL and the installer. The signature is:
#include "msi.h"
#include "msiquery.h"
UINT function_name (MSIHANDLE);
When you create a MSI project in InstallShield and create a custom action with the MSI DLL type, all you supply is _function_name@4 and IS takes care of the rest, including supplying the handle.
Now if I could just get someone to answer my question!!! Hello...Acresso? Anyone home?
#include "msi.h"
#include "msiquery.h"
UINT function_name (MSIHANDLE);
When you create a MSI project in InstallShield and create a custom action with the MSI DLL type, all you supply is _function_name@4 and IS takes care of the rest, including supplying the handle.
Now if I could just get someone to answer my question!!! Hello...Acresso? Anyone home?