43{
47
48 if (SplitCommand.size() != 2)
49 {
52 return;
53 }
54
55
56
57
58 if (!SplitCommand.at(1).compare("mode") || !SplitCommand.at(1).compare("!mode"))
59 {
61 }
62 else
63 {
64
65
66
68 SplitCommand.at(1).c_str());
69 return;
70 }
71
73
74
75
76
77 Status = DeviceIoControl(
80 &PreactivateRequest,
82 &PreactivateRequest,
84
85 &ReturnedLength,
86 NULL
87 );
88
89 if (!Status)
90 {
91 ShowMessages(
"ioctl failed with code 0x%x\n", GetLastError());
92 return;
93 }
94
96 {
97 ShowMessages(
"the requested service is activated successfully!\n");
98 }
99 else
100 {
101
102
103
105 }
106}
int BOOL
Definition BasicTypes.h:23
unsigned long ULONG
Definition BasicTypes.h:37
#define DEBUGGER_OPERATION_WAS_SUCCESSFUL
General value to indicate that the operation or request was successful.
Definition ErrorCodes.h:23
#define IOCTL_PREACTIVATE_FUNCTIONALITY
ioctl, to preactivate a functionality
Definition Ioctls.h:289
@ DEBUGGER_PREACTIVATE_COMMAND_TYPE_MODE
Definition RequestStructures.h:190
#define SIZEOF_DEBUGGER_PREACTIVATE_COMMAND
Definition RequestStructures.h:194
BOOLEAN ShowErrorMessage(UINT32 Error)
shows the error message
Definition debugger.cpp:38
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:471
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
VOID CommandPreactivateHelp()
help of the preactivate command
Definition preactivate.cpp:20
requests for the 'preactivate' command
Definition RequestStructures.h:202
UINT32 KernelStatus
Definition RequestStructures.h:204
DEBUGGER_PREACTIVATE_COMMAND_TYPE Type
Definition RequestStructures.h:203