How can I get a pointer value (address) from calllib, instead of a libpointer?
显示 更早的评论
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
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Call C from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!