Re:Where do argc and argv come from?
by kevin_thibedeau on Monday August 10, 2020 @03:36PM
(#24113156)
It isn't done by the shell on Windows.
[ Parent
| on HN ]
The shell is whatever you use as a shell. Be that cmd, powershell or your own invention. My point is that it doesn't matter. The shell can process the command line however it likes but all the application receives is a single string.
The application can then do whatever it likes with the string. Sure you can use an entry point that parses the arguments in different ways but that's still the application parsing the string. You're just using a library function to do the parsing instead of doing it manually.
At no point does "Windows" do anything. As far as its concerned it's just a string being passed in at process creation.
If it's not the shell and not the application, are you saying there's a kernel setting that enables glob expansion?
I suspect you're really talking about linking to setargv.obj?
Re:Where do argc and argv come from?
by kevin_thibedeau on Monday August 10, 2020 @05:31PM
(#24114228)
You link an alternate library into the application and it will expand args for you.