CN109343906A - A kind of method of browser load ActiveX control - Google Patents
A kind of method of browser load ActiveX control Download PDFInfo
- Publication number
- CN109343906A CN109343906A CN201811198627.7A CN201811198627A CN109343906A CN 109343906 A CN109343906 A CN 109343906A CN 201811198627 A CN201811198627 A CN 201811198627A CN 109343906 A CN109343906 A CN 109343906A
- Authority
- CN
- China
- Prior art keywords
- activex
- scriptobject
- interface
- attribute
- browser
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of Chrome browser load ActiveX control method, when web placement information change and cause interface object shift one's position information when, judge whether ActiveX object creates;It is determined according to the attribute of ActiveX object and method return value, creates ScriptObject scripting object if return value is IDispatch type, and return to browser;Browser execute about ActiveX object attribute and method JavaScript script when, the attribute or method call that ActiveX object should execute are searched according to the ScriptObject interface parameters in ScriptObject example, then execute corresponding attribute and method call.Interface is simple, is readily integrated into application system.
Description
Technical field
The present invention relates to browser control part technology more particularly to a kind of methods of browser load ActiveX control.
Background technique
Term is explained:
ActiveX control: Microsoft Corporation for a series of tactic object-oriented program technologies and tool address,
In main technology be The Component Object Model (COM), with the nouns equivalents such as ActiveX herein, control.
Chrome browser: a web browser developed by Google company, the browser are based on other open source softwares and write
It writes, including WebKit, target is improving stability, speed and safety, and creates simple and efficient user interface
Software.
ActiveX control can be regarded as a very small server application, it is unable to independent operating, it is necessary to be embedded in
Into some container program, run together with the container.This container includes WEB webpage.We are exactly at common IE browser
Typical ActiveX container, it may browse through and using the ActiveX control being embedded in WEB webpage.
Chrome browser is not ActiveX container, it cannot directly browse the ActiveX control in WEB webpage.
Therefore, Chrome uses Netscape plug-in applications interface NPAPI(Netscape Plugin Application
Programming Interface) as browser plug-in load ActiveX.
The considerations of for safety, initiates malice and attacks because the plug-in unit of NPAPI can steal system bottom permission
It hits.So 2010, Chrome develops new PPAPI (Pepper Plugin API) on the basis of original Netscape NPAPI,
Plug-in plug-in unit is all put into sandbox and is run, and stops the support to PPAPI interface in Chrome45 and later release.But
Also enclose loading interface of all ActiveX controls in Chrome, some ActiveX controls being trusted simultaneously in this way
It is kept outside of the door by Chrome.Chrome browser stops the support to NPAPI interface, it means that during a large amount of tradition are trusty
Between part product will no longer by new edition Chrome browser support.
Summary of the invention
The present invention provides a kind of general solution that ActiveX is loaded in Chrome45 and later release, makes
PPAPI plug-in card program sets up a bridge block between Chrome browser and ActiveX trusty, so that Chrome browser
ActvieX can be created and used by JavaScript as IE browser using ActiveX.
Above-mentioned purpose is implemented with the following technical solutions in the present invention.A kind of Chrome browser load ActiveX control
Method, comprising: the InstancePrivate interface object of PPAPI plug-in card program and instantiation, and controlled by the interface object
Creation, display state and the location information of ActiveX object, the agency of ScriptObject scripting object to ActiveX, and by
The agency of ActiveX object provides the method and attribute access of ActvieX;Cause the interface when web placement information changes
When object transformation location information, judge whether ActiveX object creates, ActiveX object is created if not creating;Such as
Fruit has created, and ignores;One InstancePrivate example only corresponds to an ActiveX object;According to interface
The display of InstancePrivate interface parameters transformation ActiveX object and hiding and ActiveX object position;According to
The attribute of ActiveX object and method return value determine, create if return value is IDispatch type
ScriptObject scripting object, and return to browser;According to the ScriptObject interface in ScriptObject example
Parameter searches the attribute or method call that ActiveX object should execute, and then executes corresponding attribute and method call.
Chrome PPAPI plug-in unit load ActiveX will mainly realize the creation of control, on calling interface in the present invention
Attribute and method and event response three parts.Creation ActiveX is to be created based on CLSID, therefore this is a kind of general fits
Creation mode for all ActiveX.After creating ActiveX, Chrome PPAPI plug-in unit has interface proxy module, makes
The attribute of ActiveX and method is called to provide generation for the shell script of WEB webpage with the IDispath automation interface of ActiveX
Reason service.The event if ActiveX can dish out in use, Chrome PPAPI plug-in unit event can be searched thus and call WEB
Script responder on webpage.
The present invention creates ActiveX control by creating PPAPI plug-in unit in Chrome browser, by PPAPI plug-in unit, and
It is acted on behalf of by PPAPI plug-in unit, realizes attribute and method that Chrome calls ActiveX using JavaScript code;Pass through
PPAPI plug-in unit agency, Chrome respond the event of ActiveX using JavaScript code.It can support that creation is all
ActiveX;WEB page script can be supported to call the attribute and method of ActiveX;WEB page script can be supported to respond
The event of ActiveX;Interface is simple, is readily integrated into application system.It is loaded in Chrome browser and uses the side of ActiveX
Formula;It is only used for 45 or less version of Chrome browser relative to NPAPI plug-in unit, is suitable for all Chrome browser versions;
The attribute of ActiveX is grammatically kept with method call with consistent in IE browser;CLSID, Ji Keshi need to only be converted
For all ActiveX.
Detailed description of the invention
Fig. 1 is system structure diagram of the invention.
Fig. 2 is Chrome browser and InstancePrivate relational graph;
Fig. 3 is Chrome browser and ScriptObject object relationship figure;
Fig. 4 is ScriptObject object broker ActiveX object flow chart;
Fig. 5 is event response relational graph of the Chrome browser to ActiveX.
Specific embodiment
It elaborates below in conjunction with drawings and examples to technical solution of the present invention.Scheme of the present invention
Be: Chrome browser is by JavaScript using the intention of ActiveX to inform PPAPI plug-in unit, and PPAPI plug-in unit is as generation
Creation ActiveX, reason calls ActiveX attribute and method and response ActiveX event.
Referring to Fig. 1 system structure diagram.Chrome browser by load ActiveX mode the creation of ActiveX, adjust
It is encapsulated in PPAPI plug-in unit with event response.PPAPI plug-in unit is as the agency between Chrome browser and ActiveX.
PPAPI plug-in unit can provide an InstancePrivate example and give Chrome browser, and Chrome browser passes through
This example controls the information such as position and the display state of PPAPI plug-in unit, and in addition Chrome browser can be right
The life cycle of InstancePrivate instance objects is managed.In the life cycle of InstancePrivate instance objects
It inside will create a scripting object (ScriptObject), this scripting object will create ActiveX object, last PPAPI
This scripting object is returned to Chrome browser by plug-in unit.Hereafter, the JavsScript engine of Chrome browser can be with
By this scripting object of WEB script operation, in fact, Chrome browser is grasped by the agency of this scripting object
Make ActiveX object, such as calls attribution method, response events etc..
Referring to figs. 2 and 3.ScriptObject example as the agency between Chrome browser and ActiveX object,
Browser is converted to the attribute of ScriptObject and the operation of method the operation of attribute and method to ActiveX.
Referring to fig. 4.ScriptObject object is this hair as access agent of the Chrome browser to ActiveX object
Bright core.Agency of the ScriptObject as ActiveX object, in Chrome browser, ScriptObject is just
It is ActiveX, the JavaScript sentence of attribute and method to ActiveX calls, exactly to ScriptObject
JavaScript sentence calls.For example, it is the attribute of prop that ActiveX object, which has name, then according to JavaScript object
Grammer is accessed, the sentence to prop assignment should be " activexObject.prop=1;" activexObject is ActiveX
The example of object, and the ScriptObject object as agency should also support identical grammer,
"activexObject.prop=1;", but activeObject is the example of ScriptObject object at this time.So, from
ScriptObject object to the conversion between ActiveX object be one of core of the invention.
Referring to Fig. 5.The event of ActiveX control allows control can be to the container comprising it, i.e., in Chrome browser
Webpage sends event notice, and webpage receives the event handling function after event notifies in invoking web page script, Web page application program
Event handling function may be implemented, specific response is made to specific event.Connection between page script and ActiveX event
System is established by InstancePrivate object, and InstancePrivate object receives ActiveX event, another side on one side
The Window object for possessing page script, can event response letter in invoking web page script by the Window of page script
Number.
Chrome browser ActiveX plug-in system.Although because of the reason of safety, Chrome browser, especially
It after 45 versions, has completely forbidden using ActiveX, but due to history, still having can much trust
ActiveX should be supported on Chrome browser.Chrome browser ActiveX plug-in system can allow ActiveX
Used in the webpage of Chrome browser, and keep in the past in IE use style.
Claims (1)
1. a kind of method of Chrome browser load ActiveX control, comprising: PPAPI plug-in card program and instantiation
InstancePrivate interface object, and by the creation of interface object control ActiveX object, display state and position
Information, the agency of ScriptObject scripting object to ActiveX, and the side of ActvieX is provided by the agency of ActiveX object
Method and attribute access;It is characterized in that, when web placement information change and cause the interface object shift one's position information when
It waits, judges whether ActiveX object creates, ActiveX object is created if not creating;Ignore if having created;One
InstancePrivate example only corresponds to an ActiveX object;It is converted according to interface InstancePrivate interface parameters
The display of ActiveX object and hiding and ActiveX object position;It is returned according to the attribute of ActiveX object and method
Value determines, creates ScriptObject scripting object if return value is IDispatch type, and return to browser;
Searched according to the ScriptObject interface parameters in ScriptObject example attribute that ActiveX object should execute or
Then method call executes corresponding attribute and method call.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811198627.7A CN109343906B (en) | 2018-10-15 | 2018-10-15 | Method for loading ActiveX control by browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811198627.7A CN109343906B (en) | 2018-10-15 | 2018-10-15 | Method for loading ActiveX control by browser |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109343906A true CN109343906A (en) | 2019-02-15 |
CN109343906B CN109343906B (en) | 2021-06-25 |
Family
ID=65310397
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811198627.7A Active CN109343906B (en) | 2018-10-15 | 2018-10-15 | Method for loading ActiveX control by browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109343906B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457145A (en) * | 2019-08-19 | 2019-11-15 | 四川久远银海软件股份有限公司 | A kind of cross-platform browser peripheral hardware call method |
CN110532043A (en) * | 2019-09-02 | 2019-12-03 | 江西金格科技股份有限公司 | The method for supporting NPAPI and ActiveX based on insert receptacle |
CN111158784A (en) * | 2019-12-30 | 2020-05-15 | 山东浪潮商用系统有限公司 | Solution method for loading ActiveX control based on Google browser |
CN111176752A (en) * | 2019-12-20 | 2020-05-19 | 汪佐怀 | Method and device for embedding window applet in browser page |
CN112433789A (en) * | 2020-11-24 | 2021-03-02 | 深圳供电局有限公司 | Management method and system for intelligent equipment access |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103699380A (en) * | 2013-12-19 | 2014-04-02 | 瑞达信息安全产业股份有限公司 | Method and system for running ActiveX control in Firefox browser |
KR101683273B1 (en) * | 2015-11-24 | 2016-12-07 | 쉬프트정보통신 주식회사 | Device for displaying a frame of a web browser on another web browser |
CN106776074A (en) * | 2016-12-26 | 2017-05-31 | 湖北省数字证书认证管理中心有限公司 | A kind of web plug-in units call method and system based on http |
-
2018
- 2018-10-15 CN CN201811198627.7A patent/CN109343906B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103699380A (en) * | 2013-12-19 | 2014-04-02 | 瑞达信息安全产业股份有限公司 | Method and system for running ActiveX control in Firefox browser |
KR101683273B1 (en) * | 2015-11-24 | 2016-12-07 | 쉬프트정보통신 주식회사 | Device for displaying a frame of a web browser on another web browser |
CN106776074A (en) * | 2016-12-26 | 2017-05-31 | 湖北省数字证书认证管理中心有限公司 | A kind of web plug-in units call method and system based on http |
Non-Patent Citations (1)
Title |
---|
张震: "Firefox中支持ActiveX控件运行的研究与实现", 《中国优秀硕士论文全文数据库 信息科技辑》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110457145A (en) * | 2019-08-19 | 2019-11-15 | 四川久远银海软件股份有限公司 | A kind of cross-platform browser peripheral hardware call method |
CN110532043A (en) * | 2019-09-02 | 2019-12-03 | 江西金格科技股份有限公司 | The method for supporting NPAPI and ActiveX based on insert receptacle |
CN111176752A (en) * | 2019-12-20 | 2020-05-19 | 汪佐怀 | Method and device for embedding window applet in browser page |
CN111176752B (en) * | 2019-12-20 | 2023-05-16 | 汪佐怀 | Method and device for embedding window applet in browser page |
CN111158784A (en) * | 2019-12-30 | 2020-05-15 | 山东浪潮商用系统有限公司 | Solution method for loading ActiveX control based on Google browser |
CN112433789A (en) * | 2020-11-24 | 2021-03-02 | 深圳供电局有限公司 | Management method and system for intelligent equipment access |
Also Published As
Publication number | Publication date |
---|---|
CN109343906B (en) | 2021-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109343906A (en) | A kind of method of browser load ActiveX control | |
US6345382B1 (en) | Run-time customization in object-oriented design | |
JP5420734B2 (en) | Software system with controlled access to objects | |
US20200104143A1 (en) | Conservative class preloading for real time java execution | |
CN106462412B (en) | Structure identification of dynamically generated pattern-based classes | |
US6968540B2 (en) | Software instrumentation method and apparatus | |
CN107526625B (en) | Java intelligent contract security detection method based on bytecode inspection | |
US5442779A (en) | System and method for enabling an interpreted programming language to be executed in a database management system environment | |
US6330711B1 (en) | Method and apparatus for dynamic application and maintenance of programs | |
Snyder | CommonObjects: an overview | |
KR100942322B1 (en) | System and method for defining and using subclasses declaratively within markup | |
US7822723B2 (en) | Method, system, program and data structure for controlling access to sensitive functions | |
US6951014B1 (en) | Method and apparatus for representation of a JavaScript program for execution by a JavaScript interpreter | |
Clarke et al. | Saving the world from bad beans: deployment-time confinement checking | |
EP3607432B1 (en) | Flow-based scoping | |
US20150113545A1 (en) | Modified jvm with multi-tenant application domains and class differentiation | |
WO2003001373A1 (en) | Java rule engine framework | |
Hedin et al. | A principled approach to tracking information flow in the presence of libraries | |
EP2181387A1 (en) | A programming environment with support for handle and non-handle user-created classes | |
US10417015B2 (en) | Modified JVM with multi-tenant application domains and class differentiation | |
US8869177B2 (en) | Decoupling components of a software system at compile time and load time | |
US7526752B1 (en) | Introspection support for generic types | |
US7036113B1 (en) | Detection of resource exceptions | |
Ducasse et al. | Tech Report: An Experiment with lexically-bound extension methods for a dynamic language | |
CN111382376A (en) | Method and device for changing browser homepage |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 330096 15th floor, lvyue science and technology building, 579 torch street, high tech Zone, Nanchang City, Jiangxi Province Patentee after: Jiangxi Jinge Technology Co.,Ltd. Address before: 330096 15th floor, lvyue science and technology building, 579 torch street, high tech Zone, Nanchang City, Jiangxi Province Patentee before: JIANGXI KINGGRID TECHNOLOGY CO.,LTD. |