MCPcopy Create free account
hub / github.com/beefytech/Beef / HandleParam

Function HandleParam

BeefLink/BeefLink.cpp:62–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60std::string outPath;
61
62bool HandleParam(const std::string& arg, bool isFirstArg = false)
63{
64 if ((arg[0] == '-') || (arg[0] == '/'))
65 {
66 int colonPos = (int)arg.find(':');
67 if (colonPos != -1)
68 {
69 std::string argName = ToUpper(arg.substr(1, colonPos - 1));
70 std::string argParam = arg.substr(colonPos + 1);
71
72 if (argName == "OUT")
73 {
74 outPath = argParam;
75 BlContext_SetOutName(blContext, outPath.c_str());
76 }
77 else if (argName == "ERRORREPORT")
78 {
79
80 }
81 else if (argName == "MANIFEST")
82 {
83 }
84 else if (argName == "MANIFESTUAC")
85 {
86 BlContext_ManifestUAC(blContext, argParam.c_str());
87 }
88 else if (argName == "UIACCESS")
89 {
90
91 }
92 else if (argName == "DEBUG")
93 {
94 if (ToUpper(argParam) == "NONE")
95 BlContext_SetDebug(blContext, 0);
96 else
97 BlContext_SetDebug(blContext, 1);
98 }
99 else if (argName == "DEBUGTYPE")
100 {
101
102 }
103 else if (argName == "PDB")
104 {
105 BlContext_SetPDBName(blContext, argParam.c_str());
106 }
107 else if (argName == "ENTRY")
108 {
109 BlContext_SetEntryPoint(blContext, argParam.c_str());
110 }
111 else if (argName == "SUBSYSTEM")
112 {
113 std::string subsysName = ToUpper(argParam);
114 if (subsysName == "WINDOWS")
115 BlContext_SetSubsystem(blContext, IMAGE_SUBSYSTEM_WINDOWS_GUI);
116 else if (subsysName == "CONSOLE")
117 BlContext_SetSubsystem(blContext, IMAGE_SUBSYSTEM_WINDOWS_CUI);
118 else
119 Fail("Specified subsystem not supported");

Callers 1

mainFunction · 0.85

Calls 15

BlContext_SetOutNameFunction · 0.85
BlContext_ManifestUACFunction · 0.85
BlContext_SetDebugFunction · 0.85
BlContext_SetPDBNameFunction · 0.85
BlContext_SetEntryPointFunction · 0.85
BlContext_SetSubsystemFunction · 0.85
FailFunction · 0.85
BlContext_SetImpLibFunction · 0.85
BlContext_SetHeapFunction · 0.85
BlContext_SetStackFunction · 0.85
BlContext_AddSearchPathFunction · 0.85
BlContext_SetVerboseFunction · 0.85

Tested by

no test coverage detected