Could it be the way I set up the PChar? Or possibly the 


-----Original Message-----
From: Jason L. Coley 
Sent: Thursday, 21 September 2000 12:54 p.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Locale Measure


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"
---------------------------------------------------------------------------
    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