Jason
The error is LocaleID := strtoint(MyPcharLocale);
being passed a blank string
Now why MyPcharLocale is blank is an M$ mystery
HTH
Neven
----- Original Message -----
From: Jason L. Coley <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, 21 September 2000 12:53
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"