OK I have seen all kinds of messages about parsing a command line switch but I cannot get it to work. I am a green as it comes with msvc. I found that if I use lpCmdLine it will give me the complete switch as a string but I read that was a no no. So how do you parse out the switches. I only need two switches.
#include "stdafx.h"
#include <iostream.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HKEY hRegistryKey;
char *sBuffer;
sBuffer = lpCmdLine; What I want here is the first and second switches.
bla bla bla
}
I am so green I don't even understand what to do with the .h and .ccp files.
Help?


Reply With Quote

