Link to home
Start Free TrialLog in
Avatar of rinaldo_sync
rinaldo_sync

asked on

EStackOverflow ntdll.dll Windows7 Delphi 2006

Hello, please somebody help me!

This error ocurrs only in a station with Windows 7 Professional.
The application is compiled with BDS 2006.
Database Oracle

The error ocurrs at the line:
FormatDateTime('dddd', Date);

PS:
The .BPL's files and .EXE are compressed with ASPack.

Eurekalog.txt
Avatar of cebasso
cebasso
Flag of United States of America image

FormatDateTime();
dd = Day
mm = Month
yy = Year with 2 digits
yyyy = Year with 4 digits

hh = Hour
mm = minute
ss = Second

dddd = ?
FormatDateTime('dd/mm/yy', Date) = 01/02/10
FormatDateTime('dd', Date) = 01
FormatDateTime('mm/dd/yyyy', Date) = 02/01/2010
What kind of format do u want?
Avatar of Ferruccio Accalai
cebasso, dddd is for Longdaynames

Investigating if there are differences in formatting times between W7 and previous versions
Avatar of rinaldo_sync
rinaldo_sync

ASKER

Borland Help FormatDateTime Routine:

dddd
Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.
Cool!
I never read the Help file for this routine haha
So, with a new project you got this error too?
i tested here, Windows 7 Home Premmium with default Locale Brazil and all others settings set to Brazil too and no problem...
test in your application something like
showmessage(formatdatetime('dddd', date));
should display 'segunda-feira' correct? or you got the error just calling that?
ASKER CERTIFIED SOLUTION
Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No...
With a new project the error doesn't happen...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, I will test without ASPack....
More details:
1. In other computers with Windows XP the error doesn't happen
2. In Windows 7 Standard the error doesn't happen
3. The EurekaLog always show the correct line number, using ASPack or not.
Can you give us, part of your code?
you are using FormatDateTime with 'dddd' format for what?
what is receiving this format? are you using it after? example
var
  szBuff: String;
begin
  szBuff := FormatDateTime('dddd', Date);
  do something with szBuff
  using szBuff again
do you tried to debug your application setting a breakpoint and using step by step (F8) inside Delphi?
AddValue('DiaSem',UCaseFirst(FormatDateTime('dddd',Date)));

Yes, I'm using the result to populate a TStringList...
My computer runs on Windows XP....
The computer of my client runs on Windows 7.
It's impossible to debug....
Can you take a look at Default Locale Settings in your client computer?
I already got problem with differents locale settings...
i mean for example, in your computer the default is Portuguese-Brazil and in your client is English-United States
Control Panel > Locale and Languages
Painel de Controle > Relógio Idioma e Região > Região e Idioma > Formato
Sorry....
I think this is not a error related to Locale Settings
The error ocurrs in ntdll.dll ..... RtlAllocateHeap()
not exactly... formatdatetime('dddd', Date) in brazilian portuguese return "segunda-feira" and for united states "monday"
datetimetostr(date) in brazilian portuguese will return "01/02/2010" and for united states "2/1/2010"
for OnGuard components, you got error comparing dates with diferent local settings and is needed to override it at the application startup
i don't know where or for what do you are calling this... then you may try :)
Regards,
I'm using ASPack 2.12
This version is not compatible with Windows 7.
Without ASPack, it works !!

Thanks !!!