CN100555224C - A kind of structure and manner of execution of executable dynamic link libraries CAR member - Google Patents

A kind of structure and manner of execution of executable dynamic link libraries CAR member Download PDF

Info

Publication number
CN100555224C
CN100555224C CNB2006100286818A CN200610028681A CN100555224C CN 100555224 C CN100555224 C CN 100555224C CN B2006100286818 A CNB2006100286818 A CN B2006100286818A CN 200610028681 A CN200610028681 A CN 200610028681A CN 100555224 C CN100555224 C CN 100555224C
Authority
CN
China
Prior art keywords
function
car member
interface
car
dynamic link
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
Application number
CNB2006100286818A
Other languages
Chinese (zh)
Other versions
CN101101561A (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.)
Elcoteq Shanghai Huajie Technology Co. Ltd.
Original Assignee
KETAI CENTURY SCIENCE AND TECHNOLOGY Co Ltd SHANGHAI
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 KETAI CENTURY SCIENCE AND TECHNOLOGY Co Ltd SHANGHAI filed Critical KETAI CENTURY SCIENCE AND TECHNOLOGY Co Ltd SHANGHAI
Priority to CNB2006100286818A priority Critical patent/CN100555224C/en
Publication of CN101101561A publication Critical patent/CN101101561A/en
Application granted granted Critical
Publication of CN100555224C publication Critical patent/CN100555224C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of building method of executable dynamic link libraries CAR member, the operating system that promptly comprises CAR member compiler is carried out following steps: CAR member compiler is when compiling component description file, as finding to have special keyword, then add interface ImainApplet in the source file framework that generates, interface comprises function one and function two; Fill in function one and function two, use the c++ compiler, compiling source file framework produces executable dynamic link libraries CAR member.The present invention also provides a kind of manner of execution of executable dynamic link libraries CAR member, be used to carry out the CAR member of above-mentioned gained, be that operating system is after loading the CAR member, obtain the interface ImainApplet in the metadata of interface, at first call above-mentioned function one, can outwards provide other service simultaneously, after the CAR structural components service cycle is finished with interface shape, call function two deals with to allow the user, unloads described CAR member at last.

Description

