CN1118021C - Dynamic expanding method of computer software function - Google Patents
Dynamic expanding method of computer software function Download PDFInfo
- Publication number
- CN1118021C CN1118021C CN 00102692 CN00102692A CN1118021C CN 1118021 C CN1118021 C CN 1118021C CN 00102692 CN00102692 CN 00102692 CN 00102692 A CN00102692 A CN 00102692A CN 1118021 C CN1118021 C CN 1118021C
- Authority
- CN
- China
- Prior art keywords
- function
- application program
- program
- clasp joint
- computer software
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The present invention relates to a dynamic expansion method for a computer software function, wherein the present invention discloses a technique for dynamically correcting or changing the software function when computer software such as an application program is executed; a hook joint function is input in the progress of the application program according to the technique disclosed by the present invention; a method which can realize the expansion of the software function of the application program with no need of using an interruption routine and no need of modifying the original program codes of the application program is provided through the step of loading a dynamic linking program library called by the hook joint function into the progress.
Description
Technical field
The invention relates to a kind of dynamic expanding method of computer software function, particularly a kind of application program that is applied to execution under the Windows (Windows), by in the process of application program, injecting the means of a clasp joint function, realize the interruption of application programs, and reach the purpose of extended function.
Background technology
In conventional art, expand the implementation method of the function of application software, roughly comprise following two kinds:
1. revise the original program of application program, again amended original program is compiled (Compile) and link (Link), this method needs the programmer through complicated compiling procedure, the function that just can finish application program expands, for the programmer is a kind of challenge, the cost of development of application program is higher, and can only carry out function to single application program and expand, and is difficult to realize a plurality of programs are finished the expansion of identical function.
2. the binary code saving format of original program is analyzed, write one section expanding program sign indicating number that extended function can be provided, revise inlet point (the Entry Point of original program again, be the starting point that original program begins to carry out), inlet point after revising is echoed mutually with the expanding program sign indicating number, point to the position that the expanding program sign indicating number begins to carry out, realize purpose the original application program extended function; But this mode must be carried out modification partly to original application program, not only has suitable degree of difficulty, also can cause potential harm to original application program, even the interface (Interface) that provides computer virus to invade.
Summary of the invention
Fundamental purpose of the present invention is providing a kind of interruption routine (InterruptRoutine) that neither needs to use, and does not also need to revise the original program of application program, just can realize expanding the method for the software function of application program.
Another object of the present invention providing a kind of by injecting a clasp joint function in the process in application program, realizes the method for the software function of dynamically correction or replacing application program, has instantaneity and professional platform independence (Cross Platform).
The invention provides a kind of dynamic expanding method of computer software function,, include in order to the application program of carrying out under Windows is carried out the expansion of function:
One clasp joint function is injected the process of this application program, this clasp joint function and point to a function and expand module;
Carry out corresponding this clasp joint function, this application program is interrupted; And
Carry out this clasp joint function function pointed and expand module, and expand the execution result of module, when not forbidding extended function, control is returned this application program continue to carry out, when forbidding extended function, finish this application program according to this function.
The disclosed technology according to the present invention, be that a kind of clasp joint function that can call out a certain dynamic link routine library (DLL) is injected among the process of application program, by in the implementation of application program, start the mode of this clasp joint function according to user's needs, carry out dynamic link routine library (DLL), and realize the purpose of the function of expansion application program.
About detailed technology content of the present invention and embodiment, conjunction with figs. explanation now as after.
Description of drawings
Fig. 1 is the operational function calcspar of application program in Windows.
Fig. 2 is the process structure synoptic diagram of application program.
Fig. 3 is a key step process flow diagram of the present invention.
Fig. 4 is the present invention's an embodiment process flow diagram, shows the operation workflow figure by clasp joint function interrupted application program.
Fig. 5 is the present invention's an embodiment process flow diagram, shows the operation workflow figure that expands module by clasp joint function call function.
Fig. 6 shows a kind of embodiment of pattern manipulation interface.
Fig. 7 shows the embodiment of another kind of pattern manipulation interface.
Embodiment
In Windows; application program (APP; Application) receiving external message (Message) afterwards; the functional block diagram of its operation is shown in ' Fig. 1 '; when Windows (10) is received external message (11) (as the operation information of user's input); or come from message (12) that application program responds afterwards; the clasp joint function (13) of the process of injection application program will receive this news and respond; then by corresponding clasp joint function (13) call out one in order to the function extended interface (14) that former application program provided extended function (as dynamic link routine library (DLL) or a kind of pattern manipulation interface (GUI; Graphics User Interface)); can link with the function expanding program (15) of various different purposes by this function extended interface (14); as defence program; the process monitoring program; multimedia auxiliary routine etc.; to realize that original application program is carried out the purpose that function expands; and after the function expanding program is finished; control is given back system or application program, and can not have influence on the function and the integrality of former application program.
The implementation of application program (APP) in fact is exactly a kind of cyclic process of message, when an application program (APP) when being activated, can judge whether the message that the system of receiving sends, if receive the message of system, then this message is sent to application program (APP), and wait for the message of next system, if there is not new system message to be written into, then application program (APP) just is in waiting status, and the contact between system message and the application program (APP) itself, then can represent by process, the process that system message is acted on application program is considered as process (Process), the structure of this process is shown in ' Fig. 2 ', satisfy the requirement of clasp joint function 1 (Hook1) when system message, then point to (Pointer) dynamic link routine library 1 (DLL1) by clasp joint function 1 (Hook1), according to the content in (DLL1) run application (APP), by the time after the content of (DLL1) is finished, again control is forwarded to next clasp joint function 2 (Hook2), similarly point to dynamic link routine library 2 (DLL2) according to (Hook2) again, carry out the content of (DLL2), the rest may be inferred, transfers control in regular turn, till the clasp joint function that will not carry out, and the present invention is just according to these characteristics, with a clasp joint function, and the injection process, with the interruption of realization, and then reach function and expand former application program.
The disclosed method according to the present invention includes:
At least one clasp joint function is injected the means of the process of application program;
Carry out the means of corresponding clasp joint function, for example provide the user selectable option of operation,, and carry out and the corresponding clasp joint function of this news according to message of content generation of this option by a pattern manipulation interface (GUI); And
Carry out the means that clasp joint function function pointed expands module.
The flow process of its enforcement can be divided into three phases according to process flow diagram shown in ' Fig. 3 ':
A. injection stage of clasp joint function (Hook);
B. stage that is written into of configuration file (Config File); And
C. control transition phase.
When Windows obtains a message (as the user from keyboard, the operation information of mouse or the input of other computer entry devices), meeting is the calling system function in regular turn, and be written into the clasp joint function (step 30) in the process of application program, after reading clasp joint function provided by the present invention, be used for the dynamic link routine library (DLL) that function expands owing to injected in this clasp joint function, so content according to this dynamic link routine library (DLL), read the relevant portion of configuration file (Config File), the function of taking out wherein expands module (Module) (step 31), judge whether to forbid extended function (step 32), if forbid extended function, then wait (Enable) to be activated message, and cancellation extended function (step 33); If allow, then function expansion module is started working, and call correlation parameters (Parameter), wait for that Windows writes this parameter the address space (AddressingSpace) (step 34) of application program, judge whether to being written into for the first time (step 35), if be written into correlation parameter for the first time, then that this parameter is represented function expands the address space (step 36) that module is written into (Load) application program, start extended function (step 37), after finishing extended function, waiting system send leave application program withdraw from message (Exit) (step 38); And if Windows judges it is not to be written into correlation parameter for the first time, then control can be passed to next stage clasp joint function (step 39), repeat then (step 30), again according to the result of this clasp joint function it (DLL) pointed, so that whether decision returns application program with control continue to carry out, or end application; So disclosed method according to the present invention, will when starting function expansion module, give function to expand module control self-application program, when expanding module, function control is returned application program according to execution result, then can fully get back in the original application program again, proceed the function of former application program, so circulation.
The embodiment explanation
Following the present invention is with a specific embodiment, and the technology that the present invention is described is applied in the situation of a certain application program among the Windows.
The purpose of this embodiment is in order to realize the instant protection of application programs; that is be that this application program itself does not provide the function of locking protection; then can allow the user at the beginning of starting application program by method of the present invention; by the execution of another software protection program (ProtectedApplication), provide the user to determine whether to carry out the function of operational lock with the password of setting.With software protection program provided by the present invention is example; will before application program launching, eject dialog box (Dialog Box); require the user to input password; after confirming that password is correct; allow the user to bring into use this application program; if password input three times is incorrect; then can close application program; assert that promptly the user does not have the authority of using this application program; and then protection user's private software is not subjected to artificial external infringement; the enforcement idiographic flow of this software protection as ' shown in Fig. 4, Fig. 5 ', main operation workflow comprises two stages:
(interrupt phase of application program)
When starting in a certain application program, Windows will receive an external message (step 41) (for example the user has clicked the executive button of a certain application program in the windows workspace platform); In the process of this application program, inject a clasp joint function (Hook) (step 42) again, set the option (step 43) that a judgment means provides the user to operate, (whether for example eject dialog box inquiry user will protect this application program), and the user can utilize mouse, keyboard or other input equipments are confirmed, the example that is a kind of pattern manipulation interface that ' Fig. 6 ' disclosed, if agree the extended function that the execute protection program is provided, then call clasp joint function dynamic link routine library DLL (step 44) pointed, and finish the Interrupt Process (step 45) of application program;
(execute phase of extended function)
After application program is interrupted successfully; read in listed files (filelist) (step 51); check that current defence program is whether in the listed files of the process of application program (step 52); if exist this defence program of expression to be injected in the application program; then import password whether correctly (step 53) by inspection user; its pattern manipulation interface is for example shown in ' Fig. 7 '; whether decision continues execute protection program (step 54); realize the protection of application programs according to the execution result of defence program; if but defence program is not in the listed files of the process of application program; represent that then the clasp joint function does not inject this application program; that is be the defencive function that application program does not expand defence program to be provided; so control is transferred to next clasp joint function (step 55); the rest may be inferred; transfers control in regular turn; again according to the result of clasp joint function it (DLL) pointed; so that whether decision returns application program with control continue to carry out; make former application program can continue the original function of true(-)running, or end application.
The invention effect
1. neither need to use interruption routine (Interrupt Routine), also do not need to revise
The original program of application program just can realize expanding the software function of application program.
2. can dynamically revise or change the software function of application program, and have instantaneity
With professional platform independence (Cross Platform).
The reference numeral explanation
10 ... Windows
11 ... external message
12 ... the message that application program is responded
13 ... the clasp joint function
14 ... the function extended interface
15 ... the function expanding program
Claims (7)
1. the dynamic expanding method of a computer software function in order to the application program of carrying out under Windows is carried out the expansion of function, includes:
One clasp joint function is injected the process of this application program, this clasp joint function and point to a function and expand module;
Carry out corresponding this clasp joint function, this application program is interrupted; And
Carry out this clasp joint function function pointed and expand module, and expand the execution result of module, when not forbidding extended function, control is returned this application program continue to carry out, when forbidding extended function, finish this application program according to this function.
2. the dynamic expanding method of computer software function according to claim 1, wherein this function expands module and can be a dynamic link routine library.
3. as the dynamic expanding method of computer software function as described in the claim 2, wherein this function expands module and includes the function expanding program.
4. as the dynamic expanding method of computer software function as described in the claim 3, wherein this function expanding program can be a defence program, provides the user to determine whether to carry out with the password of setting the function of operational lock.
5. as the dynamic expanding method of computer software function as described in the claim 3, wherein this function expanding program can be a process monitoring program.
6. the dynamic expanding method of computer software function according to claim 1, wherein carry out the step of this corresponding clasp joint function, be to provide the user selectable option of operation, carry out corresponding this clasp joint function according to the content of this option by producing a pattern manipulation interface.
7. as the dynamic expanding method of computer software function as described in the claim 6, the step of wherein carrying out this corresponding clasp joint function also includes this function is expanded the address space that module is written into this application program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 00102692 CN1118021C (en) | 2000-02-24 | 2000-02-24 | Dynamic expanding method of computer software function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 00102692 CN1118021C (en) | 2000-02-24 | 2000-02-24 | Dynamic expanding method of computer software function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1310385A CN1310385A (en) | 2001-08-29 |
CN1118021C true CN1118021C (en) | 2003-08-13 |
Family
ID=4576506
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 00102692 Expired - Fee Related CN1118021C (en) | 2000-02-24 | 2000-02-24 | Dynamic expanding method of computer software function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1118021C (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100422931C (en) * | 2005-02-05 | 2008-10-01 | 西安大唐电信有限公司 | Method and system for updating software function |
CN100345112C (en) * | 2005-11-25 | 2007-10-24 | 中国科学院软件研究所 | Member extending method for operating system |
CN101335723B (en) * | 2008-08-04 | 2010-12-08 | 腾讯科技(深圳)有限公司 | Instant communication system, window establishing method and system |
CN104077184B (en) * | 2013-03-25 | 2018-12-11 | 腾讯科技(深圳)有限公司 | A kind of course control method and computer system of application program |
CN103645928A (en) * | 2013-12-06 | 2014-03-19 | 浪潮(北京)电子信息产业有限公司 | Software function module processing method and system |
CN104536839B (en) * | 2014-12-26 | 2019-02-01 | 北京奇虎科技有限公司 | The method and device of method call is carried out between process |
-
2000
- 2000-02-24 CN CN 00102692 patent/CN1118021C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1310385A (en) | 2001-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Madou et al. | Software protection through dynamic code mutation | |
US7062755B2 (en) | Recovering from compilation errors in a dynamic compilation environment | |
JP5173427B2 (en) | Compressed read-only memory file system (CRMFS) image update | |
EP1074911B1 (en) | Aspect-oriented programming | |
US20100242022A1 (en) | System and method for managing cross project dependencies at development time | |
US20070028225A1 (en) | Method and apparatus for preemptive monitoring of software binaries by instruction interception and dynamic recompilation | |
US20060101432A1 (en) | Assembly language code compilation for an instruction-set architecture containing new instructions using the prior assembler | |
US7765520B2 (en) | System and method for managing cross project dependencies at development time | |
Lanusse et al. | Real-time modeling with UML: The ACCORD approach | |
CN103778373A (en) | Virus detection method and device | |
CN1791860A (en) | Apparatus and methods for restoring synchronization to object-oriented software applications in managed runtime enviroments | |
US20070245322A1 (en) | System and method for interactive and assisted program development | |
CN1118021C (en) | Dynamic expanding method of computer software function | |
AU2004216771B2 (en) | System and method for determining when an EJB compiler needs to be executed | |
CN111061486B (en) | Android application program increment method | |
CN112783558A (en) | Method for accelerating self-decompression stage of Linux kernel starting | |
JPH10507016A (en) | System, method and compiler preprocessor for conditionally compiling software compilation units | |
US20080155521A1 (en) | System, Method, Apparatus and Computer Program Product for Providing Memory Footprint Reduction | |
CA2101716A1 (en) | Debugging/modifying of software systems | |
US20030149967A1 (en) | Information processing method and system | |
CN111814119B (en) | Anti-debugging method | |
CN105260184A (en) | Image recovery file debugging method and apparatus | |
CN107577955B (en) | A kind of android system application Hook method and application lock | |
CN111596970A (en) | Dynamic library delay loading method, device, equipment and storage medium | |
CA2157130C (en) | Compiling device and compiling method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20030813 Termination date: 20110224 |