Getting opened file paths

This is a discussion on Getting opened file paths within the Windows Programming forums, part of the Platform Specific Boards category; hi, i need 2 get the paths of all the opened files on a givan moment. 4 example, if there's ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    363

    Getting opened file paths

    hi,
    i need 2 get the paths of all the opened files on a givan moment. 4 example, if there's a file called "ayesha.doc" is opened on the desktop, i need 2 get the file path of that file. what's the standered way 2 do this in C++ please?

    thanx a lot.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Are you talking about arbitrary files or files your process owns?

    Kuphryn

  3. #3
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    363
    thanx for replying.

    not the files my process owns, but the files opened with other processes. (i need to get their paths, and get handles to the windows own by them)
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,551
    http://www.sysinternals.com/Processe...Utilities.html
    Handle v3.1
    This handy command-line utility will show you what files are open by which processes, and much more.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    363
    thanx, but that's just a peice of software. it displays all the processes and the files they have opened, but there's no sourcecode to see how it's done. i need to write my own code for my own program. so... i still need help please.
    Last edited by geek@02; 09-18-2005 at 04:13 AM.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  6. #6
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Check out MSDN.

    http://msdn.microsoft.com/library/de..._reference.asp

    Check out my website for software development links.

    http://www.dslextreme.com/users/kuphryn/links.html

    Kuphryn

  7. #7
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Rewriting an opened file.
    By Daghdha in forum C Programming
    Replies: 5
    Last Post: 06-13-2002, 01:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21