Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locked removable
Message
De
23/10/2003 06:00:23
 
 
À
23/10/2003 05:44:44
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00840941
Message ID:
00841458
Vues:
29
Cetin,

I've never seen it either.

I'm not sure, but I think there was a thread about getting rid of that dialogue some time ago.

Cannot remember it, may someone else can


>Agnes,
>I read what dialog you're referring to in other branch. I've never seen it under IDE or exe.
>As per WSH I agree. I don't use it too and replace with pure VFP and/or winAPI whereever I need it :)
>
>PS: In fox2x days I was using assembly code to detect it but that too needs a write attempt (int 13 or int 21).
>Cetin
>
>>Hi Cetin,
>>
>>Thank you for your suggestion.
>>FCREATE was my first idea. ::)
>>
>>the problem to me is that this will bring up a stupid dialog that I can not trap.
>>
>>WSH is no choice, I don't support this. This is why I place this under API. What I'm looking for is something that runs under Win9x, NT 4.0 and so on without adding WSH. Since my problem is more like 'bells and whistles', I would never add a security hole to clients comp with knowlegde.
>>
>>
>>Agnes
>>
>>>>Hi All,
>>>>
>>>>how to determine if a (removable)drive is locked (read only)?
>>>>
>>>>TIA
>>>>
>>>>Agnes
>>>
>>>
>>>local llRW, lnHandle, lcFile
>>>lcFile = sys(2015)+'.tmp'
>>>lnHandle=fcreate(lcFile)
>>>if lnHandle > 0
>>> fclose(lnHandle)
>>> erase (lcFile)
>>> llRW = .t.
>>>else
>>> if ferror() = 29 && Disk full
>>> endif
>>>endif
>>>
Might be.
>>>
>>>or with WSH you might want to check first if drive is ready :
>>>
>>>Lparameters tcDriveName
>>>oFS = CREATEOBJECT('Scripting.FileSystemObject')
>>>For each oDrv in oFS.Drives
>>>  If oDrv.DriveLetter = upper(tcDriveName)
>>>    Return oDrv.IsReady
>>>  Endif
>>>Endfor
>>>Return .F.
>>>
Cetin
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform