[DUG] Error message starting Delphi program on Vista
Rohit Gupta
r.gupta at xtra.co.nz
Sat Nov 22 02:58:45 NZDT 2008
Apat from Vista's security, my guess is that the variable is overflowing
because of the large size of freespace. Try using int64 to hold it.
John Bird wrote:
> Can anyone shed light on this?
>
> I have one program that is prone to getting an exception dialog when
> it starts on Vista.
>
> The dialog is
>
> Windows - No Disk
>
> Exception processing Message 0xc0000013 Parameters 0x764292A0
> 0x00000004 0x764292A0 0x764292A0
>
> I think its a Vista problem because the program does this whether
> inside or outside the IDE, and it disappears if the PC is rebooted,
> and returns later. Is it trying to access one of the other drive
> letters such as a card reader (there is one on this PC)?
>
> There are also references to this on the web, eg
>
> http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1621609&SiteID=17
> <http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1621609&SiteID=17>
>
> where people are just guessing, which suggests amongst others problems
> with USB or removable disk drivers.
>
> This program is checking free hard disk space on start up with code
> like below:
>
> (But I don't think its even getting this far - it is based on some
> code I found on the net - and it gives the error message even if the
> code is commented out)
>
>
> procedure xcDiskStats(Drive: string; var aTotalDisk: real; var
> aDiskUsed: Real; var aDiskFree: real; var aDiskPercentFree: integer;
> var aStat: string);
> var
> ldisk: string;
> ldiskchar: char;
> lTotalDiskMB: Real;
> lDiskFreeMB: Real;
> begin
> try
> ldisk := uppercase(copy(Drive, 1, 1));
> lDiskChar := Ldisk[1];
> aDiskFree := DiskFree(Ord(ldiskChar) - 64);
> aTotalDisk := DiskSize(Ord(ldiskChar) - 64);
> aDiskUsed := ATotalDisk - ADiskFree;
> finally
> aStat:='';
> end;
> if aTotalDisk > 0 then
> begin
> aDiskPercentFree := round((aDiskFree / aTotalDisk) * 100);
> end;
> lTotalDiskMB := aTotalDisk / (1024 * 1024);
> lDiskFreeMB := aDiskFree / (1024 * 1024);
> aStat := 'Disk Total=' + trim(format('%10.2f', [lTotalDiskMB])) + 'MB'
> + ' Disk Free=' + trim(format('%10.2f', [lDiskFreeMB])) + 'MB'
> + ' Free=' + inttostr(aDiskPercentFree) + '%';
> end;
>
> John
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 3629 (20081121) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
> ------------------------------------------------------------------------
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 3629 (20081121) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
More information about the Delphi
mailing list