Thread: "running" directory

  1. #1
    Unregistered
    Guest

    Question "running" directory

    How to find the directory from which the application is loaded?
    language: C
    In API I found only GetCurrentDirectory, GetWindowsDirectory and GetSystemDirectory. However, function SearchPath knows which is the directory.



    Macdonald

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    GetModuleFileName()
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Unregistered
    Guest

    thanks

    thanks

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Or SetCurrentDirectory() / GetCurrentDirectory()
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    1
    Or SetCurrentDirectory() / GetCurrentDirectory()
    No, when you open application by draging document to it then atleast in my Windows 98 the current directory is c:/windows.
    Last edited by macdonald; 04-25-2002 at 12:31 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  3. Replies: 6
    Last Post: 07-30-2003, 03:08 AM
  4. Directory reading trouble
    By samGwilliam in forum Linux Programming
    Replies: 0
    Last Post: 03-10-2002, 09:43 AM
  5. The Site Directory
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 01-22-2002, 08:19 PM