CN102402455A - Method and device for calling dynamic link library (DLL) - Google Patents

Method and device for calling dynamic link library (DLL) Download PDF

Info

Publication number
CN102402455A
CN102402455A CN2010102825068A CN201010282506A CN102402455A CN 102402455 A CN102402455 A CN 102402455A CN 2010102825068 A CN2010102825068 A CN 2010102825068A CN 201010282506 A CN201010282506 A CN 201010282506A CN 102402455 A CN102402455 A CN 102402455A
Authority
CN
China
Prior art keywords
dll
script
calls
call
ins
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.)
Pending
Application number
CN2010102825068A
Other languages
Chinese (zh)
Inventor
程国艮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Founder International Beijing Co Ltd
Peking University Founder Group Co Ltd
Original Assignee
Founder International Beijing Co Ltd
Peking University Founder Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Founder International Beijing Co Ltd, Peking University Founder Group Co Ltd filed Critical Founder International Beijing Co Ltd
Priority to CN2010102825068A priority Critical patent/CN102402455A/en
Publication of CN102402455A publication Critical patent/CN102402455A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a device for calling a dynamic link library (DLL), and aims to solve the problem that a script engine cannot call the DLL in the prior art. The method comprises the following steps that: the script engine calls a DLL calling proxy plug-in when performing interpretive execution on a script file; and the DLL calling proxy plug-in calls the DLL according to a parameter provided by the script engine, and returns a calling result to the script engine.

Description

