Does anyone know what's wrong with this small piece of code? It works on
most machines, but some of my users get errors, and there seems to be no
solid reason or verison of windows that brings the error up. Usually the
error is "" is not a valid integer.

var
        MyPCharSize: Integer;
        MyPCharLocale: PChar;
        LocaleID: Integer;

begin
        MyPcharSize := GetLocaleInfo(LOCALE_USER_DEFAULT,
LOCALE_IMEASURE, MyPcharLocale, 0);
        Getmem(MyPCharLocale, MyPCharSize);
        GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IMEASURE,
MyPcharLocale, MyPCharSize);
        LocaleID := strtoint(MyPcharLocale);
        Freemem(MyPCharLocale);
end;
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"

Reply via email to