ActiveX control
From Wikipedia, the free encyclopedia
ActiveX Control is a Microsoft term that is used to denote reusable software components that are based on Microsoft Component Object Model (COM). ActiveX controls provide encapsulated reusable functionality to programs and they are typically but not always visual in nature.
For example, an ActiveX control might implement spreadsheet functionality similar to Microsoft Excel, which would be visual in nature, but it also might implement functionality to upload or download files from an FTP site, which is not visual in nature unless it incorporates some sort of download progress display or similar.
ActiveX controls debuted in v4.0 of the desktop development tool for Microsoft Windows called Visual Basic, but Microsoft later modified the Internet Explorer web browser to use them to incorporate applet-like functionality into web pages. Because of that later use, ActiveX Controls have since been much derided in the mainstream and technical press for their ability to be used by unethical developers to create computer viruses, trojans and spyware infections.
[edit] Safety
ActiveX controls are not inherently unsafe, especially when used within a development package like Visual Basic. In that context, assuming the author is trusted, they are no less safe than the other programming code the developer who uses the controls may write.
ActiveX controls are instead unsafe for users of Internet Explorer who turn on the browser's ability to download and activate ActiveX controls within a web page. The problems occur when a user surfs to a non-trusted web page and that web page contains a malicious ActiveX control. This is a very common means of distributing malware such as adware and spyware to unwitting users of Internet Explorer; the easiest way to avoid it is to not install ActiveX controls from untrusted sites.
[edit] Writing ActiveX controls
ActiveX controls are simply glorified COM objects so they can be written using:
- Microsoft Foundation Classes (MFC) - Not recommended, due to the size of the MFC DLLs required
- Active Template Library (ATL) - The easiest way
- Plain C/C++ - Most difficult since lots of support code must be written
- In languages that support COM, e.g. Visual Basic