| 306 | } |
| 307 | |
| 308 | std::string CFunctions::GetProcessCommandLine(bool bPassFirstArg) |
| 309 | { |
| 310 | std::string szOutput = ""; |
| 311 | |
| 312 | int iArgCount = 0; |
| 313 | auto wcArgs = g_winapiApiTable->CommandLineToArgvW(g_winapiApiTable->GetCommandLineW(), &iArgCount); |
| 314 | if (!iArgCount) |
| 315 | return szOutput; |
| 316 | |
| 317 | for (int i = bPassFirstArg ? 1 : 0; i < iArgCount; ++i) |
| 318 | { |
| 319 | std::wstring wszArgLaunch = wcArgs[i]; |
| 320 | std::string szArgLaunch(wszArgLaunch.begin(), wszArgLaunch.end()); |
| 321 | |
| 322 | szOutput += szArgLaunch; |
| 323 | szOutput += " "; |
| 324 | } |
| 325 | |
| 326 | return szOutput; |
| 327 | } |
| 328 | |
| 329 | std::string CFunctions::GetFirstArgument(bool bLower, bool bFirst) |
| 330 | { |
no test coverage detected