Thanks TS-SOFT for your explaination
It's good to, do not feel alone, with a problem
Apparently and if i have understand, the instruction freestring is use only for free string (Obviously, i'm really a mule

)
Well with other like "%d" "%o" it's no important to write the freestring instruction, that's right ???
I have do your method, for the include.
i have removed the "PureDispHelper" and "PureOCXHelper" lib installation of the userlib, and removed the UserLibraries in the SubSystems.
I have run PB 4.20 Beta2 and he said "dh...... is not a fonction .....".
Obviously that's normal.
I have copy the file "PureDisphelper\PureDisphelper\PureBasic\Examples\DispHelper_Include\DispHelper_Include.pb" in the folder of my application.
I have rename this file "DispHelper_Include.pb"in "DispHelper_Include.pbi"
I have add this sentence in begin of my code
He asked me the "disphelper.lib"
Then i copy the "PureDisphelper\PureDisphelper\PureBasic\Examples\DispHelper_Include\disphelper.lib" into my folder.
And i have an error on the first dhFreeString line :
At the line 53 of this code :
Code: Alles auswählen
IncludeFile "DispHelper_Include.pbi"
Structure SessionTGC
Nom.s[5]
Adresse.l[5]
EndStructure
Global Dim TabSessions.SessionTGC(5)
Procedure CreateSession()
Define Count.l
Define SessionEnCours.l
Define Name.l
SessionTGC = dhCreateObject("Extra.Sessions")
dhGetValue("%d", @Count, SessionTGC, ".count")
For Sess = 1 To Count
dhGetValue("%T", @Name, SessionTGC, ".item(%d)", Sess)
dhGetValue("%o", @SessionEnCours, SessionTGC, ".item(%d)", Sess)
TabSessions(Sess)\Nom = PeekS(Name)
TabSessions(Sess)\Adresse = SessionEnCours
dhFreeString(Name)
dhFreeString(SessionEnCours)
Next
EndProcedure
Procedure AdresseSession(NomSessionChoisie.s)
For i = 1 To 5
If UCase(Trim(TabSessions(i)\Nom)) = UCase(Trim(NomSessionChoisie))
ProcedureReturn TabSessions(i)\Adresse
EndIf
Next
ProcedureReturn 0
EndProcedure
Define Result.l
Define Session.l
NomSessionChoisie.s = "ERA191"
CreateSession()
Session = AdresseSession(NomSessionChoisie.s)
dhGetValue("%T", @Result, Session,".Screen.Area(%d, %d, %d, %d, %m, %d)", 18, 2, 18, 20, 1)
dhFreeString(Result)
Debug PeekS(Result)
Session = AdresseSession(NomSessionChoisie)
dhGetValue("%d", @Result, Session,".Screen.OIA.Xstatus")
dhFreeString(Result)
; The Variable Result is good
Session2 = AdresseSession(NomSessionChoisie.s)
dhGetValue("%T", @Result, Session,".Screen.Area(%d, %d, %d, %d, %m, %d)", 18, 2, 18, 20, 1)
dhFreeString(Result)
; Error at this line
Debug PeekS(Result)
The life is too hard with me
