3 ms·
FWIW, Windows (MSVC) also guarantees "argc > 0" and non-empty argv with non-empty argv[0]. It also returns EINVAL if execve validation fails.
by sedatk 5y ago
FWIW, Windows (MSVC) also guarantees "argc > 0" and non-empty argv with non-empty argv[0]. It also returns EINVAL if execve validation fails.
- garaetjjte 5y agoWindows doesn't have argv at all, it uses single string as cmdline arguments.
- sedatk 5y agoThe C runtime bridges that gap. https://docs.microsoft.com/en-us/cpp/cpp/main-function-command-line-args?view=msvc-170#standard-command-line-arguments https://docs.microsoft.com/en-us/cpp/cpp/main-function-comma...
- asveikau 5y agoAt the kernel level, yes. But they are talking about CRT, which parses the command line and makes argv from user space, if your linker is set up to have a main() and not WinMain. That is why they put MSVC in parens.