Why can't I Unlock the Custom Lock ?


[ Follow Ups ] [ BasicCard User Forum ]

Posted by vutaviva (203.210.219.195) on July 04, 2006 at 14:47:32:

Hi,
I have the following code :
Basic card Program
---------------
'(...)
Dir "\"
Read Write Unlock
File "A"
Read Write Unlock
"aaa"
End Dir

Command &H20 &H00 LockFileSystem()
Lock "\A"
End Command

Command &H20 &H01 UnLockFileSystem()
Unlock "\A"
End Command
----------------------------
And below is the Terminal :

----------------------------
ResetCard
Call CheckSW1SW2()

Public filenum As Integer
filenum = Open "@:\A" For Input Access Read
If FileError feFileOK Then
print "error " FileError
Else
Close #filenum
End If

Call LockFileSystem()
filenum = Open "@:\A" For Input Access Read
If FileError feFileOK Then
print "error " FileError
Else
Close #filenum
End If

Call UnLockFileSystem() ' (*)

filenum = Open "@:\A" For Input Access Read
If FileError feFileOK Then
print "error " FileError
Else
Close #filenum
End If
-------------------------------
After (*), I can't access the file A, I have just let the basiccard unlock it, but nothing happend.
Please tell me which error is it ?!



Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]