How can I check to see if a process is running.

Just starting out? Need help? Post your questions and find answers here.
wings
User
User
Posts: 21
Joined: Fri Apr 25, 2003 5:09 pm
Location: Canada

How can I check to see if a process is running.

Post by wings »

When you go to the Windows task manager and you click on the tab called "processes", then you'll see all the processes that are running on your system.

I want to able to check for certain processes in Purebasic using the names that are shown in task manager.

I've played with some API's, was reading many Google news articles for almost an hour, but I'm still lost. I have no clue where to start.

Has someone an idea how to approach this problem.

Any help is really appreciated :wink:
wings
User
User
Posts: 21
Joined: Fri Apr 25, 2003 5:09 pm
Location: Canada

Post by wings »

Forget about it. It seems after one day that this isn't a very useful forum :(
I'll figure it out on my own.

Thanks anyway
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

#1 - This isn't a paid support forum. Not getting an answer in 24 hours doesn't mean you won't get an answer.

#2 Posting stuff like your 2nd message generally *will* mean you won't get an answer.

Best of luck to you, though.. It'd probably be best to hold those not-so-nice comments to yourself next time.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

Karbon wrote:#1 - This isn't a paid support forum. Not getting an answer in 24 hours doesn't mean you won't get an answer.

#2 Posting stuff like your 2nd message generally *will* mean you won't get an answer.

Best of luck to you, though.. It'd probably be best to hold those not-so-nice comments to yourself next time.
totaly agree Karbon.
I know the answer ,but with that statement in the second message i will never help .Sorry wings and good luck :)
SPAMINATOR NR.1
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Hmmmmm.... :| Probably, wings is an emotional lady. . .
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Rings wrote:I know the answer ,but with that statement in the second message i will never help .Sorry wings and good luck :)
Damn....

Some interesting viru... i mean features can be done with this!

Can you please share? I've looked in the API guide but the example (1) that comes with it does not work (takes a snapshot of the processes with another MS program which i do not have)

Pretty please :lol:
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Fine,

Code: Select all

clib_winid.l=FindWindow_(0,"<give name of window here>") ; name of the window 
@wings; sorry dude I did see when you first posted, and I was too ill to reply to it properly, I know how you feel I've had many a request for help that has gone unreplyed to, also some that have so it's a gamble posting here if you'll get help or not, I'll lost restaint on myself just for this moment, on the blitz forum you'd have had 3 examples all improving on the previous help within about 4-8 hours of your post. (sorry that offends anyone), (re-applys restaint) now then people here aren't a computer you can't just prod to get infomation out of, most of us are busy.

for example wings; viewtopic.php?t=6786 ; so your not the only one, your not singled out or anything, it's just the way things are, so what that (currently as of replying here) it's at 49 views, doesn't mean that 49 people knew what I was talking about or even understod the problem, there a multipal veriables to take into acount when asking for help, not to mention in my case people probably sitting scartching there heads wonderig why I man not using the standard Tree commands, and then not bothering with it.. ( there is a reason why I am not, it's because [_with all due respect to them_] they suck for how I need to operate my tree.

Anyway I am babeling, and probably said more than my head should of allowed, sorry if it offends..
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Inner wrote:Fine,

Code: Select all

clib_winid.l=FindWindow_(0,"<give name of window here>") ; name of the window 
ERh... not quite what i was expecting.... This only works for processes that have windows running...
What about processes started has invisible services :P

Now you know why i did not find it easy to make such a program... :P
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

small hint:

EnumProcessModules from PSAPI.DLL

on WIN89 machines you have to use ToolHelp.dll .
SPAMINATOR NR.1
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Hi rings, would you mind to post a little codesnipped?
Thanks for your help!

cya dige

PS: relay nice avatar ;-) *grrr*
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Rings wrote:small hint:

EnumProcessModules from PSAPI.DLL

on WIN89 machines you have to use ToolHelp.dll .
Well the example i saw in the API guides used this toolhelp.dll and now i understand why it didn't work :lol:

Anyways i don't have windows 89 copy to test it ;P
Post Reply