Results 1 to 4 of 4

Thread: Sharing Violation?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Posts
    16

    Talking Sharing Violation?

    My program is a kind of Digital Library, in which file can be "imported" to the library by inserting its path to a database. I am now implementing a function that can real time detect any file operation performed on file system, and so trigger the database update.


    When "REMOVE DIRECTORY" is detected, then all files in that deleted directory will be removed from our database.

    However, when i try to remove a directory outside the program when the program is running, the directory CANNOT be deleted, because of sharing violation.

    I found that the directory can be deleted before "imported" to the Library, but fail afterwards.

    Can anyone tell me where the problem is, and how can i fix it?

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    how are you detecting the file operation?

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Posts
    16
    I use the shell notification... the code is from

    http://www.mvps.org/vbnet/index.html...angenotify.htm

  4. #4
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    I found that the directory can be deleted before "imported" to the Library, but fail afterwards.
    What about returning the path into a separate string variable, performing the actual explorer function then writing this string varible into the database afterward, does this make a difference?

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

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