CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    28

    current openned files

    hi,
    how i can get all current files openned by each running process using c#?

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: current openned files

    I think this is not possible outside device drivers, because of the rights one needs for that. See these:
    http://www.microsoft.com/communities...=en-us&m=1&p=1
    http://www.nirsoft.net/utils/opened_files_view.html
    How does it work ?
    OpenedFilesView uses the NtQuerySystemInformation API to enumerate all handles in the system. After filtering non-file handles, it uses a temporary device driver - NirSoftOpenedFilesDriver.sys for reading the information about each handle from the kernel memory. This device driver is automatically unloaded from the system when you exit from OpenedFilesView utility.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

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