[Gambas-user] Read array of string return from external libraries function
Phạm Quang Dương
soleilpqd at ...626...
Fri Apr 1 17:36:00 CEST 2011
Thank Benoit!
One more question about the below basic data structure:
aStruct * anExternFunc(...)
with:
aStruct {
aClass *data
aStruct *previous
aStruct *next
}
How to get all *data
I tried
pNext = anExternFunc(...)
while pNext <> null
pData = Pointer@(pNext)
...
pNext = pData + SizeOf(gb.pointer)*2
wend
and failed.
2011/3/30 Benoît Minisini <gambas at ...1...>
> > Hi,
> >
> > I have an EXTERN function which returns an array of strings (char**). How
> > to get this array?
> >
> > I just can only get the first string:
> > EXTERN theFunction(params AS ...) As Pointer
> > .....
> > Dim p as Pointer, s as String
> >
> > p = theFunction(...)
> > s = String@(Pointer@(p))
> >
> > What to do next?
> > Thank you.
>
> s = String@(Pointer@(p + SizeOf(gb.Pointer))
> s = String@(Pointer@(p + SizeOf(gb.Pointer) * 2)
> s = String@(Pointer@(p + SizeOf(gb.Pointer) * 3)
> ...
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Phạm Quang Dương
Mobile: 01683572206
Email: soleilpqd at ...626... / soleilpqd at ...2488...
More information about the User
mailing list