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

Thread: how can i show full path of the files that runs?

  1. #1
    Join Date
    Jan 2003
    Posts
    63

    how can i show full path of the files that runs?

    i want to show runnig files or directories full path in the list box.
    i can catch the handle numbers of running programs. but i cant find the full path.

    example:
    "c:\ABC\sample.doc" ' for opened files
    "c:\TOOLS" ' for opened directories

    can anyone help?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,406
    Hi!
    Take a look at API GetModuleFileName (MSDN):
    The GetModuleFileName function retrieves the full path and file name for the file containing the specified module.
    ......
    Victor

  3. #3
    Join Date
    Jan 2003
    Posts
    63

    i lost the code that givs handle numbers for running files.

    i lost my code for handle numbers.

    can anyone write the code that lists running programs handle numbers in a listbox?

    thanx

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,406
    MSDN:
    "HOWTO: List Running Processes"
    "SAMPLE: MODLIST.EXE Shows How to Enumerate Processes and Modules"
    "HOWTO: Enumerate Applications in Win32"
    Victor

  5. #5
    Join Date
    Jan 2003
    Posts
    63
    cant u write a small code that lists running files handle numbers?

    thanx victor.

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,406
    Haven't you found the code in MSDN ???
    "HOWTO: List Running Processes"
    "SAMPLE: MODLIST.EXE Shows How to Enumerate Processes and Modules"

  7. #7
    Join Date
    Jan 2003
    Posts
    63
    if i found it on the msdn, i didnt write again to forum.

  8. #8
    Join Date
    Jan 2003
    Posts
    63
    ok.i found them, but:
    it gives "c:\program files\...\winword.exe"

    i want to display running word files full path.
    like this "c:\abc\sample.doc"

    also want to display opened directories.("c:\abc\xyz")

  9. #9
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,406
    Hi!
    Never did this
    Probably, you have to use Automation to obtain file information you want.

    Regards,
    Victor

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)