MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / GetProcessCommandLine

Method GetProcessCommandLine

Source/Client/NM_Engine/Functions.cpp:308–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308std::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
329std::string CFunctions::GetFirstArgument(bool bLower, bool bFirst)
330{

Callers 3

OnClientInitMethod · 0.80
OnLauncherInitMethod · 0.80

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected