How to call dll from GUI????
2 次查看(过去 30 天)
显示 更早的评论
Hi,
we created dll for simulink model., Now we are trying to call the dll from GUI but its not taking the command.,
if not(libisloaded('TOLI_win32'))
hfile = 'Tolidll.h';
libfile='TOLI_win32.dll';
loadlibrary(libfile,hfile);
end
libfunctionsview TOLI_win32;
calllib('TOLI_win32','TOLI_initialize',1);
we gave command like this., But its not taking., This method is corerct pls help us in ressolving this issue?
4 个评论
Kaustubha Govind
2013-5-21
How does the model update the edit box? What exact commands do you use to do that?
回答(1 个)
Kaustubha Govind
2013-5-22
I presume that this is a follow-up question from your (colleague's previous question) here. As I mentioned in my comment on that question:
[T]hat would make your output be a constant value received from the GUI at the time of code-generation - is this what you want? In that case, simply put your code to invoke the GUI into a helper MATLAB function and call it using FEVAL.
The code-generated from the S-function essentially just returns a constant output which is equal to the value of the checkbox at the time of code-generation. It doesn't actually evaluate the function IFM_Select_fcn. Note that it is not possible to generate standalone C code from MATLAB code that involves GUI operations. Perhaps you should explain more about why you even want to have a DLL do this for you, when you can simply write MATLAB code to do what you need (since you're calling the DLL from MATLAB anyway).
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!