Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetVolumeInfo returns accented characters
Message
From
06/09/2006 14:21:01
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
06/09/2006 10:30:53
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01151329
Message ID:
01151454
Views:
33
>The app I'm maintaining is sold all over the world. It uses GetVolumeInfo API for registration purposes. For some users, who have had various Asian (and who knows which other) language locales installed on their machines, one or both of the following could happen:
>
>- the CD volume number would be returned with the last character missing (i.e. 10 instead of 11)
>- the HD serial ID would contain a character outside of the 0-9, A-Z range (I have an example of an Á, A acute)
>
>In some cases, the CD volume number would eventually return all 11 characters after the user returned all foreign language components from their system. The second problem started cropping up more recently so I have no idea where this is coming from.
>
>I need to know whether there are localized versions of GetVolumeInfo, i.e. whether this API itself may work differently for different locales. At least I need to know whether it would change its behavior if the user added a language, and whether actually anyone saw this before.

More info: it seems to be that the cause isn't the GetVolumeInfo, but rather the behavior of reading non-ascii strings from the registry. These strings were stored encrypted, and decrypted upon reading. It seems that under some regional settings it wouldn't return exactly as it was written. I've introduced a way to write them as strings of printable characters (in the Western sense of "printable"), so I hope this should fix that.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform