* problem with gnat.lock_files
@ 2000-09-30 2:48 Alexey V. Litvinov
0 siblings, 0 replies; only message in thread
From: Alexey V. Litvinov @ 2000-09-30 2:48 UTC (permalink / raw)
To: comp lang ada
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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-09-30 2:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-30 2:48 problem with gnat.lock_files Alexey V. Litvinov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox