comp.lang.ada
 help / color / mirror / Atom feed
From: "Alexey V. Litvinov" <lialsoftlab@mail.ru>
To: "comp lang ada" <comp.lang.ada@ada.eu.org>
Subject: problem with gnat.lock_files
Date: Sat, 30 Sep 2000 13:48:48 +1100
Date: 2000-09-30T03:38:09+00:00	[thread overview]
Message-ID: <000001c02a8f$c9667980$b4ab7cc1@new> (raw)

I have a trouble with GNAT.Lock_Files package.
when I try to lock file it constantly raises Lock_Error.
I'm sure that this file not opened by other program.
And wrote next piece of code to test:

with GNAT.Lock_Files; use GNAT.Lock_Files;
with Ada.Text_IO;     use Ada.Text_IO;

procedure Lock is
begin
   put_line("trying to lock...");
   Lock_File("c:\test.fl", 1.0, 3);
   put_line("locked.");
   UnLock_File("c:\test.fl");

exception
   when Lock_Error => 
      put_line("Unable to lock!");
   when others => 
      raise;
end;

after every run it gaves "Unable to lock!"
what I'm doing wrong?





                 reply	other threads:[~2000-09-30  2:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox