[DUG] Error message starting Delphi program on Vista

John Bird johnkbird at paradise.net.nz
Fri Nov 21 20:54:45 NZDT 2008


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

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20081121/19d0c861/attachment.html 


More information about the Delphi mailing list