Getting active tasks list in VB 
Author Message
 Getting active tasks list in VB

Hi

doeas anyone know how to get a list of active tasks into VB - I assume
there is an API call you can make since task manager (ctl-alt-del)
seems to be able to list running tasks. I need to be able to
interrogate the task list of a remote computer to monitor when/if an
app has died.

Cameron

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Fri, 26 Jul 2002 03:00:00 GMT  
 Getting active tasks list in VB

Have a look at the 'CreateToolhelp32Snapshot' API.  It is included in Win95
API and later, and NT "5" and later.  You can enumerate the running
processes on the system.  Next use 'Process32Next' and 'Process32First' api
calls to go through each of the items in the process list.  They have a
pointer to the processentry32 structure which is initialized with the
process info ie. name, path, exe etc.

Check out the MSDN article:
 HOWTO: List Running Processes
Article ID: Q187913

-Hiram

Quote:

>Hi

>doeas anyone know how to get a list of active tasks into VB - I assume
>there is an API call you can make since task manager (ctl-alt-del)
>seems to be able to list running tasks. I need to be able to
>interrogate the task list of a remote computer to monitor when/if an
>app has died.

>Cameron

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Fri, 26 Jul 2002 03:00:00 GMT  
 Getting active tasks list in VB
Thanks Hiram

Fantastic pointer in the right direction, would it be pushing
friendship to ask if you know a way to list the processes on a remote
machine ID (assuming I had administrator access - which I do)?

Cameron



Quote:

> Have a look at the 'CreateToolhelp32Snapshot' API.  It is included in
Win95
> API and later, and NT "5" and later.  You can enumerate the running
> processes on the system.  Next use 'Process32Next'

and 'Process32First' api
Quote:
> calls to go through each of the items in the process list.  They have
a
> pointer to the processentry32 structure which is initialized with the
> process info ie. name, path, exe etc.

> Check out the MSDN article:
>  HOWTO: List Running Processes
> Article ID: Q187913

> -Hiram




Quote:
> >Hi

> >doeas anyone know how to get a list of active tasks into VB - I
assume
> >there is an API call you can make since task manager (ctl-alt-del)
> >seems to be able to list running tasks. I need to be able to
> >interrogate the task list of a remote computer to monitor when/if an
> >app has died.

> >Cameron

> >Sent via Deja.com http://www.deja.com/
> >Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 27 Jul 2002 03:00:00 GMT  
 Getting active tasks list in VB
Hello Cameron

I don't know of a straight forward way of getting the process of a remote
machine.  Using the CreateToolhelp32Snapshot and DCOM you may be able to
create an ActiveX exe that would install on the remote machine, then your
machine may be able to 'poll' the remote machine. The ActiveX exe can check
the remote machine processes and send info back to the calling component on
your machine on whether the process was detected.  I have only used DCOM
technology once experimentally and it was very frustrating to get it working
properly.  As I recall, if you want to activate DCOM exes on different
remote machines you may have to run separate installs instead of one, as
each install will 'link'  via the GUID to another distributed component
residing on various remote machines.  I may be wrong about this, but that is
how I did it.

Can you use other methods of detection?  Say if this is a custom exe you are
checking, have it write something to a temp folder upon executing and
removal on exiting, so you may check for this file signature, or write a
monitoring exe on the remote sys that could notify or create a signature if
the process is discovered?

-Hiram

Quote:


<snip>
>> Check out the MSDN article:
>>  HOWTO: List Running Processes
>> Article ID: Q187913
>> -Hiram


>> >Hi
>> >doeas anyone know how to get a list of active tasks into VB - I
>assume
>> >there is an API call you can make since task manager (ctl-alt-del)
>> >seems to be able to list running tasks. I need to be able to
>> >interrogate the task list of a remote computer to monitor when/if an
>> >app has died.

>> >Cameron



Sun, 28 Jul 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Checking Task List for Active Application

2. Getting Task List

3. Getting A Windows 95 Task List

4. Getting a Task List

5. Getting a list of Running Tasks in Windows 98

6. getting name of exe file from task list

7. Getting list of ICONS of current tasks

8. Adding tasks to a named task list

9. Keep updated copy of this task on my task list

10. VBA task insert into an existing task list?

11. Hiding Task ID in Task List

12. need help on ending a task in windows task list

 

 
Powered by phpBB® Forum Software