|
Get next command line option and parameter - Parameters:
-
argc |
Count of command line arguments |
argv |
Array of command line argument strings |
pszValidOpts |
String of valid, case-sensitive option characters, a colon ':' following a given character means that option can take a parameter |
ppszParam |
Pointer to a pointer to a string for output |
- Returns:
-
- If valid option is found, the character value of that option is returned, and *ppszParam points to the parameter if given, or is NULL if no param.
- If standalone parameter (with no option) is found, 1 is returned, and *ppszParam points to the standalone parameter.
- If option is found, but it is not in the list of valid options, -1 is returned, and *ppszParam points to the invalid argument When end of argument list is reached, 0 is returned, and *ppszParam is NULL.
|