フィルターのクリア

calllib question: voidPtr to array of structures

1 回表示 (過去 30 日間)
hmalissa
hmalissa 2018 年 9 月 24 日
回答済み: Simon Walker 2019 年 3 月 4 日
I'm trying to use a function in an external .DLL with calllib. One of the arguments (of type voidPtr according to libfunctionsview) is supposed to be a pointer of type (void *) to an array of structures according to the documentation of the .DLL. The structure is not explicitly declared in the .H or the .DLL file.
My naive approach was to create several structures with the fields given in the documentation, and then create an array of those, and pass the array directly to calllib. But calllib throws an error that indicates that it expects arrays of numeric types. The same happens when I try to use libpointer with type 'voidPtr' to explicitly convert the array to voidPtr.
What is the proper procedure to invoke calllib in this situation? Thank you very much.
(The .DLL in question is documented in https://www.chase-scientific.com/dax22000/dax22000_dax14000_manual.pdf; the function in question is 'DAx22000_CreateSegments' in 5.4.2.12. I have successfully used other functions in this .DLL.)

回答 (1 件)

Simon Walker
Simon Walker 2019 年 3 月 4 日
Hi, did you work this out? I'm having a simlar problem with some other code.
Thanks

カテゴリ

Help Center および File ExchangeCall C from MATLAB についてさらに検索

タグ

製品


リリース

R2012a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by