Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
In if condition argc value will be 1 whenever i do debug but control is not going for loop condition.

example link:
http://msdn.microsoft.com/en-us/library/windows/desktop/hh446605(v=vs.85).aspx[^]
Posted

You already asked this question at Facing error 87 in Getpackagefullname API (MSDN)[^]. Please do not repost, if you have additional information then please edit your original question.

You could start by providing the information that I repeatedly asked you for.
 
Share this answer
 
I think you refer to this part of the example code:
C++
if (argc <= 1)
    return ShowUsage();
for (int i=1; i<argc;>

If you would know the meaning of the C main function arguments, you would not ask this question. argc is the number of arguments passed on the command line and provided in argv where the first argument argv[0] is the name of the program if known or an empty string. So argc will be always at least 1.

If you want argc to be greater than 1 do what ShowUsage prints out:
Pass one or more additional command line arguments (PID numbers for the example program).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900