This is the code i have nowPHP Code:int nArgsCnt;
bool btStatus = false;
char szTemp[200] = {0};
char szPatch[200] = {0};
LPWSTR * lpCommandLine = CommandLineToArgvW(GetCommandLineW(),&nArgsCnt);
sscanf((char*)lpCommandLine,"%s",szTemp);
MessageBox(NULL, szPatch , szTemp , MB_OK|MB_APPLMODAL|MB_ICONERROR);
// i want see run it
if(!strcmpi(szTemp,"start"))
{
MessageBoxA(NULL, szPatch , szTemp , MB_OK|MB_APPLMODAL|MB_ICONERROR);
ExitProcess(1);
}
What i want to do is add a command line argument check, if dont have the argument "start" when launching the programm it will simply throw you a messagebox saying you are not allowed to run.
What is the argument i am talking about, it's this:
C:\Folder\Application.exe start
If you have any idea on how to solve this, please reply here. Thanks in advance.



Reply With Quote![[C++] Command Line Argument](http://ragezone.com/hyper728.png)