Call the method and apparatus of dynamic link library
Technical field
The present invention relates to computer realm, relate to a kind of method and apparatus that calls dynamic link library especially.
Background technology
Call-center technology field interactive voice response system IVR (InteractiveVoice Response) product is all supported the Design Mode of IVR voice flow script definition basically at present, and just the actual speech flow process just can realize through the script of non-programming.Various product script specification are different, and self-defined standard is arranged, and also have to adopt standard criterion JS for example, VXML etc.; Script edit mode also variant, text mode is arranged, patterned way is also arranged.
Mainly its script of IVR product generally all is to adopt to call for example technology such as HTTP, WEBSEVICE realization of ACTIVEX control, network interface communication with outside mode of carrying out information interaction at present.The code logic that part is complicated especially, for example AES etc. neither be realized through script usually, and is adopted the mode of external dynamic chained library DLL or ActiveX to encapsulate.
Domestic IVR product and most international IVR products can't realize that all this locality of complete self-defined standard DLL calls.The IVR product of minority can be realized calling of DLL, but it can't share usefulness.
Internet-browser IE (Internet Explore) also can't directly call local DLL.
In general, existing script engine can not call DLL, and this can bring the inconvenience in the use in some application scenarios.
Summary of the invention
Fundamental purpose of the present invention provides a kind of method and apparatus that calls dynamic link library (DLL), can not call the problem of DLL with script engine in the solution prior art.
For addressing the above problem, according to an aspect of the present invention, a kind of method of calling dynamic link library (DLL) is provided, this method comprises: script engine calls DLL and calls proxy plug-ins when explaining the execution script file; Said DLL calls the parameter call DLL that proxy plug-ins provides according to said script engine, returns to said script engine then and calls the result.
For addressing the above problem, according to a further aspect in the invention, a kind of device that calls dynamic link library (DLL) is provided, this device comprises: script engine is used for when explaining the execution script file, calling said DLL and calls proxy plug-ins; DLL calls proxy plug-ins, is used for the parameter call DLL that provides according to said script engine, returns to said script engine then and calls the result.
According to technical scheme of the present invention; Script engine calls DLL and calls proxy plug-ins when explaining the execution script file; DLL calls the parameter call DLL that proxy plug-ins provides according to script engine; Return to script engine then and call the result, so just between script definition and DLL, set up a bridge, to realize the self-adaptation of different self-defined DLL.Therefore the technical scheme of using the embodiment of the invention makes script engine can call DLL, and the DLL that need call can be self-defined in script, and can in IE, call arbitrary standards DLL.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram according to the method for calling DLL in the embodiment of the invention;
Fig. 2 is the synoptic diagram according to the structure of the device that calls dynamic link library (DLL) in the embodiment of the invention;
Fig. 3 is the synoptic diagram according to the structure of the DLL calling system in the embodiment of the invention;
Fig. 4 is according to the synoptic diagram for DllProxy plug-in unit method of calling in the application scenarios of not supporting script specification that ActiveX calls and engine in the embodiment of the invention; And
Fig. 5 is according to the synoptic diagram for DllProxy plug-in unit method of calling in the application scenarios of supporting script specification that ActiveX calls and engine in the embodiment of the invention.
Embodiment
Below with reference to accompanying drawing and combine embodiment, specify the present invention.
Fig. 1 is the process flow diagram according to the method for calling DLL in the embodiment of the invention.As shown in Figure 1, in the embodiment of the invention, the method for calling DLL mainly comprises the steps:
Step S11: script engine calls DLL and calls proxy plug-ins when explaining the execution script file;
Step S12:DLL calls the parameter call DLL that proxy plug-ins provides according to script engine, returns to script engine then and calls the result.
Below the flow process among Fig. 1 is described further again.When execution in step S12, DLL calls the definite DLL that need call of parameter that proxy plug-ins can provide according to script engine earlier, and then calls the DLL that said need call.DLL calls proxy plug-ins and can be implemented as the ActiveX assembly.
The script file here can adherence to standard script specification, for example Jscript script specification and VBScript script specification.Script file also can be to observe other script specification.Like this; At step S11; Be script engine before explaining that calling DLL when carrying out script file calls proxy plug-ins, can preserve the script file of writing according to preset script specification earlier, script engine obtains this preset script specification and the script file of writing then.Comprise about defining and call the standardize information of DLL in the preset script specification here, that is to say, explained that in script, how writing code could define and call DLL in this preset script specification.
Fig. 2 is the synoptic diagram according to the structure of the device that calls dynamic link library (DLL) in the embodiment of the invention.As shown in Figure 2, the device that calls DLL 20 in the embodiment of the invention comprises that mainly script engine 21 and DLL call proxy plug-ins 22, and wherein script engine 21 is used for explaining that calling DLL when carrying out script file calls proxy plug-ins 22; DLL calls proxy plug-ins 22 and is used for the parameter call DLL that provides according to script engine 21, returns to script engine 21 then and calls the result.Wherein DLL calls proxy plug-ins 22 and can be implemented as the ActiveX assembly.
A kind of structure of calling proxy plug-ins 22 is to comprise: the control interface module is used to receive the parameter that script engine 21 provides; The calling logic module is used for the definite DLL that need call of parameter that provides according to script engine 21; The DLL interface module is used to call the DLL that said need call.
The script file that script engine 21 also can be used for obtaining preset script specification and writes according to this preset script specification; Comprise in the script specification wherein about defining and call the standardize information of DLL.
Below through a concrete example embodiment of the invention is described further again.In this example, mainly carry out following steps to realize script engine calling to DLL:
1, realizes the standard that DLL defines and DLL calls in the script.For off-gauge script specification, in existing script specification, increase the script specification that DLL definition and DLL call.For the standard script engine, for example the JS script realizes that through the scripted code of current script specification DLL definition and DLL call standard.
2, script engine calls " DLL calls proxy plug-ins " when explaining execution DLL definition and DLL invoke code.
3, " DLL calls proxy plug-ins ", recognizes correct DLL entrance function, and calls according to some logic rules according to the input of script and engine.
4, " DLL the calls proxy plug-ins " output that will call DLL requires conversion according to the code of script rule and script engine and exports.
5, script engine continues to carry out script.
For above-mentioned steps, below further specify again.For the script specification of definition, this normalized illustration in script, how to write code and could define and call DLL.If the script of standard then need not be revised script specification, define one through existing script specification. cover script logical definition.
(be called for short the back: DllProxy), this plug-in unit can be embodied as an ActiveX assembly, realizes the agency that calls of various DLL to call proxy plug-ins for DLL.
The entrance function parameter-definition of DllProxy comprises will call the dll file title, will call the DLL function name, DLL function calls mode, to call DLL function parameters definition (containing return parameters), all will call required actual parameter of DLL function and return parameters.Because the function entrance parameter of actual DLL and DllProxy's is different, so DllProxy realizes its identification, goes into ginseng and change, call, go out to join functions such as conversion.
With IE (Internet Explore) is example; Can it be used as is a special script engine product; Can realize explanation,, be implemented in calling of dynamic self-defined DLL among the IE through calling the DllProxy ActiveX object in JS or the VBS script to JScript script and VBScript.
, design DLL can carry out as follows when calling proxy plug-ins:
1, one group of DLL interface of design, adaptation parameter is 60 dynamic calls with interior any standard DLL automatically.
2, the control interface of a DllProxy of design provides and can satisfy all information and the data that DLL calls.
3, calling logic module of design.Can be according to the input of control interface, find adaptable DLL interface type interface automatically and call, carry out the data necessary conversion, the calling interface result is exported.
DLL calling system according to aforesaid way obtains is as shown in Figure 3, and Fig. 3 is the synoptic diagram according to the structure of the DLL calling system in the embodiment of the invention.
At last, DllProxy plug-in unit method of calling is explained.
A, like Fig. 4, Fig. 4 is according to the synoptic diagram for DllProxy plug-in unit method of calling in the application scenarios of not supporting script specification that ActiveX calls and engine in the embodiment of the invention.For script specification and the engine of not supporting that ActiveX calls, then need realize that in script engine DllProxy calls, revise script specification, realize standard DLL is called through the script specification of revising.
B, like Fig. 5, Fig. 5 is according to the synoptic diagram for DllProxy plug-in unit method of calling in the application scenarios of supporting script specification that ActiveX calls and engine in the embodiment of the invention.For script specification and the engine of supporting that ActiveX calls, then can in script, directly call DllProxy and accomplish standard DLL and call, also can use-pattern A, as shown in Figure 4.
Technical scheme according to the embodiment of the invention; Script engine calls DLL and calls proxy plug-ins when explaining the execution script file; DLL calls the parameter call DLL that proxy plug-ins provides according to script engine; Return to script engine then and call the result, so just between script definition and DLL, set up a bridge, to realize the self-adaptation of different self-defined DLL.Therefore the technical scheme of using the embodiment of the invention makes script engine can call DLL, and the DLL that need call can be self-defined in script, and can in IE, call arbitrary standards DLL.
Obviously; It is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize that they can concentrate on the single calculation element with the general calculation device; Perhaps be distributed on the network that a plurality of calculation element forms; Alternatively, they can be realized with the executable program code of calculation element, carried out by calculation element thereby can they be stored in the memory storage; And in some cases; Can carry out step shown or that describe with the order that is different from here, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a method of calling dynamic link library (DLL) is characterized in that, comprising:
Script engine calls DLL and calls proxy plug-ins when explaining the execution script file;
Said DLL calls the parameter call DLL that proxy plug-ins provides according to said script engine, returns to said script engine then and calls the result.
2. method according to claim 1 is characterized in that, said DLL calls proxy plug-ins and comprises according to the parameter call DLL that script engine provides:
Said DLL calls the definite DLL that need call of parameter that proxy plug-ins provides according to said script engine;
Said DLL calls proxy plug-ins and calls the DLL that said need call.
3. method according to claim 1 is characterized in that, said DLL calls proxy plug-ins and is embodied as the ActiveX assembly.
4. method according to claim 1 is characterized in that, said script file adherence to standard script specification.
5. method according to claim 4 is characterized in that, said standard script specification comprises Jscript script specification and VBScript script specification.
6. method according to claim 1 is characterized in that, said script engine calls DLL and also comprises before calling proxy plug-ins when explain carrying out script file:
Preserve the script file of writing according to preset script specification, comprise about defining and call the standardize information of DLL in the said preset script specification;
Script engine obtains said preset script specification and the script file of writing.
7. a device that calls dynamic link library (DLL) is characterized in that, comprising:
Script engine is used for when explaining the execution script file, calling said DLL and calls proxy plug-ins;
DLL calls proxy plug-ins, is used for the parameter call DLL that provides according to said script engine, returns to said script engine then and calls the result.
8. device according to claim 7 is characterized in that, said DLL calls proxy plug-ins and comprises:
The control interface module is used to receive the parameter that said script engine provides;
The calling logic module is used for the definite DLL that need call of parameter that provides according to said script engine;
The DLL interface module is used to call the DLL that said need call.
9. device according to claim 7 is characterized in that, said DLL calls proxy plug-ins and is embodied as the ActiveX assembly.
10. device according to claim 7 is characterized in that, the script file that said script engine also is used to obtain preset script specification and writes according to this preset script specification; Wherein, comprise in the said script specification about defining and call the standardize information of DLL.
CN2010102825068A 2010-09-14 2010-09-14 Method and device for calling dynamic link library (DLL) Pending CN102402455A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102825068A CN102402455A (en) 2010-09-14 2010-09-14 Method and device for calling dynamic link library (DLL)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102825068A CN102402455A (en) 2010-09-14 2010-09-14 Method and device for calling dynamic link library (DLL)

