Javascript Menu by Deluxe-Menu.com
 
  
  Embedded Boards > support
   



Using ActiveX Controls versus DLL drivers.

For many years, Acromag’s primary driver support for Windows based application was through the use of ActiveX controls. Recently, Acromag added DLL driver support for our new PMC, PCI and CompactPCI products. Because of this switch, a number of customers have asked us why we decided to use DLL drivers to support our PCI products rather than ActiveX controls. They have also asked us if it is our intention to change from ActiveX to DLL drivers for our Industry Pack product line.

Acromag has no plans to drop our support of ActiveX controls for our Industry Pack modules. ActiveX controls have proven to be a very successful solution for providing driver support of Industry Pack modules in Windows based applications.

In the following discussion, we will explain the differences between ActiveX controls and DLL drivers, and why they are best suited for specific products.

Industry Pack
ActiveX controls are ideally suited for use with Industry Pack (IP) modules. By their nature, Industry Pack modules are designed to be mixed and matched on a carrier card. As such, the system configuration is defined by the user. This is a difficult task for drivers to handle since drivers are normally matched to an individual IP. Under the Windows operating system, only one driver can be associated with a single PCI slot. Therefore, a secondary set of software must be created to connect the various drivers together into a single driver package. If Industry Pack modules are combined from multiple vendors, their drivers may not be written in a way that would allow them be tied together into a single driver. Unfortunately, these problems are typically left to the system developer's software engineers to work out.

Acromag's ActiveX software solves both of these problems. First, Acromag's ActiveX controls contain all of the instructions to automatically link individual IP modules to its carrier card. Thus, no extra code has to be written by the user to interconnect the ActiveX controls for each of the IPs to the carrier. Additionally, Acromag's ActiveX software solves the problem of mixing IP modules from multiple vendors on a single carrier card. Our ActiveX software includes an ActiveX control referred to as IPGENERIC. The IPGENERIC control provides direct access to the individual registers on the IP modules. This enables control of 3rd-party Industry Packs using Acromag's ActiveX controls.

Acromag's ActiveX controls are intended for use in dialog-based, single document, or multiple document applications such as those created with Visual Basic or Visual C++. A portion of the application serves as a Container for the Controls. The Control and Container communicate with each other through a set of COM (Component Object Model) interfaces. The COM interfaces simplify use of our controls with a different programming language such as Visual Basic and Visual C++. COM handles all the messy details.

PMC, PCI and cPCI
While Industry Pack modules are almost always mixed together on a carrier card, this is never the case with Acromag's PMC, PCI and cPCI (PCI) products. Thus, the problem of mixing multiple drivers in a single PCI slot does not occur with our PCI boards. Relieved of this limitation, Acromag was able to review all potential options to develop what we believe is the best solution for driver support of our PCI products.

After careful study, it was determined that the use of DLL drivers offered customers the best driver support solution. The following are several reasons for Acromag's choice.

Application Types
The DLL software is appropriate for a broader range of applications. DLL functions are written in C and use the Windows _stdcall calling convention. Functions may be called from both “windowed” and console applications and are accessed in the same manner as Windows API functions.

Software Overhead
The ActiveX controls require the presence of a number of Windows DLLs in order to work properly. These include the Microsoft C Runtime Library DLL, the MFC (Microsoft Foundation Class) DLLs and the DLLs which provide the OLE support. These requirements could prevent use of the controls in embedded environments.

The DLL software does not require the MFC or OLE DLLs. It does, however, link to the Microsoft C Runtime Library DLL. This allows easy integration of Acromag DLL drivers into embedded application such as Embedded XP.

Although Acromag has done little testing in this area, we suspect the DLL driver should be faster since there is one less layer (COM interface) between the application and the hardware.

Installation Issues
The DLL installation is less complicated so there is less potential for errors and conflicts.

ActiveX requires the pmc.exe utility to be run anytime hardware is added or removed. The DLL software only requires this procedure on NT 4 systems.

Flexibility
Some of our ActiveX controls do not allow access to all the features supported by the hardware. A design goal of the DLL software was to give the user full access to everything on the board. As a result, each DLL provides more functions than the corresponding ActiveX control.

Each DLL includes some "generic" functionality. The user has the ability to override the default interrupt service routine. Developers using C can obtain a pointer to the user mode mapping of the PCI module's I/O space and use it to write customized functions to supplement those provided by the DLL.


   
 
 

   
 
   Copyright © 2006
Acromag, Inc.
All rights reserved.

phone: 248-624-1541     email: info@acromag.com     fax: 248/624-9234

Copyright © 2008 Acromag, Inc. All rights reserved.