External Interfaces/API    

ActiveX and DDE Support


ActiveX is a set of object-oriented technologies and tools that allow software developers to integrate application-specific components from different vendors into their own application solution. ActiveX Control components can be both visually and programmatically integrated into an ActiveX control container, such as a MATLAB figure window. ActiveX Automation allows MATLAB to both control and be controlled by other ActiveX components.

Dynamic Data Exchange, or DDE, is a feature of Windows that allows two programs to share data or send commands directly to each other. MATLAB provides functions that use this data exchange to enable access between MATLAB and other Windows applications in a wide range of contexts.

This chapter discusses the following topics:

Introducing MATLAB ActiveX Integration

ActiveX is a Microsoft Windows protocol for component integration. Using ActiveX, developers and end users can select application-specific, ActiveX components produced by different vendors and seamlessly integrate them into a complete application solution. For example, a single application may require database access, mathematical analysis, and presentation quality business graphs. Using ActiveX, a developer may choose a database access component by one vendor, a business graph component by another, and integrate these into a mathematical analysis package produced by yet a third.

ActiveX Concepts and Terminology

COM

ActiveX is a family of related object-oriented technologies that have a common root, called the Component Object Model, or COM. Each object-oriented language or environment has an object model that defines certain characteristics of objects in that environment, such as how objects are located, instantiated, or identified. COM defines the object model for all ActiveX objects.

ActiveX Interfaces

Each ActiveX object supports one or more named interfaces. An interface is a logically related collection of methods, properties, and events. Methods are similar to function calls in that they are a request for the object to perform some action. Properties are state variables maintained by the object, such as the color of text, or the name of a file on which the control is acting. Events are notifications that the control forwards back to its client (similar to Handle Graphics® callbacks.)

For example, the sample control shipped with MATLAB has the following methods, properties, and events:

One important characteristic of COM is that it defines an object model in which objects support multiple interfaces. Some interfaces are standard interfaces, which are defined by Microsoft and are part of ActiveX, and some interfaces are custom interfaces, which are defined by individual component vendors. In order to use any ActiveX object, you must learn about which custom interfaces it supports, and the interface's methods, properties, and events. The ActiveX object's vendor provides this information.


 Compiling and Linking on Windows MATLAB ActiveX Support Overview