CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: File Locking

  1. #1
    Guest

    File Locking


    I was wondering if any of you VB gurus could help me find a way
    to lock certain files so that they cannot be written to or
    deleted while the program is not running so that no one can
    tamper with any files that the program uses or creates.
    Something similar to the file sharing lock used in locking
    databases, but that will remain locked even when the program ends until the program later unlocks
    them. If anyone has any ideas at all then please e-mail me at
    [email protected].
    Thanks in advance,


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: File Locking

    how about using SetAttr and set the file to vbReadOnly?


  3. #3
    Guest

    Re: File Locking

    Thanks for the tip. I was hoping for something a little harder to get around though, something to stop someone from being able to delete a file/dir. Thanks again.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured