How to call CheckForReleaseUpdate() using MATLAB wrapper?

We have been using the LexActivator API wrapper for Matlab in our applications but are having trouble implementing/understanding how the callback for CheckForReleaseUpdate() works. The sample.m GitHub code doesn’t have an example of how to call the function and Matlab forums haven’t been helpful with understanding how to access callbacks when calling to external libraries.

We have gotten as far as:
calllib(sSharedLibrary,‘CheckForReleaseUpdate’,…
pcstr(‘windows 64-bit’),…
pcstr(‘3.6’),…
pcstr(‘stable’),…
releaseUpdateCallback);

However, we are stuck on what is supposed to happen within the “releaseUpdateCallback” function. Are we then going to call CheckReleaseUpdate(ReleaseCallbackType releaseUpdateCallback, uint32_t releaseFlags, void* userData)? Because currently the releaseUpdateCallback parameters don’t exist when it gets called.

Any example code or suggestions on how to run this would be helpful. Thank you for your time.

Hi Cristina,

Using function pointers as arguments to C function is not supported. This would require a wrapper written in mex which can act as bridge between C and MATLAB code. It is on our todo list, but we don’t have an ETA yet.

Alternatively, you can directly invoke our REST API endpoints from your code to check for release update.