Thread: Getting the filename

  1. #16
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    You forgot the call to PathStripPath() !
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :-

  2. #17
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    - The correct api is GetModuleFileName.

    - See under GetAppPath function here for a sample:

    - GetCurrentDirectory, as its name suggests, gets the current directory which may not be the application directory.

    - GetCommandLine will return very different strings depending on where the program is started from. Windows may call your program with a nicely formatted command line, the average console user will not. (Give it a try).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-11-2009, 01:49 AM
  2. Pass Filename to another function
    By awesmesk8er in forum C Programming
    Replies: 9
    Last Post: 10-24-2008, 01:43 PM
  3. adding line numbers and concatenating a filename
    By durrty in forum C Programming
    Replies: 25
    Last Post: 06-28-2008, 03:36 AM
  4. Time as filename
    By rkooij in forum C Programming
    Replies: 8
    Last Post: 03-02-2006, 09:17 AM
  5. Replies: 3
    Last Post: 01-25-2006, 10:30 PM