Publications (1)

Publication Number Publication Date
CN102402455A true CN102402455A (en) 2012-04-04

Family

ID=45884686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102825068A Pending CN102402455A (en) 2010-09-14 2010-09-14 Method and device for calling dynamic link library (DLL)

Country Status (1)

Country Link
CN (1) CN102402455A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235722A (en) * 2013-04-19 2013-08-07 南京莱斯信息技术股份有限公司 ActiveX control framework technology achieving method
CN103856396A (en) * 2012-11-30 2014-06-11 中兴通讯股份有限公司 Message transmission method between plugins and system thereof and proxy plugin
WO2015154700A1 (en) * 2014-04-11 2015-10-15 Tencent Technology (Shenzhen) Company Limited Method and apparatus for repairing dynamic link library file
CN105094773A (en) * 2014-05-09 2015-11-25 阿里巴巴集团控股有限公司 Module function reusing method and system
CN105630526A (en) * 2014-11-03 2016-06-01 阿里巴巴集团控股有限公司 Load control method and device for script
CN107315628A (en) * 2017-06-13 2017-11-03 浪潮金融信息技术有限公司 Plug-in unit call method and device, computer-readable recording medium, terminal
CN111596970A (en) * 2020-05-12 2020-08-28 广州市百果园信息技术有限公司 Dynamic library delay loading method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026584A1 (en) * 2004-07-27 2006-02-02 Muratori Richard D Explicit linking of dynamic link libraries
JP2006113935A (en) * 2004-10-18 2006-04-27 Hitachi Ltd Dynamic link library calling code generation method, program, and apparatus
CN101021804A (en) * 2007-03-13 2007-08-22 华为技术有限公司 Method and apparatus for calling dynamic library and dynamic library server
CN101387968A (en) * 2008-09-28 2009-03-18 杭州华三通信技术有限公司 Method and apparatus for resolving multi graphic identification and verifying dynamic link library collision
US20090128573A1 (en) * 2005-02-09 2009-05-21 Canice Lambe Memory Based Content Display Interception

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026584A1 (en) * 2004-07-27 2006-02-02 Muratori Richard D Explicit linking of dynamic link libraries
JP2006113935A (en) * 2004-10-18 2006-04-27 Hitachi Ltd Dynamic link library calling code generation method, program, and apparatus
US20090128573A1 (en) * 2005-02-09 2009-05-21 Canice Lambe Memory Based Content Display Interception
CN101021804A (en) * 2007-03-13 2007-08-22 华为技术有限公司 Method and apparatus for calling dynamic library and dynamic library server
CN101387968A (en) * 2008-09-28 2009-03-18 杭州华三通信技术有限公司 Method and apparatus for resolving multi graphic identification and verifying dynamic link library collision

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856396A (en) * 2012-11-30 2014-06-11 中兴通讯股份有限公司 Message transmission method between plugins and system thereof and proxy plugin
CN103235722A (en) * 2013-04-19 2013-08-07 南京莱斯信息技术股份有限公司 ActiveX control framework technology achieving method
CN103235722B (en) * 2013-04-19 2016-08-24 南京莱斯信息技术股份有限公司 A kind of ActiveX control framework technology implementation method
WO2015154700A1 (en) * 2014-04-11 2015-10-15 Tencent Technology (Shenzhen) Company Limited Method and apparatus for repairing dynamic link library file
US9928134B2 (en) 2014-04-11 2018-03-27 Tencent Technology (Shenzhen) Company Limited Method and apparatus for repairing dynamic link library file
CN105094773A (en) * 2014-05-09 2015-11-25 阿里巴巴集团控股有限公司 Module function reusing method and system
CN105630526A (en) * 2014-11-03 2016-06-01 阿里巴巴集团控股有限公司 Load control method and device for script
CN105630526B (en) * 2014-11-03 2019-04-19 阿里巴巴集团控股有限公司 The loading control method and device of script
CN107315628A (en) * 2017-06-13 2017-11-03 浪潮金融信息技术有限公司 Plug-in unit call method and device, computer-readable recording medium, terminal
CN107315628B (en) * 2017-06-13 2020-11-17 浪潮金融信息技术有限公司 Plug-in calling method and device, computer readable storage medium and terminal
CN111596970A (en) * 2020-05-12 2020-08-28 广州市百果园信息技术有限公司 Dynamic library delay loading method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11386893B2 (en) Human-computer interaction processing system, method, storage medium, and electronic device
CN102096631B (en) Interface testing method and device
CN102402455A (en) Method and device for calling dynamic link library (DLL)
CN110825488A (en) Business processing method and device, electronic equipment and storage medium
CN110765013B (en) Automatic execution method and system for flow
CN109445323B (en) WEB-based distributed intelligent measurement and control software platform design method
CN109933315A (en) A kind of patterned transaction processing system and method
US11381683B2 (en) System, device, and method of performing data analytics for advising a sales representative during a voice call
CN112214334A (en) Micro-service calling method and device, electronic equipment and computer-readable storage medium
CN110825807B (en) Data interactive conversion method, device, equipment and medium based on artificial intelligence
CN107562428A (en) Rule-based adaptable software quick interface arrangement method and system
CN110046052B (en) Service calling method and device
CN113568661A (en) Method for realizing app mixed development based on Android sdk
CN113467972A (en) Communication interface construction method, communication interface construction device, computer equipment and storage medium
CN103561113A (en) Web Service interface generating method and device
CN109005163B (en) HTTP dynamic request service calling method
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN110275701A (en) Data processing method, device, medium and calculating equipment
CN113626001A (en) API dynamic editing method and device based on script
CN115934180A (en) Workflow engine implementation method, system, device and medium
CN109597695B (en) Data processing method, device and equipment
CN113778401A (en) Page generation method and device
CN110780864A (en) Control method and device for class method replacement, storage medium and electronic equipment
CN112612554B (en) Method for unified management and control of hardware modules by using adaptive service analyzer
CN113590086B (en) Method for rapidly developing software, computer device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120404