Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeEclipse
titleExemplo 1
linenumberstrue
collapsefalse
user function exemplo()
  aInfo := GetUserInfoArray() // Resultado: (Informações dos processos)
  varinfo("Threads:",aInfo)
Return

Code Block
languagecpp
themeEclipse
titleExemplo 2
linenumberstrue
User Function exemplo4gl()
  Local i
  aInfo := GetUserInfoArray(.F.)
  conout("GetUserInfoArray com parametro .F.")
  for i := 1 to Len(aInfo)
    conout("ThreadID:" + cvaltochar(aInfo[i][3]) + " Program:" + aInfo[i][5] + " Obs:" + aInfo[i][11])
  next
  //Resultado:
  //[Thread  4920] GetUserInfoArray com parametro .F.
  //[Thread  4920] ThreadID:4920 Program:U_GINFARR Obs:
  //[Thread  4920] ThreadID:6392 Program:MAN0110.4GL Obs:
  //[Thread  4920] ThreadID:6428 Program:MEN1100 Obs:
  
  aInfo := GetUserInfoArray(.T.)
  conout("GetUserInfoArray com parametro .T.")
  for i := 1 to Len(aInfo)
    conout("ThreadID:" + cvaltochar(aInfo[i][3]) + " Program:" + aInfo[i][5] + " Obs:" + aInfo[i][11])
  next
  //Resultado:
  //[Thread  4920] GetUserInfoArray com parametro .T.
  //[Thread  4920] ThreadID:4920 Program:U_GINFARR Obs:
  //[Thread  4920] ThreadID:6392 Program:MAN0110.4GL Obs:Parent=1
  //[Thread  4920] ThreadID:6392 Program:RUN4GLPROCESS.4GL Obs:Parent=0
  //[Thread  4920] ThreadID:6428 Program:MEN1100 Obs:
Return

Abrangência

Advanced Protheus 6.09 , Advanced Protheus 7.10 , Microsiga Protheus 8.11 , Protheus 10 , TOTVS Application Server 10 , ByYou Application Server