• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Tasklist simulator for win 9x....

Hi

I need source code for list all files in tasklist (exactly identical) in windows 9x...
Please... dont send to me the "process list"... I need only get the programs list in taskmanager...

thanks

0
masvmasv
Asked:
masvmasv
  • 4
  • 3
1 Solution
 
jkrCommented:
See the following MS KB article:

 HOWTO: Enumerate Applications in Win32
 http://support.microsoft.com/support/kb/articles/Q175/0/30.ASP


This should provide all the necessary information on how to do that.

Feel fre to ask if you need more information!
0
 
masvmasvAuthor Commented:
Thanks...

But I need list only process visible in TaskList and don't all processes..

I need show only processes "visible" in tasklist...
0
 
jkrCommented:
So you think of the processes in the task bar?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
masvmasvAuthor Commented:
Hi...
I need only list the processes  "visible" in taskmanager...
If I use the enumprocess() ... list all process...
0
 
jkrCommented:
Aaah, now I see what you mean - Win9x doesn't display all running processes (using NT mostly, I wasn't aware of that)

You'll have to use the code from the above KB article to find all processes and find out whether they are visible using the following code for each PID (process ID) that is listed:

// globals
HWND  g_hwnd;
int   g_bVisible;

BOOL CALLBACK FindHwndFromPID( HWND hwnd, LPARAM lParam) :


BOOL IsProcessVisible( DWORD dwProcessId)
{
 g_hwnd = NULL;
 g_bVisible = FALSE;

 EnumWindows (  FindHwndFromPID,    ( LPARAM) dwProcessId));

 if ( g_bVisible )  // we found one...
      return ( TRUE);

 // nothing found :-(

 return (NULL);
}

BOOL CALLBACK FindHwndFromPID( HWND hwnd, LPARAM lParam)
{
    DWORD   dwPID2Find  =   ( DWORD) lParam;
    DWORD   dwPID       =   0;

    if  (   GetWindowThreadProcessId    (   hwnd,   &dwPID))
        {
            if  (   dwPID   ==  dwPID2Find)
                {
                    g_hwnd  =   hwnd;

                    g_ bVisible =  TRUE;

                    return  (   FALSE);
                }
        }

    return  (   TRUE);
}
0
 
jkrCommented:
Ooops, sorry,

 // nothing found :-(

 return (NULL);


should of course read

 // nothing found :-(

 return (FALSE);
0
 
masvmasvAuthor Commented:
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now