41 lines
770 B
C++
41 lines
770 B
C++
#include "comm_dispatch.h"
|
|
#include "protect_filter.h"
|
|
#include "anit_screen_grap.h"
|
|
namespace comm_dispatch
|
|
{
|
|
auto dispatch(CMD_COMM* data) -> NTSTATUS
|
|
{
|
|
|
|
auto status = STATUS_UNSUCCESSFUL;
|
|
switch (data->CommID)
|
|
{
|
|
case CMD::DRIVER_COMM_TEST:
|
|
{
|
|
status = STATUS_SUCCESS;
|
|
break;
|
|
}
|
|
case CMD::DRIVER_PROTECT_PROCESS:
|
|
{
|
|
auto process_data = (IOCTL_PROCESS*)data->Buf;
|
|
status = protect_filter::add_list((ULONG)process_data->Pid, NULL);
|
|
break;
|
|
}
|
|
case CMD::WINDOW_ANIT_SCREEN:
|
|
{
|
|
auto window_data = (IOCTL_WINDOW*)data->Buf;
|
|
|
|
status = anit_screen_grap::GreProtectSpriteContent(
|
|
(HWND)window_data->HWND, (UINT)window_data->Flags);
|
|
|
|
break;
|
|
}
|
|
default:
|
|
break;
|
|
}
|
|
|
|
*(NTSTATUS*)data->status = status;
|
|
return status;
|
|
}
|
|
}
|
|
|