这个程序功能强大哦~~
本人是在Dev c++下编译的
用VC的请把第一个头文件改成你知道的所有头文件~~
代码展示:
#include <bits/stdc++.h>
#include <windows.h>
#include <winbase.h>
#include <wtypes.h>
#include <tlhelp32.h>
#include <psapi.h>
#include <tchar.h>
#include <unistd.h>
#include <sys/types.h>
#define illegal_parameter_value 100000000
#define illegal_parameter_value2 100000001
#pragma comment(lib,"kernel32.lib")
#pragma comment(lib,"advapi32.lib")
using namespace std;
bool compare(char a[],char b[])
{
if (strlen(a)!=strlen(b)) return false;
for (int i=0;i<strlen(a);i++)
if (a[i]!=b[i] && (a[i]-'a'+'A')!=b[i] && a[i]!=(b[i]-'a'+'A')) return false;
return true;
}
BOOL SetRealTimePriority()
{
if(!SetPriorityClass( GetCurrentProcess(), REALTIME_PRIORITY_CLASS )) return false;
return true;
}
BOOL EnableShutdownPriv()
{
HANDLE hToken;
LUID sedebugnameValue;
TOKEN_PRIVILEGES tkp;
if (!OpenProcessToken( GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken ) ) return false;
if (!LookupPrivilegeValue( NULL, SE_SHUTDOWN_NAME, &sedebugnameValue ) )
{
CloseHandle( hToken );
return false;
}
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Luid = sedebugnameValue;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if (!AdjustTokenPrivileges( hToken, FALSE, &tkp, sizeof tkp, NULL, NULL ) ) CloseHandle( hToken );
return true;
}
BOOL EnableDebugPriv()
{
HANDLE hToken;
LUID sedebugnameValue;
TOKEN_PRIVILEGES tkp;
if ( ! OpenProcessToken( GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hT