A kind of structure and manner of execution of executable dynamic link libraries CAR member
Technical field
The present invention relates to the component technology in a kind of computer software, relate in particular to a kind of structure and manner of execution of executable dynamic link libraries CAR member.
Background technology
Traditional member does not have the requirement of inlet at present, so just can not move yet.Such as common EXE file main or the wmain inlet as whole execution body is arranged, thereby common EXE file can be loaded the device loading, the address space that has oneself, and the code in execution main function or the wmain function, but common EXE just passes to EXE by local loader with execution parameter and carries out body, not the function of interface type, so the direct startup of having no way from long-range execution band parameter; Common for another example DLL has the inlet of DllMain function as initialization DLL, but it is can not be self-existent, just it is passable to be loaded into the address space of process by other process, load finish after, for initialization DLL, carry out some initialized codes by DllMain, when DLL unloads, handle some resources recovery or the thing relevant, but same DllMain is common function with unloading, not the function of interface type, so yet impossible direct initialization in long-range band parameter; Though Windows programming has the inlet of WinMain () as user program, its effect is equivalent to the main function of traditional exe, and does not have substantial difference, and so function that neither interface type is also can not direct initialization in long-range band parameter.Therefore how to make the existing long-range ability of component technology, it is a technical matters that dynamic load capability is arranged again.
Summary of the invention
The technical problem to be solved in the present invention provides building method and its manner of execution of a kind of executable dynamic link libraries CAR member, make relevant CAR member be directed carrying out in the certain parameter of long-range basis, and provide certain member service simultaneously, after the life cycle of CAR member oneself is finished, can be unloaded, allow the user to handle relevant resource during unloading.
For solving the problems of the technologies described above, the invention provides a kind of building method of executable dynamic link libraries CAR member, the operating system that promptly comprises CAR member compiler is carried out following steps: CAR member compiler is when compiling component description file, as finding to have the main key word, then in the source file framework that generates, add interface ImainApplet, above-mentioned interface comprises function one and function two, described function one refers to function AtEntry (), described function AtEntry () refers to AtEntry ([in] EzArray<EzStr〉argcv), wherein but argcv is the self-described character string data of long-range, be used for the described CAR member of initialization, described function two refers to function AtExit (), and described function AtExit () is used for reclaiming resource when described CAR member unloads; Fill in function one and function two,, produce executable dynamic link libraries CAR member with c++ compiler compiling source file framework.
The present invention also provides a kind of manner of execution of executable dynamic link libraries CAR member, be used to carry out the CAR member of above-mentioned gained, be that operating system is after loading described CAR member, obtain the interface ImainApplet in the metadata of interface, at first call above-mentioned function one, can outwards provide other service simultaneously, after described CAR structural components service cycle is finished with interface shape, call function two deals with to allow the user, unloads described CAR member at last.
The present invention makes relevant CAR member can be directed according to certain parameter carrying out, and certain member service is provided simultaneously owing to add special keyword in the component description file.
Description of drawings
Fig. 1 is the process flow diagram of the building method of dynamic link libraries in the specific embodiment of the invention.
Fig. 2 is the process flow diagram of the manner of execution of dynamic link libraries in the specific embodiment of the invention.
Embodiment
The present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
At first tell about the principle that the inventive method relates to.CAR is Component Assemble atRuntime, for being applied to the component technology on the Elastos operating system.The inventive method is promptly based on CAR.CAR file in the inventive method is the description document of the interface that is used for describing member (component) (interface) feature that defines in the Elastos operating system, and main then is the special keyword (keyword) in the above-mentioned CAR file.The CAR member compiler (carc) of Elastos operating system is when compiling CAR file, as find that having the main key word to imply adds interface IMainApplet in the document framework that generates, this interface comprises function AtEntry ([in] EzArray<EzStr〉argcv) and AtExit (), generates associated components then.Operating system is after loading member, learnt interface IMainApplet from metadata of interface, just calling interface method AtEntry ([in] EzArray<EzStr〉argcv) at first, other service can outwards be provided with interface shape simultaneously, after structural components service cycle is finished, call AtExit () interface method and do some processing, unload member afterwards to allow the user.
Below in conjunction with specific embodiment, further tell about the present invention.
As shown in Figure 1, be the process flow diagram of the building method of dynamic link libraries in the specific embodiment of the invention.At first be that code in the building method of executable dynamic link libraries CAR member is realized:
1) CAR file literary style
module
{
[main]class?CMainHello{?}
}
Can compile above-mentioned CAR file by the carc of system, and produce corresponding c++ language codes framework; The carc compiler is when compiling CAR file, if find to have the main key word, can produce the source file framework automatically, in the file framework, can include interface IMainApplet, this interface includes two functions: one is AtEntry ([in] EzArray<EzStr〉argcv), and argcv is the character string data of self-described, but long-range is used for initialization CAR member; Another is that AtExit () is used for when the CAR member unloads, and reclaims resource, handles relevant matters.
2) user fills in AtEntry () and AtExit () function, uses the c++ compiler, compiles this document framework, just can produce executable dynamic link libraries CAR member.
To above-mentioned CAR member two kinds of executive modes can be arranged, that is:
The local execution, the title of key entry member dll under order line can be carried out as this locality that is loaded into of exe file by system.The code that at first calls in the AtEntry () is carried out, can call AtExit () after finishing after, log off.
Long-range execution, requiring far-end is Elastos operating system, perhaps the tool operation has the virtual machine of elastos, by the dll that specifies REMOTE MACHINE url and need to carry out, and the parameter of carrying when carrying out, system carries out address space at far-end pellucidly with dll, and the same code that calls in the AtEntry () is carried out, after can calling AtExit () after finishing, log off.
For the user, same service can also can be long-range in this locality, all transparent execution, and do not have any difference.Thereby on Elastos operating system, dll can be directly loaded by operating system, and need oneself independently address space can not be arranged by exe, and main thread is carried out oneself code sequence.Fig. 2 is the process flow diagram of the manner of execution of middle dynamic link libraries in the specific embodiment of the invention
In sum, the inventive method makes the existing long-range ability of CAR member based on the improvement to common member DLL, and the dynamic load capability of DLL is arranged again, thereby makes member be applied with flexible way more.

Claims (4)

