PDA

View Full Version : DLL functions not working properly in IS 2012!



Dmitry_Bond
06-12-2012, 11:12 AM
Hi.

We are investigating question if we could migrate to new InstallShield version from the very old one (v.11).
But I have faced very strange problem - the DLL function call which was working fine in the InstallShield 11 is working in a wrong way in InstallShield 2012 Professional!

In particular here is function header from IS script:

prototype string InstUtil.GetPropertyValue(byval string, byval string, byval number);

Here is a piece of code of IS script:

sz = GetPropertyValue("DiskSize,mb", svResult, -1);
diskCapacity = StrToNumDef(sz, -1);


In the log file generated by DLL I can see:

174037.024 [P3344|INFO] GetPropertyValue("DiskSize,mb", "C:", -1)
174037.024 [P3344|INFO] GetPropertyValue: Result="42939"


But the debug message from InstallShield 2012 script is showing this:

---------------------------
SW Server 2010.2 - InstallShield Wizard
DEBUG: DiskSize,Mb = ㈴㌹9嵽2, capacity=-1
---------------------------

As you can see - the "42939" string was screwed up to the "㈴㌹9嵽2".

So, for sure function was called and it was returned correct result value.
But the InstallShield 2012 was screwed up value somewhere inside. :-(

Can you see any reasons - WHY?!

Regards,
Dmitry.

MichaelU
06-13-2012, 08:03 AM
It sounds like you might need to look at the migration articles. I'd focus in particular at the IS2011 one, where we improved InstallScript's support and use of Unicode strings and APIs. (This symptom looks a lot like an ANSI string being interpreted as a Unicode one.)

Dmitry_Bond
06-14-2012, 03:53 AM
It sounds like you might need to look at the migration articles. I'd focus in particular at the IS2011 one, where we improved InstallScript's support and use of Unicode strings and APIs. (This symptom looks a lot like an ANSI string being interpreted as a Unicode one.)

Could you please post links to articles you mentioned?

Or at least - what is option name to change to make it use ANSI encoding instead of unicode?

DebbieL
06-14-2012, 11:31 AM
The Read Me First sticky (http://community.flexerasoftware.com/showthread.php?t=201579) in the forum has links.

Note that InstallShield 2012 and InstallShield 2012 Spring are two different versions. This thread is in the InstallShield 2012 Spring forum. If you are using InstallShield 2012, you'll probably want to look at the sticky in the InstallShield 2012 forum:
http://community.flexerasoftware.com/showthread.php?t=198772

I hope that helps.

mallikarjuna.y
08-12-2013, 11:30 AM
Hi All,

I am also facing same issue with IS2012.

How can we get host name in IS2012, is there any IS variable/function to get this.

Also, how to convert UNICODE to ASCII...

Thanks in advance....
Mallikarjuna