Solved

What can provide ActiveX Exe comfort in VB.NET

Posted on 2010-09-13
4
650 Views
Last Modified: 2012-05-10
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...
0
Comment
Question by:Weigher
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:DjDezmond
ID: 33660423
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.
0
 

Author Comment

by:Weigher
ID: 33660545
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".
0
 
LVL 9

Accepted Solution

by:
DjDezmond earned 500 total points
ID: 33660693
Ah I see,

http://stackoverflow.com/questions/604776/is-there-an-equivalent-to-out-of-process-com-exe-in-net

States that "Enterprise Services" can be used for this...

Or more familiarly, ".Net Remoting". I have experience with this, but never in a scenario like yours, so unfortunately I cannot provide code examples.
0
 

Author Closing Comment

by:Weigher
ID: 33660841
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article discusses the Chain of Responsibility pattern, explaining What it is;Why it is; andHow it is At the end of this article, I hope you will be able to describe the use and benefits of Chain of Responsibility.  Backgrou…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now