feat comm init win10-win11
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#include "comm.h"
|
||||
#include "utils.h"
|
||||
#include "comm_win10.h"
|
||||
#include "comm_win7.h"
|
||||
|
||||
namespace kernel_comm_create
|
||||
{
|
||||
auto Init() -> BOOL
|
||||
{
|
||||
auto version = utils::GetVersion();
|
||||
if (version.dwBuildNumber == 7600 || version.dwBuildNumber == 7601)
|
||||
{
|
||||
//win7
|
||||
if (comm_win7::comm_init())
|
||||
{
|
||||
return comm_win7::comm_install_hook();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//win10
|
||||
if (comm_win10::comm_init())
|
||||
{
|
||||
return comm_win10::comm_install_hook();
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto remove() -> BOOL
|
||||
{
|
||||
auto version = utils::GetVersion();
|
||||
if (version.dwBuildNumber == 7600 || version.dwBuildNumber == 7601)
|
||||
{
|
||||
//win7
|
||||
return comm_win7::comm_remov_hook();
|
||||
}
|
||||
else
|
||||
{
|
||||
return comm_win10::comm_remov_hook();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user