How do I get argv[0] in windows?

Started by tpekar, April 24, 2014, 07:01:23 PM

Previous topic - Next topic

tpekar

In a console program the path and program name (and suffix) is available in the argv array as argv[0].  How do I get this in windows? ???

TimoVJL

GetCommandLine() and find first space (outside ").
Or use frankie's code from here
May the source be with you

tpekar

Thanks timoVJL.  I found where I had user GetModuleFileName in a program to get it.  Have not tried GetCommandLine before.