@ Freddix - keeping it simple, can you see anything wrong with this bit of purebasic code:-
ProcedureCDLL.l DF_GET_MAX1( OldString.l, FirstText.l, SecondText.l)
If OldString <> 0
CallCFunctionFast( *GlobPtrCreateDeleteString, OldString , 0 )
EndIf
result.s = PeekS(FirstText)
If PeekS(SecondText) > PeekS(FirstText)
result = PeekS(SecondText)
EndIf
CallCFunctionFast(*GlobPtrCreateDeleteString, @temp.l , Len( result ) + 1 )
PokeS( temp , result )
ProcedureReturn temp
EndProcedure
[edit] Doh! I spotted it - you missed a "\" in the "*GlobPtrCreateDeleteString" you sent me in your code clip above and email - of course it should be "*GlobPtr\CreateDeleteString". will try it again now...
a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...