opening a dll file with matlab

7 次查看(过去 30 天)
kay Dee
kay Dee 2020-3-7
Hello Everyone
I have a dll file named (fape.dll) that contains some matlab codes and i would like to open it , can you please tell me how to open that file , in order to view codes that are inside .
Thank you very much .

回答(1 个)

Walter Roberson
Walter Roberson 2020-3-7
dll files are compiled into machine code. They do not have any remaining MATLAB code.
In some ways of generating a dll from MATLAB code the MATLAB code is kept as comments in C or C++ source code. You would have to open the C or C++ source code to see it. C and C++ compilers do not store a copy of the code inside of a dll
  2 个评论
kay Dee
kay Dee 2020-3-7
@ walter Roberson
Thank you very much for your answer , but does it mean i need to find the C or C++ source code ?basically how do i get to see the content that is in a dll file .
thanks
Walter Roberson
Walter Roberson 2020-3-7
but does it mean i need to find the C or C++ source code
Yes.
However, when the DLL was built, unless the compiler was told to strip the symbol table, then typically it would take a record of the name of each file that was used for each code location. Then, typically if you were to open the DLL in an Integrated Development Environment (IDE), and were to step through the code, then at each step the IDE would open the source code and move to the line of (C or C++) source; if you are lucky then you asked to have the MATLAB code recorded in the comments of that source.
However, this ability to automatically navigate to the appropriate source file requires that the source file is available to you: if all you have is a copy of the DLL, then you would not have that code.
Also, MATLAB can generate two different kinds of DLL from MATLAB code. One of the kinds of DLL construction compiles MATLAB code into threaded interpreted data structures that are evaluated by a copy of the MATLAB Execution Engine, very like executing inside MATLAB. There is no known way to access the code after this is done (except to happen to have a copy of the source code.) The second kind of DLL construction compiles MATLAB code to C or C++, that can then be compiled. This is the variety that just might permit you to read the original MATLAB code out of the comments of the C/C++ source.
Neither kind of DLL executes MATLAB code directly, only code that has been processed into a different form.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by