获取命令行参数
VOIDStartMain(){LPWSTR*szArglist;intnArgs;inti;szArglist=CommandLineToArgvW(GetCommandLineW(),&nArgs);if(NULL==szArglist){wprintf(L"CommandLineToArgvWfailed\n");return;}else{for(i=0;i<nArgs;i++){CStringstrTemp;strTemp.Format(_T("%s"),szArglist[1]);if(strTemp==_T("1"))StartPrintServer();if(strTemp==_T("2"))StarUserManage();}//释放CommandLineToArgvW参数占用的内存.LocalFree(szArglist);return;}}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。