Jump to content


Photo

Checkprocess


  • This topic is locked This topic is locked
67 replies to this topic

#1 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 12 June 2008 - 08:21 PM

CheckProcess

CheckProcess is a simple DLL that returns weather a process is running (such as notepad.exe) You can even type NoTePaD.ExE and it will also work.

With version 1.1 you can also end a process...


Version: GM6

Download: http://www.dwof.net/...heckProcess.zip


Version 1.1 With Process Killing!: http://www.dwof.net/...kProcess1.1.zip


Instant Play Check: Thanks to Lukearentz for making an Instant Play Check (It checks if your game is running in YoYo's Instant Play. (I converted it into a gm6 for those who still use game maker 6)
Download: http://www.dwof.net/...ntPlayCheck.zip

Edited by KC LC, 20 July 2009 - 01:26 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#2 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 13 June 2008 - 03:44 AM

Very nice thank you for posting this
  • 0

Posted Image


#3 DarkFlame

DarkFlame

    GMB Member...wtf?

  • GMC Member
  • 2167 posts

Posted 13 June 2008 - 05:06 AM

needs to be able to kill the process also
  • 0

#4 Lukearentz

Lukearentz

    My Two Cents

  • New Member
  • 2587 posts

Posted 13 June 2008 - 05:15 AM

Thanks. Very nice and simple.
I have already implemented it into my game as a Check if running in instantplay.
That way it can run in fullscreen automatically if not in instant play.

Thanks.
  • 0
I have left the GMC, and my domain is no longer registered to me.
All previous links will not work, for any information/links please PM me, and I may be able to help you

#5 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 13 June 2008 - 06:23 AM

yeah no problem guys it only took like 10 min to make!

needs to be able to kill the process also

yeah... I was gonna do that, but thats against the rules...
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#6 cbrad24

cbrad24

    GMC Member

  • New Member
  • 96 posts

Posted 13 June 2008 - 06:31 AM

WindowDLL by The_Doominator can close windows, so I guess you could try. Worst case might be a warning?

If that fails there's always PM :whistle: .
  • 0

#7 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 13 June 2008 - 06:32 AM

lol kk, I will add some more features soon, when ever I get around to it...
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#8 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 13 June 2008 - 09:55 AM

Awesome but you should probably add something dll side if you add processor ending to stop it from ending processes like explorer.exe
  • 0

Posted Image


#9 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 13 June 2008 - 11:43 AM

Isn't explorer.exe like super important? Which is why KillProcess DLLs are not allowed!
  • 0

#10 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 13 June 2008 - 04:53 PM

Haha no, explorer.exe isn't

super important

... When ever I accedently quit out of Explorer.exe... I just press Ctrl + Alt + Del, then click
File > New task > "explorer"

Also why would anyone make a program quit out of explorer.exe in the first place?
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#11 Zezuken

Zezuken

    AKA: Warriorccc0

  • GMC Member
  • 2799 posts
  • Version:Unknown

Posted 13 June 2008 - 05:07 PM

Also why would anyone make a program quit out of explorer.exe in the first place?


Virus?
  • 0

#12 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 13 June 2008 - 06:40 PM

What a crappy virus.
  • 0

#13 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 13 June 2008 - 06:53 PM

Haha yeah rite... "OMG THIS GAME JUST MADE THE START MENU GO AWAY!!!!"
lmao... anyone who tries to make a virus with GM is a complete n00b... Plus, I'm not going to waist my time (not to mention probably add a couple k to the dll) adding a protection from "viruses"...
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#14 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 14 June 2008 - 12:52 AM

But if the person makes that it ends it every step and end task manager and makes it start up at start.

But as you said noone would make a virus in GM so theres really no point.

Edited by death-droid, 14 June 2008 - 12:53 AM.

  • 0

Posted Image


#15 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 14 June 2008 - 02:55 AM

But if the person makes that it ends it every step and end task manager and makes it start up at start.

lmao I did that and forgot to make a secret exit key to end the program lmao... it took a while to get it out lmao!
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#16 DarkFlame

DarkFlame

    GMB Member...wtf?

  • GMC Member
  • 2167 posts

Posted 14 June 2008 - 03:22 AM

the reason i would need it to exit explorer would be for an operating system i am building for my usb drive (a mixture of game maker and vb)

i already have a bunch of portable programs and a range of software i would need,...all im missing is something that will end explorer on start and boot explorer on end.


anyways a game maker virus is always pointless because if you can program in game maker,...you can learn batch in a few minutes,...and batch being twice as powerful and usually (literally) 700 times smaller whats the point?

infact i could just make the game maker write a bat to close explorer no dll needed!

im a genius (actually its really obvious)


for all those who dont know any batch id suggest useing this dll (when he adds process killing)
  • 0

#17 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 14 June 2008 - 03:38 AM

for all those who dont know any batch id suggest useing this dll (when he adds process killing)

lol yeah... I already did like yesterday... version 1.1........
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#18 cbrad24

cbrad24

    GMC Member

  • New Member
  • 96 posts

Posted 14 June 2008 - 07:27 AM

Good idea darkflame... Anything i cant do in gm or with a dll i cant find i can always turn to batch files :) . Just recently i made a batch file that will defrag, disk clean up & check for errors in every drive. (PM for it)

