actxcontrol and actxserver: Future support plans?

The web-documentation for Matlab's actxcontrol( ) command warns that the command is to be removed in "a future release." In contrast, the web-documentation for the actxserver( ) command shows no such warning.
1. Is there an announced time-frame for removing the actxcontrol( ) command?
2. Will the actxserver( ) command continue to be supported even after the actxcontrol( ) command is removed?
3. If the actxserver( ) command is to be removed, what is to replace it, and where is the documentation for that replacement?
Thanks.

Réponses (1)

Steven Lord
Steven Lord le 16 Avr 2021

1 vote

1. Is there an announced time-frame for removing the actxcontrol( ) command?
If you're looking for something more concrete than "in a future release" then no.
2. Will the actxserver( ) command continue to be supported even after the actxcontrol( ) command is removed?
When or if that command were to be removed I expect we would announce the removal in advance of actually removing it. We have made no such announcement at this time as far as I'm aware. Note that the documentation for actxcontrol states we started warning about its future removal in release R2019b and the current release is R2021a. We didn't yank the rug out from under users of actxcontrol.
Note also that the background linked from the compatibility considerations section of the actxcontrol page states "The undocumented JavaFrame property and javacomponent function, as well as the actxcontrol function, are capabilities that rely on third-party technologies (Java Swing and Microsoft COM, respectively), which over the years, have become legacy UI frameworks. "
Is actxserver a UI framework? The actxcontrol documentation page states "You cannot use an ActiveX server for the progid because MATLAB® cannot insert ActiveX servers in a figure." so I personally would say probably not.
3. If the actxserver( ) command is to be removed, what is to replace it, and where is the documentation for that replacement?
Since we have not announced any such removal, I think the rest of the question is moot.

10 commentaires

Hi Steven,
Thanks for your quick reply. Your comment that "We have made no such announcement at this time..." answers my central question.
But just by way of clarification, my concern is for customers using actxserver( ) not as scheme for implementing a user interface (UI), but rather as a way to communicate with other processes / programs running under Windows. Such inter-process communications strengthens MATLAB's scripting power by enabling it to call other programs to perform specific tasks (ex. opening proprietary files) without having to write duplicative code from scratch.
Because Microsoft's COM technologies are at the heart of both the actxcontrol( ) and actxserver( ) commands, I just wanted to verify that MATLAB will continue to support actxserver( ) for the foreseeable future even though support for actxcontrol( ) will be terminated.
Please let me know if there are any other changes planned for MATLAB that may impact the functionality of the actxserver( ) command.
Thanks again.
No, Mathworks will eventually get rid of actxserver() support. I have no idea of the timeline, but it will happen... because Microsoft will be getting rid of ActiveX.
Walter - Thank you for your input and those links.
The Wikipedia page explains that ActiveX "... adapts its [Microsoft's] earlier Component Object Model (COM) and Object Linking and Embedding (OLE) technologies for content downloaded from a network..."
The help page for MATLAB's actxserver( ) command states "... actxserver(progid) creates a local OLE Automation server, where progid is the programmatic identifier (ProgID) of an OLE-compliant COM server."
While the Microsoft blog site explains that ActiveX controls will no longer be supported in Microsoft's Edge browser, it does not comment on the future of the underlying COM technologies that actxserver( ) uses. I asked Microsoft about the future of COM and their answer was "Currently, there is no plans that Microsoft will stop support COM."
Thus it seems the technological foundation to MATLAB's actxserver( ) command is secure, even if the actxcontrol( ) command has become obsolete.
Does this seem valid? Any further thoughts?
Thanks again.
The technologies will be going away.
It will be gone by the time of the 50th anniversary of MATLAB.
Viktor Janzen
Viktor Janzen le 23 Avr 2021
Modifié(e) : Viktor Janzen le 23 Avr 2021
I upgraded yesterday to R2021a and from now it throws an error if I want to start a MATLAB-function through ActiveX. My VBA-Code is like this:
'Connection to Matlab
Set MATLAB = CreateObject("Matlab.Application")
MATLAB.Execute ("cd('D:\main code\SpecialPath')") ' change Directory
'Konvert my data
command = "KonvertALL('D:\Customer_1\data.csv')"
MATLAB.Execute (command)
If ActiveX is not still recommended and the behaviour changed in R2021a, I want to repeat the question from Bruce Peters: what is to replace the actxserver / actxcontrol, and where is the documentation for that replacement?
What is the full and exact text of the error message you receive when you run that code?
MATLAB.Execute would use the automation server, which is the opposite direction than actxserver / actxcontrol. The automation server requires that you register as a COM server; see https://www.mathworks.com/help/matlab/matlab_external/register-matlab-as-automation-server.html
Viktor Janzen
Viktor Janzen le 23 Avr 2021
Modifié(e) : Viktor Janzen le 23 Avr 2021
Ooh. Thanks. That was the point. After I registered the comserver, the code is runnig like usual.
Walter, Steven,
Please explain the difference(s) between the technical foundations of
i) MATLAB operating as a COM server, and
ii) MATLAB using a different program as a COM server, via its actxserver( ) command.
In the first case, MATLAB acts as the server for an external client, while in the second MATLAB acts as the client and an external program acts as the server.
Don't both of these client / server linkages depend on Microsoft's COM technology?
Thanks,
Bruce
Yes, both are COM. And we have no statement from Mathworks that the automation server will definitely be included in all future MATLAB.
MATLAB has another automation interface that does not use COM at all, but does require linking to MATLAB using DLL type of technology. This is not inherently compatible with the current implementation MATLAB.execute that vj used.

Connectez-vous pour commenter.

Catégories

Produits

Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by