Jun 01, 2015
10:21 AM
I am trying return a programmatically built string from a c++ function to InstallScript. For example, appending and replacing (sub-strings) a string that I return from another function. Code in c++ SQLHELPER_API LPCSTR GetAvailableAppName(LPCSTR appNameP) { //return "this works just fine"; std::string newAppName = "I work, maybe?"; LPCSTR returnVal = newAppName.c_str(); return returnVal; //this will either return an empty string or a mishmash of the string } code in InstallScript prototype cdecl string SqlHelper.GetAvailableAppName(BYREF string); string ERPORTALAPP; ERPORTALAPP = GetAvailableAppName("eRPortalApp"); //returns an empty string or a mishmash of the string I have tried altering my c++ function so that it returns a string instead of LPCSTR, but did NOT change any code in InstallScript. This resulted in a run-time error in InstallShield. How can I pass a string back to InstallScript?
... View more
Labels
- Labels:
-
InstallShield 2014
Latest posts by TruthOf42
Subject | Views | Posted |
---|---|---|
2815 | Jun 01, 2015 10:21 AM |
Activity Feed
- Posted Returning a string from c++ dll function on InstallShield Forum. Jun 01, 2015 10:21 AM
- Tagged Returning a string from c++ dll function on InstallShield Forum. Jun 01, 2015 10:21 AM
- Tagged Returning a string from c++ dll function on InstallShield Forum. Jun 01, 2015 10:21 AM
- Tagged Returning a string from c++ dll function on InstallShield Forum. Jun 01, 2015 10:21 AM
- Tagged Returning a string from c++ dll function on InstallShield Forum. Jun 01, 2015 10:21 AM