If that fails then... Who knows?

I'd still like to see a kill process via dll cuz u don't have a cmd window pop up.

Edited by cbrad24, 14 June 2008 - 07:30 AM.

  • 0

#19 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 14 June 2008 - 12:03 PM

when he adds process killing


He isn't allowed to, mods will remove the topic and links.
  • 0

#20 walter1996

walter1996

    GMC Member

  • New Member
  • 203 posts

Posted 14 June 2008 - 12:19 PM

Very usefull! If you are making a game, you can use this to check that proccesses like "Cheat Engine" aren't running :).


9/10
  • 0
Want Text-To-Speech in Lite/Unreg? Check out this topic then!

The Swedish Game making Community!

#21 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 14 June 2008 - 12:55 PM

Yes, we just need a script that lists all of those and checks.
  • 0

#22 Lukearentz

Lukearentz

    My Two Cents

  • New Member
  • 2587 posts

Posted 15 June 2008 - 01:15 AM

Someone could always rename the programs exe before running it couldn't they?
  • 0
I have left the GMC, and my domain is no longer registered to me.
All previous links will not work, for any information/links please PM me, and I may be able to help you

#23 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 15 June 2008 - 02:44 AM

Someone could always rename the programs exe before running it couldn't they?

Yupp.
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#24 Lukearentz

Lukearentz

    My Two Cents

  • New Member
  • 2587 posts

Posted 15 June 2008 - 02:46 AM

Well that doesn't matter for checking something like instant play, so its still good.
  • 0
I have left the GMC, and my domain is no longer registered to me.
All previous links will not work, for any information/links please PM me, and I may be able to help you

#25 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 15 June 2008 - 02:51 AM

Yupp.
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#26 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 15 June 2008 - 02:53 AM

Also, In the future... I will add something like if game maker is open you can search for "game" and it will return true, so if you want to be exact then you would search for "gamemaker.exe", because something like "gamemonster.exe" could be open.

Edited by remoladen, 15 June 2008 - 02:55 AM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#27 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 15 June 2008 - 06:33 PM

Ok Lukearentz, I added the InstantPlayCheck. Thanks.
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#28 alexw

alexw

    GMC Member

  • New Member
  • 103 posts

Posted 16 June 2008 - 11:20 AM

This is an handy dll.
Because if u gonna make an program with GM.
U can use this dll if see if ur program is already running to prevent mutiple program to be open.

Alexw
  • 0
The A.S. Clubę has been working on a new project. Called The Golden Century.
In this new game you are going experience to be at war on sea or on land, in the Golden Age.
For more information, check the The Golden Century Homepage.

#29 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 16 June 2008 - 11:53 AM

This is an handy dll.
Because if u gonna make an program with GM.
U can use this dll if see if ur program is already running to prevent mutiple program to be open.

Alexw

I don't know what possible use that would be, except for online games. Also, if both close when another is running...will both close?

Renaming your program will not change it, it is what appears on the window caption that varies...Therefore, the EXE name has nothing to do with it.
  • 0

#30 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 16 June 2008 - 06:14 PM

...um yes... it checks for the process...

Edited by remoladen, 16 June 2008 - 06:17 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#31 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 16 June 2008 - 08:47 PM

:unsure: To me?

I can make this in three minutes, Vista issues may occur.
  • 0

#32 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 16 June 2008 - 09:03 PM

Renaming your program will not change it, it is what appears on the window caption that varies...Therefore, the EXE name has nothing to do with it.

Yes to u lol, because it check if the exe name is running, so if you search for notepad.exe, your not searching for "Untitled - Notepad", your searching for the exe name. But then u are right about them both closing...

Edited by remoladen, 16 June 2008 - 09:04 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#33 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 16 June 2008 - 09:25 PM

Even worse...you are going to get this topic closed :unsure: I will make one of these as you never made a really good one, not secure...

Remove KillProcess as it is against the rules!
  • 0

#34 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 16 June 2008 - 09:28 PM

Ok, I made it as good as it could have been made... And fine I'll remove the process killing......
ANYONE CAN PM ME IF YOU WANT THE LINK... lol

Edited by remoladen, 16 June 2008 - 09:31 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#35 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 16 June 2008 - 10:20 PM

Umm, great color...if you really want to use a close color use "#EDEDED" as it blends in almost perfectly.

Tell me, what function did you use to make this work?
  • 0

#36 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 16 June 2008 - 10:37 PM

What the checking process or the killing process?
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#37 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 16 June 2008 - 10:44 PM

for the Killing process I used:
function KillTask(ExeFileName: string): Double;cdecl;
const
  PROCESS_TERMINATE = $0001;
