Read From locked files under WinNT

R. Hillen mail at richard-hillen.de
Tue Mar 11 12:45:01 EST 2003


Hello, Richard

I opened, but not opened for read.
That was the fault. Thank you!
Richard Hillen.

>
> Message: 5
> Date: Mon, 10 Mar 2003 13:08:27 -0800
> Subject: Re: Read From locked files under WinNT
> From: Richard Gaskin <ambassador at fourthworld.com>
> To: <use-revolution at lists.runrev.com>
> Reply-To: use-revolution at lists.runrev.com
>
> R. Hillen wrote:
>
>> Hello,
>>
>> I wrote a minimal program to read textfiles: "answer file, open file,
>> read from file, put it into fld xxx, close file" and made a standalone
>> for Windows using RunRev 1.1.1 on MacOSX.
>>
>> On two WindowsComputer (WinNT, Win2000) I had a simple TextFile to 
>> test
>> it and it all was ok: the data were read!
>>
>> Next I tried to read a text file, which was locked, as it came from a
>> measurement-system by floppy (write protected, as I learned from the
>> file-properties) and got the message, that the file couldnt be read.
>> I unlocked the file and the file could be read again.
>>
>> But why?
>>
>> On both machines we use a Sandbox-Program, "Surfin Shield", which said
>> in Admin-Mode" The program tries to write to the registry. This is  
>> not
>> allowed!"
>>
>> So I wonder, why such a simple programm wants to write to the 
>> registry?
>>
>> Any Ideas?
>
> What is the code you're using to read the file?
>
> Specifically, are you opening the file for read only, or are you also
> attempting to get write permission?
>
> To open a file for read only, use:
>
>   open file tMyFilePath for read
>
> Or more simply, you can open, read, and close the file in one line by
> referring to it as a local URL:
>
>   put url ("file:"*tMyFilePath) into tMyVar
>
> -- 
>  Richard Gaskin
>  Fourth World Media Corporation
>  Developer of WebMerge 2.2: Publish any database on any site
>  ___________________________________________________________
>  Ambassador at FourthWorld.com       http://www.FourthWorld.com
>  Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list