473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Game Blockage....

Hey there,

alright so I have been working on a project for awhile. I used a very easy scripting language to write a program that detected the full
screen window class and would close the window and lock keyboard and mouse stopping the user from game play... fast forward to now I now have the scipt much more efficient.
as of now it is still in AutoHotkey script and im hoping to port it to C++. How is works now is it checks the time and if approriate allows the games other wise it will run taskkill via command line and run a command simmilar to this "Taskkill /F /FI "Modules eq d3d9.dll" /FI "imagename ne Exception.exe" "
this kills all programs using the directx dll d3d9.dll with the exception of exception.exe. anyways what Im trying to do is have it check the time if the time isn't between say 12:20PM TO 1:05:PM it will run the command line provided mines a bit longer with more exceptions.. but if it is between those times have it do nothing... the last part im tryin
to do is put in this code I borrowed to make it unkillable...

#include <windows.h>
#include <stdio.h>

typedef VOID ( _stdcall *RtlSetProcessIsCritical ) (
IN BOOLEAN NewValue,
OUT PBOOLEAN OldValue, // (optional)
IN BOOLEAN IsWinlogon );

BOOL EnablePriv(LPCSTR lpszPriv) // by Napalm
{
HANDLE hToken;
LUID luid;
TOKEN_PRIVILEGES tkprivs;
ZeroMemory(&tkprivs, sizeof(tkprivs));

if(!OpenProcessToken(GetCurrentProcess(), (TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY), &hToken))
return FALSE;

if(!LookupPrivilegeValue(NULL, lpszPriv, &luid)){
CloseHandle(hToken); return FALSE;
}

tkprivs.PrivilegeCount = 1;
tkprivs.Privileges[0].Luid = luid;
tkprivs.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

BOOL bRet = AdjustTokenPrivileges(hToken, FALSE, &tkprivs, sizeof(tkprivs), NULL, NULL);
CloseHandle(hToken);
return bRet;
}

BOOL ProtectProcess() // by _FIL73R_
{
HANDLE hDLL;
RtlSetProcessIsCritical fSetCritical;

hDLL = LoadLibraryA("ntdll.dll");
if ( hDLL != NULL )
{
EnablePriv(SE_DEBUG_NAME);
(fSetCritical) = (RtlSetProcessIsCritical) GetProcAddress( (HINSTANCE)hDLL, "RtlSetProcessIsCritical" );
if(!fSetCritical) return 0;
fSetCritical(1,0,0);
return 1;
} else
return 0;
}

int main (void)
{
ProtectProcess();
while(1)
{
// do your virus thingy
}
return 0;
}

I know im asking alot but any help would be amazing thanks in advance...
Nov 11 '08 #1
1 1941
I know im asking alot but any help would be amazing thanks in advance...
There's not a single questionmark in your long post.
Nov 11 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
138
by: theodp | last post by:
--> From http://www.techdirt.com/articles/20040406/1349225.shtml Microsoft Patents Saving The Name Of A Game Contributed by Mike on Tuesday, April 6th, 2004 @ 01:49PM from the...
7
by: Brandon J. Van Every | last post by:
Anyone know of any "good" open source C# game projects out there? Something that actually has a game engine and some content done, so I can just fiddle with it and do interesting / goofy things. ...
1
by: fowle040 | last post by:
I underlined and bold print my files. I need to know how to make this code into a working game. The object of the game is to have two players 1- belle and 2-beast. I want them to lose and gain...
7
by: Gasten | last post by:
Hello. The last weeks I've been coding a roguelike (you know, like nethack) in python using the nCurses library. Some week ago I ran into a problem: When I made the object for messagebar-output, I...
5
by: Kraken | last post by:
Hi, i have a bit of a problem here. I have an assignment to do an animal guessing game using an original database and updating it as the user enters new animals in it. The program enters the file...
2
by: LilMeechc20 | last post by:
Hello, I have a group assignment that I have to do. We have to write a Tic Tac Toe game. One person in my group has managed to write the code for a multiplayer (human -vs- human) game and I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.