Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,915 of 2,978    |
|    Klaus Jorgensen to All    |
|    Re: Check for locked file in TP    |
|    07 Oct 05 11:03:58    |
   
   From: kj@no.spam   
      
   "Wim" wrote in message   
   news:1128668078.984102.77090@o13g2000cwo.googlegroups.com...   
   >A TP program crashes sometimes because the file it tries to   
   > rewrite/rename is locked by a virusscanner. I would like to include   
   > some code to check for a locked file and wait some time to see if   
   > the   
   > file lock has been removed.   
   >   
      
   Check the flags used by DOS function $3D (Open File with Handle)   
   http://heim.ifi.uio.no/~stanisls/helppc/int_21-3d.html   
      
   With "FileMode:=$12;" you can check if you have full control of the   
   file - i.e. other processes will fail to open the file.   
      
      
   /klaus   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca