Problem with Call DLL Function on Korean Windows

Got a problem you cannot solve? Try here.
andrejzr
Posts: 68
Joined: Sun Jun 25, 2006 9:17 am

Problem with Call DLL Function on Korean Windows

Postby andrejzr » Tue Nov 21, 2006 4:31 am

Hello,

I enountered a strange error during install, which happens when using a Call DLL function command. This is related to the contents of the string parameter. I have a function in the DLL, which encodes a string passed as parameter, and it also returns the encoded string in the same parameter. Parameter is defined as "allocated string buffer" in IA command.

The encoding algorithm generates a string, which contains characters with codes from 32 to 255. After the function returns, installer will show following error:

Runtime error in setup script:
Line 1451: List index out of bounds (195)


And the installer closes after that.

I debugged the installer by inserting messagebox commands, to locate the point of the error. It happens while IA executes the "Call DLL Function" command. I further checked the DLL function itself, and there is no exception in the function. The error will occur, if the string parameter is assigned with particular string.

How to reproduce the problem:
- Use Korean Windows (I used Korean Windows 2000 Professional)
- Create a simple DLL with one function that accepts PCHAR parameter
- The function should just assign string 'cľ˙đ)1ĄÄˇ3ŕGâ' to the parameter
- Create a script, which will call this function

Have you experienced this before? The string returned might not be "valid" multibyte string for Korean code-page (since it can contain any sequence of characters from 32-255). If this is the cause for the error, what alternative do you recommend to encode a string and add its value to the "Write Registry" command?

Regards
Andrej

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Nov 21, 2006 7:10 am

I think you nailed the error pretty well. Not sure if I can think of any workarounds at this time - did you have any fresh ideas?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

andrejzr
Posts: 68
Joined: Sun Jun 25, 2006 9:17 am

Postby andrejzr » Tue Nov 21, 2006 8:52 am

Hi Michael,

The only workarround that I see at the moment is to change the way how my app works and for example write a hex encoded string to the registry.

Do you think there will be any fix available for this issue in the near future? If so, I don't have to make the above change :D Since this problem happens only for certain string contents, I it is not so urgent; user always has a chance to enter a different string. Not nice, but a workarround for now.

Thanks
Andrej

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Nov 21, 2006 9:15 am

I wouldn't expect anything very soon...sorry!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 121 guests