Link to home
Start Free TrialLog in
Avatar of Weigher
WeigherFlag for Türkiye

asked on

What can provide ActiveX Exe comfort in VB.NET

Hi All,

I need a long term solution for interfacing various equipment to my applications in such way that the main program will not be changed (at least in short term) but the equipment interfaces can change/added upon needs. The typical equipment are generally (but not limited to);

- Image grabber boards or network cameras
- Serial communication based data transmission equipment
- RFID readers (ETH or Serial connected)
- Hardware I/O devices (relay output, signal input) that works on serial ports
- PLC interfaces

Each equipment provider has its own rules and methods to communicate with their devices.

My main reason for the needed solution is;
- I have many main applications that are registered by a certain authority and making changes to the applications is not easy because I have to register the software everytime I change the software and this costs too much.
- I have many equipment options doing similar functions (with performance and cost difference). The preference of equipment is depended on how the system will be applied and even the communication protocols of the equipment are developing continuously.

One solution is developing a COM based solution, for example, a DLL library for each group of equipment. Each compiled DLL will obey to same library documentation but will communicate with its own equipment. The related DLL will be installed to related system. In this way followings are possible;
- The main applications can be registered and distributed regardless of what the equipment is
- A DLL for each newcoming or changed equipment can be prepared and installed upon need

I have some limitations for using ordinary DLL because of the nature of the equipment; I need the interface must stay in memory and stay working because I need to make work timers and events because;
- The equipment sends it message anytime, an awake thread will need to capture it (such as serial or TCP/IP socket)
- The data need to be made ready before it is asked by the library using application (such as pooling data from more than one resource)
- There are timings required by equipment protocols
- Some initializations takes time (such as serial/Socket/board/Camera etc.) and not possible to initialize it anytime before a data poll.

I was using ActiveX Exe previously (VB6) for this purpose, and that was a real "miracle solution" for the problem.  But the ActiveX Exe is not supported by VB.NET. VB6 ActiveX Exe still can be used by VB.NET applications by Object creation methods but VB6 is getting obsolete both by Microsoft and also by equipment providers interface support.

Is there any long term technology that can be used for this purpose, i.e. directly replace to behaviour of "ActiveX Executable".

The target OS is Windows XP/Vista/7 Clients or Windows Server platforms (2003/2008) in 32 or 64 bit modes.

Thanks in Advance...
Avatar of DjDezmond
DjDezmond
Flag of United Kingdom of Great Britain and Northern Ireland image

The DLL model is what you need I think. It is simply, a class project.

In the same project of your main application, insert a new "Class Library" project.

In the main application click, "Add reference", browse to the "Projects" tab, and select your class project.

You can then create instances of the class within your application, just as you could using the old active x model.
Avatar of Weigher

ASKER

AFAIK, Class Library (as ActiveX DLL) will not operate as a continuous thread in memory, it is just oaded and its functions are open to be used by other applications. What I need is also a listening and actively operating thread in memory (doing timer or other events).

Am I wrong in something in understanding of Class or DLL? Previously that was the reason I was building an "ActiveX Exe" instead of an "ActiveX DLL".
ASKER CERTIFIED SOLUTION
Avatar of DjDezmond
DjDezmond
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Weigher

ASKER

Yes, thank you. This seems what I am looking for provided that I will read many documents and try codes with this.

Now, I am hoping it is easy-to-use and can be used under Windows platforms for a long time until Microsoft  declares it is not supported by new OS or new development environment.