In the company's development process, ActiveX solutions were proposed and adopted by the company's senior management. Today, ActiveX engines are being researched and developed;
The test is passed and deployed successfully.
ActiveX Engine is an ActiveX form that runs on an html page;
Implementation principle:
Main functions:
The Client browser only needs to install two required assemblies. It is responsible for calling and loading the Assembly from the webservices background to the local device;
Requirements:
UserControl is used in Assembly, so its Owner can use exe packaging as the standard Winform. If it is run through Activex engine, it can also be used as an RIA application;
Difficulties:
1. solved: The AppDomain method is used to disassemble each Assembly to avoid conflicts between the current domain and the Assembly version. However, it is difficult to add UserControl to the Controls of the current domain, however, I solved the problem. The method is quite different and can be implemented directly using an unmanaged api.
2. Solved: the entire process of remote assembly-related assembly is transparent, using intelligent search, packaging, compression, and transmission to client activex engine.
3. unsolved: During script interaction, the parameter type deformation of the method remains unsolved. in C #, for example, the parameter is object [] Params. so how should we pass it in javascript? (Currently, we have adopted a very stupid method)
Use Case:
Assembly: Test1.dll
Class UserControlTest: UserControl {
...
}
HTML: Test.htm
<Object classid = "..."/>
<Script type = text/javascript> core1.LoadAssembly ("Test1.dll", "UserControlTest"); </script>
Core1 is an ActiveX. Engine instance. It provides the loading method and interacts with Current UserControl. Reflection is used for this part.
ActiveX. Engine is used in some complicated and low-level modules of B/s, such as serial communication/advanced charts.
The origin of this idea:
Http://chinasf.cnblogs.com/archive/2006/06/11/WINCTS.html