getDriveTypeA doesn't work with Russian

Got a problem you cannot solve? Try here.
wendy.zheng@emc.com
Posts: 4
Joined: Mon Nov 04, 2013 3:05 am

getDriveTypeA doesn't work with Russian

Postby wendy.zheng@emc.com » Thu Mar 27, 2014 9:32 am

I'm maintaining a InstallAware NX project. Recently, I add a new language Russian support into the installer. But it looks like there is some critical issue in the generated installer: there is a script calling the DLL GetDriveTypeA API to get the type of the drive, this API works for all other languages I created, such as English, Chinese, Japanese... But it doesn't work when selecting Russian. The returned variable is reset to undefined after calling this API (it was set to empty before calling the API). Even worse, the whole installer doesn't work at all after that: all the messages are showing the id, garbage characters shown in the dialog, the wizard cannot even close and have to kill it from task manager.

InstallAware NX doesn't support unicode, so I have set the CHARSET_OVERRIDE to RUSSIAN_CHARSET to let the message show correctly.

Does anyone come across similar issue before? How can I fix it? Is there any workaround?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: getDriveTypeA doesn't work with Russian

Postby FrancescoT » Thu Mar 27, 2014 12:20 pm

Dear Wendy,

I may suggest you as first, to verify if you are passing a correct value with the function parameter "lpRootPathName".

The "GetDriveType" function returns an "Unsigned Int" that specifies the type of drive and not a string ... so the returned value itself has nothing to do with UNICODE.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

wendy.zheng@emc.com
Posts: 4
Joined: Mon Nov 04, 2013 3:05 am

Re: getDriveTypeA doesn't work with Russian

Postby wendy.zheng@emc.com » Thu Mar 27, 2014 7:53 pm

Sorry, I didn't describe the problem clearly. Yes, that API should not have anything to do with localization, that is what I thought. But the issue just happen!! The parameter passed in is "C:/", which should return 3, and when I select other languages, it does return 3. But when I select Russian, the returned value turns into undefined variable. What's the strangest thing here. When I see this, I can't believe my eye.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: getDriveTypeA doesn't work with Russian

Postby FrancescoT » Fri Mar 28, 2014 12:13 pm

Dear Wendy,

do you mean "C:\" ... and not "C:/" ... I suppose?

did you try to pass NULL instead? (just to see what value it returns)

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

wendy.zheng@emc.com
Posts: 4
Joined: Mon Nov 04, 2013 3:05 am

Re: getDriveTypeA doesn't work with Russian

Postby wendy.zheng@emc.com » Mon Apr 14, 2014 10:11 am

Because the path is set from a text field, I doubt that may be related to the localization issue. But now I notice that, even though I hard coded "C:\" to pass into the method, the method still returns undefined value to the variable. This is really strange, and we have to give up Russian support in the installer.
btw, no matter I pass in NULL or empty string, it returns the same undefined value when selecting Russian. But it returns 1 when selecting English!

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: getDriveTypeA doesn't work with Russian

Postby FrancescoT » Mon Apr 14, 2014 11:30 am

Dear Wendy,

honestly, It sounds strange when you say; "... it returns the same undefined value when selecting Russian. But it returns 1 when selecting English!".

It should not change anything. Are you sure that not exist a problem with your localized resource strings?

Are you able to replicate the issue with a very minimal project?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

wendy.zheng@emc.com
Posts: 4
Joined: Mon Nov 04, 2013 3:05 am

Re: getDriveTypeA doesn't work with Russian

Postby wendy.zheng@emc.com » Tue Apr 15, 2014 9:27 am

What kind of issue in the localized resource strings do you mean? The issue exists even though I use InstallAware to auto translate the messages.

I will try to create a minimal project to have another try when I have time.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: getDriveTypeA doesn't work with Russian

Postby FrancescoT » Tue Apr 15, 2014 11:33 am

Dear Wendy,

For example, It could happen that the imported resource strings, are not exactly synchronized with the latest modification you have eventually made with the project. If this is the case, try to re-generate all your localized strings and then re-import them once again.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 104 guests