If you had an int,
Local x:int = 5
and you had a C function - void myFunc( int x )
you could pass x into the function with
myFunc(x)
If the C function was - void myFunc( int * x )
you could pass it into the function with
myFunc( Varptr x)
For Strings... it depends on the context. I've found occasions where I can define my Extern as myString:Byte Ptr, and simply pass the string into the function itself.
In other places I convert to a CString first...
Local x:int = 5
and you had a C function - void myFunc( int x )
Extern Function myFunc( x:Int ) End Extern
you could pass x into the function with
myFunc(x)
If the C function was - void myFunc( int * x )
Extern Function myFunc( x:Int Ptr ) End Extern
you could pass it into the function with
myFunc( Varptr x)
For Strings... it depends on the context. I've found occasions where I can define my Extern as myString:Byte Ptr, and simply pass the string into the function itself.
In other places I convert to a CString first...