How to pass two arguments and their size to a C-function?

1 view (last 30 days)
I have to call the following C-library function out of Matlab:
bool PI_OAD (int ID, const int* channel, const double* pdValueArray, int iArraySize)
and the parameter iArraySize should be the size of the arrays channel and pdValueArray.
The parameters channel and pdValueArray are given as follows:
pChannel = uint8(channel);
pStep = uint16(step);
And my calllib command is:
calllib(Controller, 'PI_OAD', ID, pChannel, pStep, int32(24));
It doesn't work.
I don't know how to pass the size of the parameters channel and step correctly. Does somebody have an idea?? Thanks!

Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!