Can you share some more code? I want to see the difference you made in passing the arguments locally vs. passing them from outside the program.
EDIT:
Ok, I think I got the problem. When you pass in arguments from outside they are laid out sequentially. For example lets say you call test.exe --log_level=all --run_test=mt1
. The address of the first arg is 0x10000, say. Then the address of the next arg --log_level=all
begins at 0x10009 and so on. When you string up the argv yourself, this is not the case. So my suggestion would be to lay the arguments sequentially like above and give it a try.