Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

Want help on command line parameters

Hi,
I am pretty much new to VC++. I am actually working on getting command line parameters to VC++ app. I have pasted my code into it:
int WINAPI WinMain(HINSTANCE hInstance,
                           HINSTANCE hPrevInstance,
                           LPSTR lpCmdLine,
                           int nCmdShow)
{
char* str2 = lpCmdLine;
//This actually gets only the first argument from the arguments list.
}
Eg: C:\>Hello.exe Test this out
I get only Test in the output.

Could somebody tellme how to get the command line parameters into this code.


Thanks in advance,
Pampa
0
pampa34
Asked:
pampa34
  • 2
1 Solution

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now