83{
84 if (CommandTokens.size() != 2 && CommandTokens.size() != 3)
85 {
86 ShowMessages("incorrect use of the '%s'\n\n",
89 return;
90 }
91
92
93
94
95 if (CommandTokens.size() == 2 &&
97 {
98
99
100
102 {
103 return;
104 }
105
107 {
109
111 }
112 else
113 {
114 ShowMessages("the vmm module is not loadedd\n");
115 }
116 }
117 else if (CommandTokens.size() == 2 &&
119 {
120
121
122
124 {
125 return;
126 }
127
129 {
131 }
132 else
133 {
134 ShowMessages("the trace (hypertrace) module is not loadedd\n");
135 }
136 }
137 else if (CommandTokens.size() == 2 &&
141 {
142
143
144
146 {
147 return;
148 }
149
151 {
153 }
154 else
155 {
156 ShowMessages("the kd (kernel debugger) module is not loadedd\n");
157 }
158 }
159 else if (CommandTokens.size() == 2 &&
161 {
162
163
164
166 {
167 return;
168 }
169
170
171
172
174 {
175 ShowMessages("no module is loaded\n");
176 return;
177 }
178
179 ShowMessages("unloading all modules\n");
180
181
182
183
185 {
186 ShowMessages("err, failed to unload all modules\n");
187 return;
188 }
189 else
190 {
191 ShowMessages("all modules are unloaded\n");
192 }
193 }
199 {
200
201
202
204 {
205 return;
206 }
207
208
209
210
212 {
213 ShowMessages("err, failed to unload all modules\n");
214 return;
215 }
216
217
218
219
221 {
222 ShowMessages("err, failed to stop driver\n");
223 return;
224 }
225
226
227
228
230 {
231 ShowMessages("err, failed to uninstall the driver\n");
232 return;
233 }
234
235 ShowMessages("all drivers are removed\n");
236 }
237 else
238 {
239
240
241
242 ShowMessages("err, module not found\n");
243 }
244}
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN CompareLowerCaseStrings(CommandToken TargetToken, const CHAR *StringToCompare)
Compare lower case strings.
Definition common.cpp:503
BOOLEAN g_IsHyperTraceModuleLoaded
shows whether the HyperTrace module is loaded or not
Definition lbrdump.cpp:19
INT HyperDbgUnloadVmm()
Unload VMM module.
Definition libhyperdbg.cpp:388
BOOLEAN HyperDbgIsAnyModuleLoaded()
check if any module is loaded (KD, VMM, HyperTrace, etc.)
Definition libhyperdbg.cpp:604
INT HyperDbgUnloadHyperTrace()
Unload HyperTrace module.
Definition libhyperdbg.cpp:457
INT HyperDbgStopKdDriver()
Stop KD driver.
Definition libhyperdbg.cpp:144
BOOLEAN g_IsKdModuleLoaded
shows whether the kernel debugger (KD) module is loaded or not
Definition globals.h:22
INT HyperDbgUnloadKd()
Unload KD driver.
Definition libhyperdbg.cpp:505
INT HyperDbgUnloadAllModules()
unload all modules (KD, VMM, HyperTrace, etc.)
Definition libhyperdbg.cpp:628
INT HyperDbgUninstallKdDriver()
Remove the KD (Kernel Debugger) driver.
Definition libhyperdbg.cpp:178
BOOLEAN g_IsVmmModuleLoaded
shows whether the VMM module is loaded or not
Definition globals.h:28
VOID CommandUnloadHelp()
help of the unload command
Definition unload.cpp:30
BOOLEAN CommandUnloadCheckEnvironment()
check the environment for unload command
Definition unload.cpp:51