Solved

What can provide ActiveX Exe comfort in VB.NET

Posted on 2010-09-13
4
646 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction Many of the most common information processing tasks require sorting data sets.  For example, you may want to find the largest or smallest value in a collection.  Or you may want to order the data set in numeric or alphabetical order. …
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

16 Experts available now in Live!

Get 1:1 Help Now