Problem with Windows NT 
Author Message
 Problem with Windows NT

I'm trying to open a file (with a reset command) resident on an NT Server,
at the same time, from two NT workstations running a Borland Pascal DOS
program. How should be the behaviour of IORESULT on both workstations? Is
there a mean to know if the file is already opened by the other workstation,
by reading IORESULT value?

Thanks in advance

A. Machado



Wed, 18 Jun 1902 08:00:00 GMT  
 Problem with Windows NT
Telesystems schrieb:
Quote:

> I'm trying to open a file (with a reset command) resident on an NT Server,
> at the same time, from two NT workstations running a Borland Pascal DOS
> program. How should be the behaviour of IORESULT on both workstations? Is
> there a mean to know if the file is already opened by the other workstation,
> by reading IORESULT value?

The IOresult is only 1 point. You must consider the FileMode variable.
It is set to $02 by default, but you can set it to $42 or $22 or $12,
regarding the "level" of protection. You can also set it to 0 for R/O
open mode.

The FileMode variable is used in the Reset(F) procedure for typed and
untyped files, but not with Text files. You can change the FileMode
immediately after Reset instruction.

   OldFM := FileMode; {save for restoration}
   FileMode := $42;
   Reset(F,1);
   FileMode := OldFM;  {this has no more impact on the open file}

The IOresult on access violations is not the same on different operating
systems, sorry. Some display a 5 (access denied) or 162 or ...

Franz Glaser



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. protected mode problem in Windows NT?

2. TPW file open problem with Windows NT

3. Problem with Delphi 3 and ISX 1.11 on Windows NT / 2000

4. Problem running BGIDEMO.PAS under Windows NT 4.0

5. Problems with BDE 4.51 and ODBC 3 with Windows NT 4.0

6. Problem to run a Window 3.1 program on Windows NT

7. Windows NT - file sharing problem

8. Problem with text in BP7/Windows NT

9. Runtime error 200 when running under Windows 95 / Windows NT

10. Compatability of IDAPI and Windows NT/2000/XP...

11. Query on: Chinese BIG5/Unicode with Delphi 2 on Windows NT

12. Paradox -records disappear under Windows NT ?

 

 
Powered by phpBB® Forum Software