1, a kind of building method of executable dynamic link libraries CAR member, it is characterized in that, the operating system that comprises CAR member compiler is carried out following steps: described CAR member compiler is when compiling component description file, as finding to have the main key word, then in the source file framework that generates, add interface ImainApplet, described interface comprises function one and function two, described function one refers to function AtEntry (), described function AtEntry () refers to AtEntry ([in] EzArray<EzStr〉argcv), wherein but argcv is the self-described character string data of long-range, be used for the described CAR member of initialization, described function two refers to function AtExit (), and described function AtExit () is used for reclaiming resource when described CAR member unloads; Fill in described function one and function two, compile described source file framework, produce executable dynamic link libraries CAR member with the c++ compiler.
According to the building method of the described executable dynamic link libraries CAR member of claim 1, it is characterized in that 2, described component description file is the description document that is used for describing the interface characteristics of member.
3, a kind of manner of execution of executable dynamic link libraries CAR member, be used to carry out CAR member according to claim 1 or 2 gained, it is characterized in that, described operating system obtains the interface ImainApplet in the metadata of interface after described CAR member is loaded, at first call described function one, other service can outwards be provided with interface shape simultaneously, after described CAR structural components service cycle is finished, call described function two and deal with to allow the user, unload described CAR member at last.
According to the manner of execution of the described executable dynamic link libraries CAR member of claim 3, it is characterized in that 4, described CAR member loads and refers to local the execution or long-range execution, promptly keys in the title of described CAR member under order line.
CNB2006100286818A 2006-07-06 2006-07-06 A kind of structure and manner of execution of executable dynamic link libraries CAR member Expired - Fee Related CN100555224C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100286818A CN100555224C (en) 2006-07-06 2006-07-06 A kind of structure and manner of execution of executable dynamic link libraries CAR member

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100286818A CN100555224C (en) 2006-07-06 2006-07-06 A kind of structure and manner of execution of executable dynamic link libraries CAR member

Publications (2)

Publication Number Publication Date
CN101101561A CN101101561A (en) 2008-01-09
CN100555224C true CN100555224C (en) 2009-10-28

Family

ID=39035841

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100286818A Expired - Fee Related CN100555224C (en) 2006-07-06 2006-07-06 A kind of structure and manner of execution of executable dynamic link libraries CAR member

Country Status (1)

Country Link
CN (1) CN100555224C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262587B (en) * 2011-07-22 2014-12-31 中国科学院声学研究所 Breakpoint debugging method and debugger

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CORBA构件应用服务器的研究. 王珊,陈松,周明天.计算机应用,第23卷第10期. 2003
CORBA构件应用服务器的研究. 王珊,陈松,周明天.计算机应用,第23卷第10期. 2003 *

Also Published As

Publication number Publication date
CN101101561A (en) 2008-01-09

Similar Documents

Publication Publication Date Title
CA2579662C (en) Testing systems and methods for a resource constrained device
US7380242B2 (en) Compiler and software product for compiling intermediate language bytecodes into Java bytecodes
CN107741851B (en) Compiling method and device of compiling system and terminal equipment
US9678767B2 (en) Unified extensible firmware interface (UEFI) driver and protocol
CN1504881A (en) Java execution equipment and java execution method
CN100549957C (en) One kind is loaded the method and a kind of isolating and is loaded the device of isolating
KR102156371B1 (en) Method for providing embedded software development tools for supporting embedded software development environment based on native building and apparatus thereof
CN107122216B (en) Dynamic loading method for embedded real-time operating system
CN102567033A (en) Class pre-loading method and device based on embedded real-time Java virtual machine
CN103443763A (en) ISA bridging including support for call to overidding virtual functions
US20040123308A1 (en) Hybird of implicit and explicit linkage of windows dynamic link labraries
CN102004662A (en) Embedded scalable virtual machine
CN112783558A (en) Method for accelerating self-decompression stage of Linux kernel starting
Kolovos et al. The epsilon pattern language
US20030149967A1 (en) Information processing method and system
US7685565B1 (en) Run time reconfiguration of computer instructions
CN100555224C (en) A kind of structure and manner of execution of executable dynamic link libraries CAR member
US6922735B2 (en) Management of co-processor information by integrating non-program information with program information
US20030005020A1 (en) Initialization of Java classes in Java virtual machine environments
CN102508694B (en) Method and system for operating file of virtual machine
CN113031964B (en) Big data application management method, device, equipment and storage medium
CN109857380B (en) Workflow file compiling method and device
Baloukas et al. Mapping embedded applications on MPSoCs: the MNEMEE approach
CN101876898A (en) Registration method of COM assembly and device thereof
Mukherjee et al. Develop once deploy anywhere achieving adaptivity with a runtime linker/loader framework

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1112976

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1112976

Country of ref document: HK

ASS Succession or assignment of patent right

Owner name: SHANGHAI KORTIDE TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: KETAI CENTURY SCIENCE AND TECHNOLOGY CO., LTD., SHANGHAI

Effective date: 20110727

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20110727

Address after: 201203 No. 401, 177 and 501, blue wave road, Zhangjiang hi tech park, Shanghai

Patentee after: Elcoteq Shanghai Huajie Technology Co. Ltd.

Address before: 201203 Shanghai city Pudong New Area Jing Road 498 No. 17 Pudong Software Park Building 2 layer

Patentee before: Ketai Century Science and Technology Co., Ltd., Shanghai

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091028

Termination date: 20180706

CF01 Termination of patent right due to non-payment of annual fee