> Hi again.
> Have a problem backing up to removable hard disks with my program as the
test
> below does not work with HD removable:

That's because a removeable harddrive is just a normal hard drive with a
hole that you can stick it in. There is no difference to just putting a
drive in normally and plugging it up to IDE and power.

> I figure my new code below might be suitable. General opinion on safety of
> forcing the labeling (is there likely to be issue with Win95) please?
> :
>
> function TMainform.IsRemovable: Boolean;
> const test = '###### TEST'; { MUST BE UPPER CASE }
> var tmp, drv: string;
>   drvtype: word;
> begin
>   result := false;
>   drv := ExtractFileDrive(VCLzip1.ZipName);
>   drvtype := GetDriveType(pChar(drv));
>   tmp := GetVolumeName(drv);
>   if SetVolumelabel(pchar(drv), test) then //if can write label is
removable
>   begin
>     result := true;
>     SetVolumelabel(pchar(drv), pchar(tmp));
>   end;
> end;

You can set the volume label of non-removable drives just fine with this
code too, can't you?

Cheers,
Nicholas Sherlock

---------------------------------------------------------------------------
    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"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to