How can I get a pointer value (address) from calllib, instead of a libpointer?
Show older comments
I have C code that has a function that returns a foo**, an array of "objects". However, when using calllib, a libpointer is returned with type s_fooPtr, and its value is only the first object of the array. Trying to do pointer arithmetic on the s_fooPtr does not give me access to the other returned objects.
Just FYI, the "objects" in the C code are stored as structs. When my C code returns a foo* (a single "object") everything works perfectly.
Is there any way to get calllib to return the actual address of the pointer array? or to extract it from the returned libpointer?
I know loadlibrary can generate an mfile that I can edit to change how the calllib returns are treated. However, my project requires that all steps be automated, so I'd rather avoid this if possible.
Thanks, B
Answers (0)
Categories
Find more on Call C from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!