How to extract filename information from running processes ?

Discussion in 'C#' started by adimangla, May 23, 2007.

  1. adimangla

    adimangla New Member

    Joined:
    May 23, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi :)

    I am creating a software that will save the present state of all the applications running on the desktop (WinXP).

    Can anyone point out the method to extract the filenames from the handles (or otherwise) of the files that are being accessed by processes and programs ?

    For example : If I have opened xyz.docx in MS Word 2007 then I want to find out the name of the file ("xyz.docx") and its complete path through some mean which could be either :

    1. Reading or extracting information from the Word 2007 process handle.
    2. Through another non- handle based general method.

    Kindly help !

    Regards,

    Aditya
     
  2. rhaazy

    rhaazy New Member

    Joined:
    Jul 6, 2007
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    0
    Use the API, more specifically for .NET WMI (wrapper for API)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice