CN102541647B - Method for calling external function of executable component in software integration process - Google Patents

Method for calling external function of executable component in software integration process Download PDF

Info

Publication number
CN102541647B
CN102541647B CN 201010608205 CN201010608205A CN102541647B CN 102541647 B CN102541647 B CN 102541647B CN 201010608205 CN201010608205 CN 201010608205 CN 201010608205 A CN201010608205 A CN 201010608205A CN 102541647 B CN102541647 B CN 102541647B
Authority
CN
China
Prior art keywords
application software
controlled application
function
software
instruction
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.)
Active
Application number
CN 201010608205
Other languages
Chinese (zh)
Other versions
CN102541647A (en
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.)
Shenyang Institute of Automation of CAS
Original Assignee
Shenyang Institute of Automation of CAS
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 Shenyang Institute of Automation of CAS filed Critical Shenyang Institute of Automation of CAS
Priority to CN 201010608205 priority Critical patent/CN102541647B/en
Publication of CN102541647A publication Critical patent/CN102541647A/en
Application granted granted Critical
Publication of CN102541647B publication Critical patent/CN102541647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for calling external function of an executable component in software integration process, comprising the following steps of: decomposing the function of a controlled application software, marking the operation step for realizing the function of the software and the interface control component resources, and keeping the corresponding logic sequence; determining a command sending sequence by using the operation step, the interface control component resources and the corresponding logic sequence of the interface control component resources; starting the controlled application software, acquiring the characteristics of the started controlled application software and sending corresponding commands to the controlled application software according to the command sending sequence in a way which can be identified by the controlled application software; receiving the commands by the controlled application software to analyze and process, and executing corresponding functions. Due to the adoption of the method, the function of the executable component can be called and packaged under the condition that the applied software program interface cannot be obtained, the system dependence can be reduced, and the integration efficiency of the system can be improved.

Description

But a kind of executive module function external call method in software integrating process
Technical field
The present invention relates to a kind of software system integration and process communication technology, but a kind of executive module function external call method in software integrating process specifically.
Background technology
Day by day huge along with the increasingly extensive of computer utility and software systems scale, current application software becomes increasingly complex.In the process of program and system development, the continuous renewal with software engineering of deepening constantly along with the field business must need different times, and the comprehensive integration of the application software of difference in functionality is so that the design of DLL (dynamic link library) just seems is very important.So-called interface is exactly the definition of a series of correlation techniques and community set.Application programming interface is called for short API (ApplicationProgramming Interface), is exactly the agreement that the different ingredients of software systems are connected.Provide the software of the defined function of API to be called the realization of this API.API is a kind of interface, so be a kind of abstract.For example, the mode of draw icons function is called in one group of API definition in shape library, with display icon on screen.Calling is connected to this group API during compiling, the realization (storehouse) of just calling API during execution comes display icon.The API of operating system can be used to storage allocation or access file.Many systems and application program provide api interface and realization, such as graphics system, and database, network, Web service, some game even.API has many different designs, and the interface that is used for carrying out fast generally includes function, constant, variable and data structure also have alternate manner, as pass through interpreter, or provide level of abstraction to cover with the relevant information of API realization, guarantee to use the code of API to need not change and adapt to the realization variation.
Communicate by letter or carry out specific function package if want to complete between the process of operating system and application software or between the process of two application software, need to follow the interface scheme of making an appointment.For example under Windows operating system, appointed call standard such as dynamic link library (DLL, Dynamic Link Library), the Component Object Model (COM, Component Object Model) etc., all and application integrated for the function of program provides good application platform.
Under existing computer technology, operating system is the most direct unit of coming into contacts with the user, and all application programs are all to operate on the basis of operating system.Will complete a certain function in application program, be all that the form with function call realizes, same, and application program is also to notify operating system to carry out corresponding function in the mode of function call.Each specific function that operating system can be completed has a function corresponding with it usually, institute namely, the function that operating system can be completed it offers application call with the form of function, application program just is called system call to calling of these functions, and the set of these functions is exactly the interface that operating system offers application programming.In the practice of application programming, at first the design of DLL (dynamic link library) will make the responsibility of system obtain classifying rationally.Good Interface design can reduce interdepending of system's each several part, improves the cohesion of component units, reduces the degree of coupling between component units, thereby improves maintainability and the extendability of system.The fundamental purpose of DLL (dynamic link library) is to provide application program and developer accessing the ability of one group of routine, and need not the details of accessing source code or understanding internal work mechanism.
In the situation that some is special, but executive module does not provide DLL (dynamic link library) or interface to learn, can't carry out function call by the interface specification that operating system provides again.In this class situation, when thinking specific function that integration application has, just can't be realized by the mode of interface interchange.
Summary of the invention
But the weak point that can't be realized by the mode of interface interchange for the integrated existence of executive module in prior art, but the technical problem to be solved in the present invention is to provide the executive module function external call method in the software integrating process that a kind of concrete function of application program that can docking port the unknown calls.
For solving the problems of the technologies described above, the technical solution used in the present invention is:
But the executive module function external call method in software integrating process of the present invention comprises the following steps: controlled application software is carried out Function Decomposition, the operation steps and the interface control resource that realize software function are carried out mark, and keep the respective logic order; Utilize aforesaid operations step and interface control resource and respective logic thereof sequentially to determine the instruction sending order; Start controlled application software, the feature of controlled application software after obtaining to start, but send command adapted thereto to controlled application software by above-mentioned instruction sending order with controlled application software recognition method; Controlled application software receives above-mentioned instruction and analyzes, processes, and carries out corresponding function.
The feature of controlled application software after described acquisition starts comprises following steps but send command adapted thereto by above-mentioned instruction sending order with controlled application software recognition method to controlled application software: the host process sign that obtains controlled application software in the mode of enumerating; Utilize the host process sign to obtain corresponding controlled application software resources control sign; Instruction is sent to controlled application software and principal parameter item in the instruction transport function that upgrades in time according to predefined logical order; According to the performing step of the controlled application software function of grasping, inquire about with the respective logic order, obtain resource control class name; The api function that the instruction that utilizes host process sign, controlled application software resources control sign and resource control class name to provide by operating system is transmitted, to controlled application software move instruction, be inserted in the instruction queue of controlled application software, wait for controlled application software response.
The described host process that obtains controlled application software in the mode of enumerating is designated: according to the key assignments that controlled application software is registered in operating system, utilize the api function that operating system provides to return to controlled application software sign.
Utilizing the host process sign to obtain corresponding controlled application software resources control is designated: according to the division of operating system to management resource and operating resource, utilize the api function that operating system provides to return to controlled application software resources control sign.
Described instruction sending order is the order that controlled application software realizes that certain function will be carried out.
The present invention has following beneficial effect and advantage:
1. adopt the inventive method that controlled application software is carried out when integrated, need not to know the routine interface of controlled application software, only need grasp the basic operational steps that realizes controlled application software function, have very high dirigibility and convenience.
2. in the inventive method, main control software and controlled application software are present in respectively different address spaces, are only undertaken crosslinkedly between two processes by the host process sign of controlled application software, and the degree of coupling is very low, is easy to maintenance and management.
Description of drawings
Fig. 1 is the inventive method process flow diagram;
Fig. 2 is controlled application software instructions processing procedure schematic diagram in the inventive method;
Fig. 3 is main control software master surface chart in the embodiment of the present invention;
Fig. 4 is controlled application software master's surface chart in the embodiment of the present invention.
Embodiment
As shown in Figure 1, but the executive module function external call method in software integrating process of the present invention comprise the following steps:
1) controlled application software is carried out Function Decomposition, the operation steps and the interface control resource that realize software function are carried out mark, and keep the respective logic order;
2) utilize aforesaid operations step and interface control resource and respective logic thereof sequentially to determine the instruction sending order;
3) start controlled application software, the feature of controlled application software after obtaining to start, but send command adapted thereto to controlled application software by above-mentioned instruction sending order with controlled application software recognition method;
4) the above-mentioned instruction of controlled application software reception is analyzed, is processed, and carries out corresponding function.
The present embodiment is in step 1) in, main control software controlled application software is carried out integrated before, need to do the preliminary work of some secondary development, that is exactly operation steps and the process of being familiar with and grasping controlled application software specific function.For example: click " input parameter is set " and the data of appointment can be sent to main dialog box; Clicking " carrying out model calculation " button can the execution model evaluation work etc.The interface of above-mentioned controlled application software as shown in Figure 4.
Step 2) in, for the transaction module based on event or instruction, the execution sequence of software depends on the order that event occurs, execution sequence be by order produce event driven, and the generation of instruction event often and do not require orderliness minute.The instruction transmission is had a strict definition of cover, and send it to all relevant application programs when it produces, these instructions are used for driver application and move to realize certain function.The structure of application software is based on the order-driven model, and any one action of program all occurs after receiving an instruction, and every instruction can be with parameter.
Step 3) in, start controlled application software, main control software meeting call operation API calls CreateProcess creates an example of controlled application software process.The function declaration that provides is as follows:
CreateProcess(
LPCWSTR?lpszImageName,
LPCWSTR?lpszCmdLine,
LPSECURITY_ATTRIBUTES?lpsaProcess,
LPSECURITY_ATTRIBUTES?lpsaThread,
BOOL?fInheritHandles,
DWORD?fdwCreate,
LPVOID?lpvEnvironment,
LPWSTR?lpszCurDir,
LPSTARTUPINFOW?lpsiStartInfo,
LPPROCESS_INFORMATION?lppiProcInfo);
Parameter l pszImageName and lpszCmdLine be for pointing to an empty character string pointer that stops of application program module name journey, and when parameter l pszCmdLine was NULL, function will be with the value of parameter l pszImageName as command line parameter.As shown in Fig. 3,4, click " startup calculation procedure " button in the present embodiment in interface shown in Figure 3 (" model calculation A "), can start application software " model calculation B ", the interface is as shown in Figure 4.
Step 3) in, the feature of controlled application software after obtaining to start comprises following steps but send command adapted thereto by above-mentioned instruction sending order with controlled application software recognition method to controlled application software:
Obtain the host process sign of controlled application software in the mode of enumerating;
Utilize the host process sign to obtain corresponding controlled application software resources control sign;
Instruction is sent to controlled application software and principal parameter item in the instruction transport function that upgrades in time according to predefined logical order;
According to the performing step of the controlled application software function of grasping, inquire about with the respective logic order, obtain resource control class name;
The api function that the instruction that utilizes host process sign, controlled application software resources control sign and resource control class name to provide by operating system is transmitted, to controlled application software move instruction, be inserted in the instruction queue of controlled application software, wait for controlled application software response.
The described host process that obtains controlled application software in the mode of enumerating is designated: according to the key assignments that controlled application software is registered in operating system, utilize the api function that operating system provides to return to controlled application software sign.
Utilizing the host process sign to obtain corresponding controlled application software resources control is designated: according to the division of operating system to management resource and operating resource, utilize the api function that operating system provides to return to controlled application software resources control sign.
This operation can be obtained the host process sign of controlled application software, lays the foundation for so the instruction transmission between two processes.In the visualization display scheme of application software, but in the main interface of various operating resource mainly with the present program of form body of control.Visual resource will be managed and operate to operating system, is all that the identifier in operating system finds corresponding resource by resource.According to the type of resource, resource identification can be subdivided into the icon sign, cursor sign, interface identification, the various types of resource identifications of Application Instance sign etc.Operating system is given a unique identification number of each control resource appointment, and identifier is the numerical value of 4 byte longs normally, is used for different example in the different object of identification application and homogeneous object.
The visual main viewing area of controlled application software is a rectangular area that is used for receiving user's input and shows output that is created by application program, is the base unit of system management applications, is comprised of nonclient-area and client area.Controlledly can create one or more viewing areas after application software initiated, subsequently the operational process of application program be namely that host process is inner, between process and process, carry out data between process and system and process process with exchanges data.
Most event instruction all is associated with certain control resource, and each process or thread have an instruction process process (function), belong to certain thread instruction all will be processed by corresponding instruction process process.Each application program has an instruction respective queue, system can put into separately instruction queue to the instruction that belongs to each application program, and controlled application software is constantly obtained instruction and they are sent to corresponding control thread process process from the instruction queue of oneself.This circulation (instruction fetch-processing instruction) is until the user's process of application program (as close) termination routine and stopping in some way.In the operational process of embodiment, after " model calculation B " in software in Fig. 3 " model calculation A " startup Fig. 4, can enumerate to obtain the host process sign of controlled application software " model calculation B " to the desktop process, be convenient to carry out instruction and send and encapsulate control.
In host applications software, corresponding controlled program resource control sign being obtained, is to realize the step of specific function according to the controlled application program of grasping, and inquires about with respective logic, uses api function.Parameter 1 is the identifier of parent process in api function, parameter 2 is the next space identification of identical control resource, parameter 3 is pointed to the character string of the sky termination that contains resource control class name, and parameter 4 contains the empty character string that stops of resource control title for pointing to, to be set to NULL in application process.In the present embodiment, software " model calculation A " will acquire the sign of effective controls all in " model calculation B " software process address space, and facilitate next step to carry out parameter input and event-driven response.
Under the environment of operating system, instruction is between the operating system appointed in advance and application software or the data unit that transmits between application software and application software, and instruction can be very simple, for example only comprises text-string; Also can be very complicated, may comprise embedded object, instruction generally is sent in instruction queue, instruction queue can be held instruction in the transmitting procedure of instruction, it is the container of instruction storage, the instruction queue manager is acted as an intermediary when instruction being relayed to its target from its source, and the fundamental purpose of formation is to provide route and guarantees the transmission of instruction; Whole formation meeting reserve statement is until can successfully transmit it.The operating mechanism of the event that the is based on instruction response that controlled application software adopts, main control software can be shown in Figure 2 to the whole process of controlled application software transmission instruction, main control software will be from the command source sequence selection instruction be dispatched into the process address space of controlled application software, controlled application software is carried out instruction and is caught, then according to command content, instruction is processed, if after receiving exit instruction, controlled application software is carried out backed off after random.
Although controlled application software is present in different virtual address spaces from main control software, the command transmission mechanism that operating system provides can be via the transfer of system between any two application software or communicate between operating system and application software.Operating system has defined the api function that instruction is transmitted, the function that main control software needs the system that uses to provide in transmitting the process of instruction to controlled application software, under the help of operating system, be equivalent to insert corresponding steering order in the instruction queue of controlled application software, just completed integrated to controlled application software of main control software when controlled application software response instruction and when carrying out the process of concrete function.
By the enforcement of above-mentioned steps, can be in the process of software development and application, flexible other software basic functions to the needs encapsulation are carried out integrated, reach comparatively desirable effect.

Claims (4)

1. but the executive module function external call method in a software integrating process is characterized in that comprising the following steps:
Controlled application software is carried out Function Decomposition, the operation steps and the interface control resource that realize software function are carried out mark, and keep the respective logic order;
Utilize aforesaid operations step and interface control resource and respective logic thereof sequentially to determine the instruction sending order;
Start controlled application software, the feature of controlled application software after obtaining to start, but send command adapted thereto to controlled application software by above-mentioned instruction sending order with controlled application software recognition method;
Controlled application software receives above-mentioned instruction and analyzes, processes, and carries out corresponding function;
The feature of controlled application software after described acquisition starts comprises following steps but send command adapted thereto by above-mentioned instruction sending order with controlled application software recognition method to controlled application software:
Obtain the host process sign of controlled application software in the mode of enumerating;
Utilize the host process sign to obtain corresponding controlled application software resources control sign;
According to predefined logical order, instruction is sent to controlled application software, and principal parameter item in the instruction transport function that upgrades in time;
According to the performing step of the controlled application software function of grasping, inquire about with the respective logic order, obtain resource control class name;
The api function that the instruction that utilizes host process sign, controlled application software resources control sign and resource control class name to provide by operating system is transmitted, to controlled application software move instruction, be inserted in the instruction queue of controlled application software, wait for controlled application software response.
2. but by the executive module function external call method in software integrating process claimed in claim 1, it is characterized in that: the described host process that obtains controlled application software in the mode of enumerating is designated:
According to the key assignments that controlled application software is registered in operating system, utilize the api function that operating system provides to return to controlled application software sign.
3. but by the executive module function external call method in software integrating process claimed in claim 1, it is characterized in that: utilize the host process sign to obtain corresponding controlled application software resources control and be designated:
According to the division of operating system to management resource and operating resource, utilize the api function that operating system provides to return to controlled application software resources control sign.
4. but by the executive module function external call method in software integrating process claimed in claim 1, it is characterized in that: described instruction sending order is the order that controlled application software realizes that certain function will be carried out.
CN 201010608205 2010-12-24 2010-12-24 Method for calling external function of executable component in software integration process Active CN102541647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010608205 CN102541647B (en) 2010-12-24 2010-12-24 Method for calling external function of executable component in software integration process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010608205 CN102541647B (en) 2010-12-24 2010-12-24 Method for calling external function of executable component in software integration process

Publications (2)

Publication Number Publication Date
CN102541647A CN102541647A (en) 2012-07-04
CN102541647B true CN102541647B (en) 2013-06-26

Family

ID=46348603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010608205 Active CN102541647B (en) 2010-12-24 2010-12-24 Method for calling external function of executable component in software integration process

Country Status (1)

Country Link
CN (1) CN102541647B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105242915B (en) * 2015-09-07 2018-11-20 无锡天脉聚源传媒科技有限公司 A kind of processing method and processing device of data manipulation
CN107273226B (en) * 2017-06-30 2021-01-08 百度在线网络技术(北京)有限公司 Method and device for integrating components in android system and calling integrated components
CN111258674B (en) * 2020-01-14 2021-01-01 清华大学 Software module integration system and operation method of numerical application program
CN112486705B (en) * 2020-11-30 2024-08-27 中科美络科技股份有限公司 Component scheduling method and system of new energy automobile management software

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908014A (en) * 2010-09-01 2010-12-08 上海普元信息技术股份有限公司 System structure and method for realizing security audit and track in computer software system
CN101907991A (en) * 2010-06-30 2010-12-08 天津大学 Plug-in technique-based method for realizing power system analysis software interface

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101907991A (en) * 2010-06-30 2010-12-08 天津大学 Plug-in technique-based method for realizing power system analysis software interface
CN101908014A (en) * 2010-09-01 2010-12-08 上海普元信息技术股份有限公司 System structure and method for realizing security audit and track in computer software system

Also Published As

Publication number Publication date
CN102541647A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
Patel et al. Enabling high-level application development for the Internet of Things
US9696972B2 (en) Method and apparatus for updating a web-based user interface
JP5026415B2 (en) Data centric workflow
US20040017392A1 (en) Web service control for use in a graphical programming environment
US20180173503A1 (en) System and method for graphical programming
WO2017177695A1 (en) Method and system for development and integration of application in numerical control system
JP2000514944A (en) Hardware accelerator for object-oriented programming languages
CN111507020A (en) Graphical display method for distributed simulation results of electromechanical systems of multi-electric aircraft
CN109614093B (en) Visual intelligent contract system and intelligent contract processing method
CN102541647B (en) Method for calling external function of executable component in software integration process
CN110991040A (en) Complex product collaborative simulation environment construction method
CN112256406B (en) Operation flow platformization scheduling method
CN103795814A (en) Short message equipment universal communication interface based on fully domestic CPU and OS
CN114564176A (en) Code development method, server and storage medium
CN114077367A (en) Method and device for realizing shortcut of android application in Linux system
Pettit IV et al. Modeling behavioral design patterns of concurrent objects
EP1192532B1 (en) Extending the attributes of an application generated using a fourth generation programming tool
CN111596962A (en) Real-time microkernel system based on high-speed protocol channel and initialization method thereof
CN113625998A (en) Request processing method and device
Lane User interface software structures
CN117215661A (en) Event processing method, device and storage medium
CN111090430B (en) Application software development system under embedded system
Manduchi et al. The Java interface of MDSplus: towards a unified approach for local and remote data access
Becker et al. On mapping rt-uml specifications to rt-java api: bridging the gap
CN110297709A (en) Tool shares the computer input and its computer input method of operand function

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant