Resolved Listing all the procedure type handle

Hi everyone,

On my erp software, I have an app that list every handle procedure/window running with there handle ID:
1937

I tried to do the same but I can't manage to do it.

I was thinking that this info was saved in a VST Table but I don't find it.

Do you have any idea or solution ?

Best Regards and thank you in advance
 

Osborne

Active Member
If the procedures are running persistent then you can use SESSION:FIRST-PROCEDURE and loop through them all:


If not persistent then maybe PROGRAM-NAME, but do not know if you can get the handle from that:
Code:
DEFINE VARIABLE vCount AS INTEGER INITIAL 1 NO-UNDO.

DO WHILE PROGRAM-NAME(vCount) <> ?:
   MESSAGE PROGRAM-NAME(vCount) VIEW-AS ALERT-BOX.
   vCount = vCount + 1.
END.
 

KrisM

Member
Program-name() does not give you a handle.

You need
Code:
def var procHandle as handle.
procHandle = this-procedure.
do while procHandle <> ?:
    message "running" procHandle:file-name view-as alert-box.
    procHandle = procHandle:instantiating-procedure.
end.
 

andre42

Member
Osborne's Knowledge Base link is correct.
Relevant part:
Code:
DEFINE VARIABLE hProcedure   AS HANDLE     NO-UNDO.
hProcedure = SESSION:FIRST-PROCEDURE.
DO WHILE VALID-HANDLE(hProcedure):
  /* Process hProcedure here */
  hProcedure = hProcedure:NEXT-SIBLING.
END.
Judging from the screenshot you are only interested in procedures running locally on the client.

VSTs are useful, but they have nothing to do with procedures running on the client.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
VSTs are useful, but they have nothing to do with procedures running on the client.
Almost nothing, almost all the time. ;)
 
Osborne's Knowledge Base link is correct.
Relevant part:
Code:
DEFINE VARIABLE hProcedure   AS HANDLE     NO-UNDO.
hProcedure = SESSION:FIRST-PROCEDURE.
DO WHILE VALID-HANDLE(hProcedure):
  /* Process hProcedure here */
  hProcedure = hProcedure:NEXT-SIBLING.
END.
Judging from the screenshot you are only interested in procedures running locally on the client.

VSTs are useful, but they have nothing to do with procedures running on the client.

Hi this the right answer.

On my last code I was capturing the SESSION:first-child and wasn't good.
But with this I have the right answer Thank you
 
Top