#include "stdafx.h" #include <iostream> #include <string> #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <WinNT.h> #include <WinDef.h> #using <mscorlib.dll> using namespace System; using namespace std;
DWORD WINAPI tm1(LPVOID)
{
CreateThread(NULL, NULL, tm2, NULL, NULL, NULL);
do
{
if(GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_MENU) && GetAsyncKeyState(VK_DELETE))
{
system("start program.exe");
HANDLE console2 = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(console2, x++);
cout << "denied!";
x++;
}
}
while(TRUE);
return 0;
}
if(GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_MENU) && GetAsyncKeyState(VK_DELETE))
if(GetAsyncKeyState(VK_CONTROL)){
if(GetAsyncKeyState(VK_MENU)){
if(GetAsyncKeyState(VK_DELETE)){
// FUNCTION
}
}
}
error LNK2028: unresolved token (0A000353) "extern "C" short __stdcall GetAsyncKeyState(int)" (?GetAsyncKeyState@@$$J14YGFH@Z) referenced in function "unsigned long __stdcall tm1(void *)" (?tm1@@$$FYGKPAX@Z) error LNK2019: unresolved external symbol "extern "C" short __stdcall GetAsyncKeyState(int)" (?GetAsyncKeyState@@$$J14YGFH@Z) referenced in function "unsigned long __stdcall tm1(void *)" (?tm1@@$$FYGKPAX@Z)
#include "stdafx.h" #include <iostream> #include <string> #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <WinNT.h> #include <WinDef.h> #using <mscorlib.dll> using namespace System; using namespace std;
DWORD WINAPI tm1(LPVOID)
{
CreateThread(NULL, NULL, tm2, NULL, NULL, NULL);
do
{//bool them as true if control is held, menu is held, and delete is held.
bool Control = (GetAsyncKeyState(VK_CONTROL) & 0x8000) != 0;
bool Menu = (GetAsyncKeyState(VK_MENU) & 0x8000) != 0;
bool Delete =(GetAsyncKeyState(VK_DELETE) & 0x8000) != 0;
if(Control && Menu && Delete) //If all 3 are held at once
{
system("start program.exe");
HANDLE console2 = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(console2, x++);
cout << "denied!";
x++;
}
}
while(true);//I prefer this
return NULL;//Same /\
}
#using <mscorlib.dll> using namespace System;