CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19

Thread: DeleteFile Hook

  1. #16
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: DeleteFile Hook

    Quote Originally Posted by itsmeash View Post
    Just being curious, How to do it? What's the approach to peek into file I/O operations, There's certainly not an issue of different OS as i've to run in win 2000 or 2003 only.
    I'll be honest with you, I've never done that myself, so maybe someone else will clue you in. I'd suggest one thing though. Don't try to re-invent the wheel and go with the accepted/easy way.

    Can I ask, why do you need all this?

  2. #17
    Join Date
    Mar 2009
    Posts
    102

    Re: DeleteFile Hook

    Quote Originally Posted by ahmd View Post
    Can I ask, why do you need all this?
    It's a control feature where my application will let the legitimate user delete the files not others.

    So for that i need to know that file is going to be deleted(Pressing DELETE, SHIFT+DELETE, DEL COMMAND ETC) and before it delete i should pause that operation and invoke another exe which will check whether the user is legitimate or not, If yes then i'll let that user to delete the file else i've to show "ACCESS DENIED" message by altering the behavior of delete.

  3. #18
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: DeleteFile Hook

    It seems like you're digging into the anti-virus/firewall type realm. Good luck with that stuff, it's not for the faint hearted... Still, the easiest way to implement what you want is what I suggested in my post above.

  4. #19
    Join Date
    Aug 2010
    Posts
    51

    Smile Re: DeleteFile Hook

    hi,


    whenever any file get deleted i should get the message first and based on some checks on user i decide whether the user can delete the file or not, Now the check part is not in question, what kind of keys can I use.

    thanks for suggestion

    regards,
    phe9oxis,
    http://www.guidebuddha.com

Page 2 of 2 FirstFirst 12

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