[pso] Re:[tema1][win]undocumented

Florin f.bratu at yahoo.com
Fri Mar 16 17:05:04 EET 2007


Da, m-am uitat in WRK, acolo am si gasit mentionata metoda 
de iterare peste procesele din sistem.

In psenum.c zice asa:

<code>
PEPROCESS
PsGetNextProcess (
    IN PEPROCESS Process
    )
/*++

Routine Description:

    This function allows code to enumerate all the active processes in the system.
    The first process (if Process is NULL) or subsequent process (if process not NULL) is returned on
    each call.
    If process is not NULL then this process must have previously been obtained by a call to PsGetNextProcess.
    Enumeration may be terminated early by calling PsQuitNextProcess on the last non-NULL process
    returned by PsGetNextProcess.

    Processes may be referenced and used later safely.

    For example, to enumerate all system processes in a loop use this code fragment:

    for (Process = PsGetNextProcess (NULL);
         Process != NULL;
         Process = PsGetNextProcess (Process)) {
         ...
         ...
         //
         // Early terminating conditions are handled like this:
         //
         if (NeedToBreakOutEarly) {
             PsQuitNextProcess (Process);
             break;
         }
    }
    

Arguments:

    Process - Process to get the next process from or NULL for the first process

Return Value:

    PEPROCESS - Next process or NULL if no more processes available

--*/
<\code>

In ps.h zice:
<code>
PEPROCESS
PsGetNextProcess (
IN PEPROCESS Process
);
<\code>

So, avand in vedere ca prototipul functiei nu este precedat de nici un indicator, 
se presupune by default ca este extern nu? eu asa stiam. Deci, probabil cauza este in alta parte.


>Florin wrote:
>> nu inteleg de ce... can anyone help?
>> 
>
>posibil sunt implementate ca statice in kernel - sau ceva in asa fel 
>incat sa nu poata fi exportate ... te-ai uitat in wrk?
>
>Razvan



 
---------------------------------
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20070316/361d98a7/attachment.htm


More information about the pso mailing list