var
  ContinueLoop: BOOL;
  FSnapshotHandle: THandle;
  FProcessEntry32: TProcessEntry32;
begin
  Result := 0;
  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
  while Integer(ContinueLoop) <> 0 do
  begin
	if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
	  UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =
	  UpperCase(ExeFileName))) then
	  Result := Integer(TerminateProcess(
						OpenProcess(PROCESS_TERMINATE,
									BOOL(0),
									FProcessEntry32.th32ProcessID),
									0));
	 ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
  end;
  CloseHandle(FSnapshotHandle);
end;

and for the checking process I used
function processExists(exeFileName: string): double;cdecl;
var
  ContinueLoop: BOOL;
  FSnapshotHandle: THandle;
  FProcessEntry32: TProcessEntry32;
begin
  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
  Result := 0;
  while Integer(ContinueLoop) <> 0 do
  begin
	if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
	  UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =
	  UpperCase(ExeFileName))) then
	begin
	  Result := 1;
	end;
	ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
  end;
  CloseHandle(FSnapshotHandle);
end;

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#38 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 16 June 2008 - 11:12 PM

Nice! I will show you a sample function in VB6 that will check for a window with that caption:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Function WindowExists(ByVal wCaption As String) As Single
	If FindWindow(vbNullString, wCaption) = vbNull Then
		WindowExists = 1
	Else
		WindowExists = 0
	End If
End Function
'Typed on the spot, may have errors and/or not work. (Case InSensitive)

Edited by GMREC1111, 16 June 2008 - 11:13 PM.

  • 0

#39 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 17 June 2008 - 01:57 AM

Hmm cool, but I can't test it out because I Don't have VB.
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#40 coolist

coolist

    The Coolist

  • New Member
  • 913 posts

Posted 17 June 2008 - 02:06 AM

He likes to show off his VB skills, hes learning VB. :unsure:

Edited by coolist, 17 June 2008 - 02:07 AM.

  • 0

#41 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 17 June 2008 - 12:21 PM

Having skills in VB is like having skills in Super Paper Mario =P
  • 0

#42 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 17 June 2008 - 02:08 PM

Agreed <_<
  • 0

Chris Matthews, Co-Leader of Digital X

#43 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 17 June 2008 - 03:26 PM

Lmao nice,
Delphi is the way to go!

VB, Too Basic;
C++, Takes too long to learn;
Delphi, AWESOME!!!
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#44 krele

krele

    GMC Member

  • GMC Member
  • 640 posts
  • Version:GM:Studio

Posted 17 June 2008 - 04:41 PM

needs to be able to kill the process also

use taskkill.exe to do that. Here's the example: //Remember to have notepad opened!
execute_shell("taskkill.exe","/f /IM "+notepad.exe);
Ah, the power of windows batch files...amazing... <_<

Edited by krele, 16 January 2009 - 11:40 PM.

  • 0

If I helped you, you can help me back :3

Brocoola


#45 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 17 June 2008 - 08:30 PM

VB, Too Basic;

Have you tried it yet? Most functions may be simple but I bet you would struggle with it xD Visual Basic is a really great language as it relates so much to GML and it's simplicity. You may just know a few things that can be done with VB6, I replicated this DLL in VB with a much safer way and the only problem there is, is that Vista (64) compatibilities...I still say Delphi is a professional language and is great, I still have no download link as I find links to add ons and other garbage...then the paid links...VB6 is somewhat free as MS left one thing wrong and it was an odd mistake <_<
  • 0

#46 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 17 June 2008 - 08:33 PM

Yeah, It's Much harder to download and install Delphi then C++ or VB6, but go to http://cc.codegear.c...e.aspx?id=24966 and Sign up for a free 30 day trial (you can just do this ever 30 days) and then download Delphi (they will give you a link) the download is I think over 1gb total, so it takes for ever, and just as long to install... but its an all in one process so you could just leave it overnight. First you will download something a couple megabytes (the RAD Studio Downloader)., then that will download Delphi.

Edited by remoladen, 17 June 2008 - 08:37 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#47 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 17 June 2008 - 08:57 PM

Meh, VB beats Delphi at file sizes <_<
  • 0

#48 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 17 June 2008 - 11:31 PM

Haha, yeah but thats a good thing? Delphi can do Way more things, therefore bigger size!
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#49 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 17 June 2008 - 11:47 PM

Real programmers use ASM.
  • 0

#50 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 18 June 2008 - 01:08 AM

Haha, yeah but thats a good thing? Delphi can do Way more things, therefore bigger size!

Umm, no. It could be filled with rubbish too ^_^ VB has a small size because it depends on the parts of the OS (Windows Only). Stuff like command buttons and scrollbars are stored in your computer rather than VB, custom controls are stored inside of them...

Real programmers use ASM.

I agree.


You inspire me to create another DLL, we will see :rolleyes:
  • 0