Hello All,
Is there anyway in Purebasic to pass an array using a Dll?
What I want to do is create the DLL in Purebasic and pass an array of string to another programming language.
Thanks
Dll and array
Re: Dll and array
Something like this maybe? This code is not checked so might not work.
It depends on what your other language is. You could also use structure arrays which is more like C
Code: Select all
ProcedureDLL AttachProcess(Instance)
Global Dim my_string_array.s(10)
EndProcedure
ProcedureDLL DetachProcess(Instance)
FreeArray(my_string_array())
EndProcedure
ProcedureCDLL array_of_strings()
my_string_array(0) = "hello"
my_string_array(1) = "world"
my_string_array(2) = "DLL"
ProcedureReturn my_string_array()
EndProcedure