Herman,
tanks for the tip.
I've choossen to use Gregorys solution (See message#
841508), it works perfeclty.
Agnes
>>Anatoliy,
>>
>>thanks, I will have a look at this.
>>
>>Agnes
>>
>>Update:
>>
>>I have checked the link, the (DELPHI) solution is most like the FCREATE() thing. The problem with FCREATE() is, that it will come up with an Message box in a Cancel/retry/ignore style where ignore makes no sense to my programm.
>>
>>Agnes
>>>No help from API functions GetDriveType, GetVolumeInformation etc.
>>>
>>>It seems to me the only way is to write something on this drive, or change its label with SetVolumeLabel API function.
>>>
>>>Check this link, same subject:
>>>
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20654554.html>>>
>>>Error code 19 = ERROR_WRITE_PROTECT
>
>Agnes,
>
>You need to create the file (CreateFile) with Direct Drive Access then check if it is lock using DeviceIoControl
>
>Here is the link. The example is in C++
>
http://support.microsoft.com/default.aspx?scid=kb;en-us;168180>
>HTH
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]