read a file inside a DLL generated by matlab coder

3 views (last 30 days)
Good morning
I am currently developing a Matlab application usable under C# via a DLL from Matlab Coder
In this application I need to read files in XML format based on an XSD file. This XSD file must be delivered in addition to the DLL to work correctly.
I figured out how to add the XSD file to the DLL and am able to generate it.
Therefore, my question is : how can I give this file as input to my Matlab reading function so that it can read it from a call to the DLL in C#? I'm currently using an isdeployed condition but I don't know what to put as the path to the file to read.
Thank you in advance for your help :)
  1 Comment
Ji Lee
Ji Lee on 7 Feb 2024
If attempting to single source the file content as a resource not accessible to MATLAB Code (i.e. requiring C/++ APIs to access), here is documentation for coder.ceval. This can be used for invoking C/C++ routines from within MATLAB code intended for code generation usage.
If it is okay to simply read the original XSD file from the file system, here is documentation describing MATLAB Coder support for reading files.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!