CN103823671A - Control establishing method, control invoking method and control invoking system - Google Patents

Control establishing method, control invoking method and control invoking system Download PDF

Info

Publication number
CN103823671A
CN103823671A CN201310737252.8A CN201310737252A CN103823671A CN 103823671 A CN103823671 A CN 103823671A CN 201310737252 A CN201310737252 A CN 201310737252A CN 103823671 A CN103823671 A CN 103823671A
Authority
CN
China
Prior art keywords
control
classid
guid
version number
key name
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
CN201310737252.8A
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.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang Software 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 Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN201310737252.8A priority Critical patent/CN103823671A/en
Publication of CN103823671A publication Critical patent/CN103823671A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a control establishing method. The control establishing method comprises the following steps of acquiring the version number of a control file; generating a globally unique identifier (GUID); forming a key name ClassID by using a control name and the version number; establishing the corresponding relation between the GUID and the ClassID; and using the GUID as a unique position identification of the control file in a control registry. Position identifications of controls which are in different versions but have the same name in the registry are different, and the problems that the position identifications of controls which have the same name but are in different versions are the same in a registry are the same, and the controls cannot be accurately invoked are solved.

Description

A kind of control creation method and call method and system
Technical field
The application relates to enterprise information management system technical field, more particularly, relates to a kind of control creation method and call method and system.
Background technology
Traditional system client is in the time using Active control, load control by reading registration table, a GUID of globally unique identifier in registration table can only point to unique control registered location, and the control that runs into multiple versions need to coexist while operation, because the control title of multiple versions is identical, the GUID of its globally unique identifier is also identical, all there will be cannot dynamic load the problem of control of corresponding version.
Prior art scheme is in the time logging in different editions service, at entrance Automatically invoked Microsoft (C) Register Server, registered paths is switched to corresponding version client registered address.Although solved the common problem using of many versions, in the time switching version, must scan registration to whole controls, directly affect entire system performance, and then affect user's experience effect.
Summary of the invention
In view of this, the application provides a kind of control creation method and call method and system, for not affecting under the prerequisite of entire system performance, client machine can be switched arbitrarily between the control of different editions.
To achieve these goals, the existing scheme proposing is as follows:
A kind of control creation method, comprising:
Obtain the version number of control file;
Generate Globally Unique Identifier GUID;
Form key name by control title and described version number and claim ClassID;
Set up the corresponding relation between described GUID and described ClassID;
Unique station location marker using described GUID as control file described in control registration table.
Preferably, described generation Globally Unique Identifier GUID, is specially:
Use Microsoft's general-purpose algorithm to generate Globally Unique Identifier GUID.
Preferably, the version number that obtains control file described in is specially:
Record the version number of control file by constant VERSION_INFO.
A kind of control call method, comprising:
Receive the control title of user's input;
The version number of the control filesystem of identification user login;
The key name that described control title and described version number are combined into claims to mate with the ClassID of storage, finds coupling ClassID;
According to the corresponding relation between GUID and ClassID, search the GUID corresponding with described coupling ClassID;
According to the GUID corresponding with coupling ClassID finding, call control file.
A kind of control creates system, comprising:
Version number's acquiring unit, for obtaining the version number of control file;
Identifier generation unit, for generating Globally Unique Identifier GUID;
Key name claims generation unit, claims ClassID, and set up the corresponding relation between described GUID and described ClassID for control title and described version number are combined into key name;
Position determination unit, for the unique station location marker using described GUID as control file described in control registration table.
Preferably, described key name claims generation unit to comprise:
Key name claims component units, claims ClassID for control title and described version number are combined into key name;
Relation is set up unit, for setting up the corresponding relation between described GUID and described ClassID.
Preferably, described identifier generation unit, generating in the process of Globally Unique Identifier GUID, is specially: utilize Microsoft's general-purpose algorithm to generate Globally Unique Identifier GUID.
Preferably, described version number acquiring unit, in the process of version number of obtaining control file, is specially: the version number that records control file by constant VERSION_INFO.
A kind of control calling system, comprising:
Control title receiving element, for receiving the control title of user's input;
Version number's recognition unit, for identifying the version number of control filesystem of user login;
Key name lookup unit, claims to mate with the ClassID of storage for the key name that described control title and described version number are combined into, and finds coupling ClassID;
Identifier acquiring unit, for according to the corresponding relation between GUID and ClassID, searches the GUID corresponding with described coupling ClassID;
Control file call unit, for according to the GUID corresponding with coupling ClassID finding, calls control file.
Preferably, described key name lookup unit comprises:
Key name claims component units, claims ClassID for described control title and described version number are combined into key name;
Key name claims matching unit, claims and the ClassID of storage for the key name being combined into described in mating, and finds coupling ClassID.
Can find out from above-mentioned technical scheme, the disclosed control creation method of the application, by obtaining the version number of control file and generating Globally Unique Identifier, control title and version number are combined into key name and claim ClassID, and set up that key name claims and Globally Unique Identifier between corresponding relation, unique station location marker of control file in finally using Globally Unique Identifier as control registration table, the station location marker of the control of the same title of different editions in registration table made a distinction like this, the station location marker of the control that has solved the different editions of same title in classic method in registration table is the same, and the problem that cannot accurately call causing.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the disclosed a kind of control creation method process flow diagram of the embodiment of the present application;
Fig. 2 is the disclosed a kind of control call method process flow diagram of the embodiment of the present application;
Fig. 3 is that the disclosed a kind of control of the embodiment of the present application creates system construction drawing;
Fig. 4 is that the disclosed key name of the embodiment of the present application claims generation unit structural drawing;
Fig. 5 is the disclosed a kind of control calling system structural drawing of the embodiment of the present application;
Fig. 6 is the disclosed key name lookup of the embodiment of the present application cellular construction figure.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Based on the embodiment in the application, those of ordinary skills are not paying all other embodiment that obtain under creative work prerequisite, all belong to the scope of the application's protection.
Referring to Fig. 1, Fig. 1 is the disclosed a kind of control creation method process flow diagram of the embodiment of the present application.
As shown in Figure 1, the method comprises:
Step 101: the version number that obtains control file;
Particularly, on the machine of client, may need to exist the control file of multiple different editions simultaneously, now need to obtain the version number of current created control file.
Step 102: generate Globally Unique Identifier GUID(Globally Unique IDentifier);
Step 103: form key name by control title and described version number and claim ClassID;
Particularly, we combine the version number of control title and this control, and the two forms a key name and claims ClassID, the control of the different editions of same like this title, and the difference that can claim by key name makes a distinction.
Step 104: set up the corresponding relation between described GUID and described ClassID;
Particularly, we set up man-to-man relation between GUID and ClassID, and each ClassID is corresponding to a unique GUID.
Step 105: the unique station location marker using described GUID as control file described in control registration table.
Particularly, using unique station location marker of GUID some control files in control registration table, can be to memory address that should control file by this GUID.That is, this GUID is claimed as key name, searching its numerical term is memory address, and then calls the control file in this memory address.
The disclosed control creation method of the present embodiment, by obtaining the version number of control file and generating Globally Unique Identifier, control title and version number are combined into key name and claim ClassID, and set up that key name claims and Globally Unique Identifier between corresponding relation, unique station location marker of control file in finally using Globally Unique Identifier as control registration table, the station location marker of the control of the same title of different editions in registration table made a distinction like this, the station location marker of the control that has solved the different editions of same title in classic method in registration table is the same, and the problem that cannot accurately call causing.
It should be noted that, in the time obtaining the version number of control file, we can record by constant VERSION_INFO the version number of control file, for example: VERSION_INFO='V7.6', the version number that represents current control is V7.6.
It should be noted that, in the time generating Globally Unique Identifier GUID, we can use the general-purpose algorithm that Microsoft provides to become Globally Unique Identifier GUID next life, can certainly generate this identifier with other algorithm.
We illustrate the disclosed method of the present embodiment by an example below:
First record the version number of control by constant VERSION_INFO, VERSION_INFO='V7.6'.Generate Globally Unique Identifier GUID according to above-mentioned version number:
{2DAAA8B7-2655-4ADD-9171-96255844B332}。
Then, claim ClassID:YGFmisGrid_V7.6 by control title and version number's composition key name, the title that wherein YGFmisGrid is control, V7.6 represents the version number of this control.Between GUID and ClassID, set up corresponding relation.
Finally, by YGFmisGrid_V7.6 control, the station location marker in registration table represents with GUID{2DAAA8B7-2655-4ADD-9171-96255844B332}.
This GUID is claimed as key name, and searching its corresponding numerical term is memory address.
Existing method, process of establishing is as follows:
The key name of control claims that ClassID is YGFmisGrid, claims corresponding GUID to be with key name:
{1989A1B6-3DF2-422B-82D0-44A3858F3FD0}。
Using above-mentioned GUID as YGFmisGrid control the unique station location marker in registration table.Like this, calling name while being called the control of different editions of YGFmisGrid, be merely able to find the up-to-date GUID once registering as { the control of 1989A1B6-3DF2-422B-82D0-44A3858F3FD0}, and cannot call the control of the same name of other version.
Embodiment bis-
Referring to Fig. 2, Fig. 2 is the disclosed a kind of control call method process flow diagram of the embodiment of the present application.
As shown in Figure 2, the method comprises:
Step 201: the control title that receives user's input;
Particularly, user wants to call what control and must input the title of this control.
Step 202: the version number of the control filesystem of identification user login;
Particularly, system identification goes out the version number of the current control filesystem of user's login.
Step 203: the key name that described control title and described version number are combined into claims to mate with the ClassID of storage, finds coupling ClassID;
Particularly, system, according to the version number identifying, combines control title and current version number, then the key name being combined into is claimed to claim ClassID to mate with the key name of storage, searches the ClassID of mutual coupling.
Step 204: according to the corresponding relation between GUID and ClassID, search the GUID corresponding with described coupling ClassID;
Particularly, according to the corresponding relation between the GUID and the ClassID that store in the control of introducing in embodiment mono-, search the GUID corresponding with coupling ClassID in step 203.
Step 205: according to the GUID corresponding with coupling ClassID finding, call control file.
Particularly, according to the GUID in the control registration table finding, searching its numerical term is memory address, calls corresponding control file.
In this enforcement, user only needs input control title, then automatically identified the version number of current version by system, then by backstage, control title and version number are combined, searching corresponding with it key name claims and Globally Unique Identifier GUID, and then in registration table, call corresponding control according to the GUID finding, represent to user.In this process, user is transparent, does not need to do extra action and can find the control file of current version.
Embodiment tri-
Referring to Fig. 3, Fig. 3 is that the disclosed a kind of control of the embodiment of the present application creates system construction drawing.
As shown in Figure 3, this system comprises:
Version number's acquiring unit 31, for obtaining the version number of control file;
Identifier generation unit 32, for generating Globally Unique Identifier GUID;
Key name claims generation unit 33, claims ClassID, and set up the corresponding relation between described GUID and described ClassID for control title and described version number are combined into key name;
Position determination unit 34, for the unique station location marker using described GUID as control file described in control registration table.
The disclosed control of the present embodiment creates system, by obtaining the version number of control file and generating Globally Unique Identifier, control title and version number are combined into key name and claim ClassID, and set up that key name claims and Globally Unique Identifier between corresponding relation, unique station location marker of control file in finally using Globally Unique Identifier as control registration table, the station location marker of the control of the same title of different editions in registration table made a distinction like this, the station location marker of the control that has solved the different editions of same title in classic method in registration table is the same, and the problem that cannot accurately call causing.
It should be noted that, version number's acquiring unit 31, in the process of version number of obtaining control file, is specially the version number that uses constant VERSION_INFO to record control file.
It should be noted that, identifier generation unit 32, generating in the process of Globally Unique Identifier GUID, is specially and utilizes the general-purpose algorithm that Microsoft provides to generate Globally Unique Identifier.
Embodiment tetra-
Referring to Fig. 4, Fig. 4 is that the disclosed key name of the embodiment of the present application claims generation unit structural drawing.
As shown in Figure 4, key name claims generation unit 33 can be further divided into key name to claim component units 331 and relation to set up unit 332, be respectively used to by control title and version number be combined into key name claim ClassID and set up GUID and ClassID between corresponding relation.
Embodiment five
Referring to Fig. 5, Fig. 5 is the disclosed a kind of control calling system structural drawing of the embodiment of the present application.
As shown in Figure 5, this system comprises:
Control title receiving element 51, for receiving the control title of user's input;
Version number's recognition unit 52, for identifying the version number of control filesystem of user login;
Key name lookup unit 53, claims to mate with the ClassID of storage for the key name that described control title and described version number are combined into, and finds coupling ClassID;
Identifier acquiring unit 54, for according to the corresponding relation between GUID and ClassID, searches the GUID corresponding with described coupling ClassID;
Control file call unit 55, for according to the GUID corresponding with coupling ClassID finding, calls control file.
The control calling system of the present embodiment introduction is corresponding with the disclosed control call method of embodiment bis-, the introduction of details reference embodiment bis-.
In this enforcement, user only needs input control title, then automatically identified the version number of current version by system, then by backstage, control title and version number are combined, searching corresponding with it key name claims and Globally Unique Identifier GUID, and then in registration table, call corresponding control according to the GUID finding, represent to user.In this process, user is transparent, does not need to do extra action and can find the control file of current version.
It should be noted that, referring to Fig. 6, Fig. 6 is the disclosed key name lookup of the embodiment of the present application cellular construction figure.Key name lookup unit 53 can also be further divided into key name and claim component units 531 and key name to claim matching unit 532, wherein key name claims component units 531 to be used for that control title and version number are combined into key name and claims ClassID, key name claims matching unit 532 to be used for that the key name that is combined into of coupling claims and the key name stored claims ClassID, and the key name of finding out mutual coupling claims ClassID.
Finally, also it should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment, between each embodiment identical similar part mutually referring to.
To the above-mentioned explanation of the disclosed embodiments, make professional and technical personnel in the field can realize or use the application.To be apparent for those skilled in the art to the multiple modification of these embodiment, General Principle as defined herein can, in the case of not departing from the application's spirit or scope, realize in other embodiments.Therefore, the application will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. a control creation method, is characterized in that, comprising:
Obtain the version number of control file;
Generate Globally Unique Identifier GUID;
Form key name by control title and described version number and claim ClassID;
Set up the corresponding relation between described GUID and described ClassID;
Unique station location marker using described GUID as control file described in control registration table.
2. method according to claim 1, is characterized in that, described generation Globally Unique Identifier GUID, is specially:
Use Microsoft's general-purpose algorithm to generate Globally Unique Identifier GUID.
3. method according to claim 1, is characterized in that, described in obtain control file version number be specially:
Record the version number of control file by constant VERSION_INFO.
4. a control call method, is characterized in that, comprising:
Receive the control title of user's input;
The version number of the control filesystem of identification user login;
The key name that described control title and described version number are combined into claims to mate with the ClassID of storage, finds coupling ClassID;
According to the corresponding relation between GUID and ClassID, search the GUID corresponding with described coupling ClassID;
According to the GUID corresponding with coupling ClassID finding, call control file.
5. control creates a system, it is characterized in that, comprising:
Version number's acquiring unit, for obtaining the version number of control file;
Identifier generation unit, for generating Globally Unique Identifier GUID;
Key name claims generation unit, claims ClassID, and set up the corresponding relation between described GUID and described ClassID for control title and described version number are combined into key name;
Position determination unit, for the unique station location marker using described GUID as control file described in control registration table.
6. system according to claim 5, is characterized in that, described key name claims generation unit to comprise:
Key name claims component units, claims ClassID for control title and described version number are combined into key name;
Relation is set up unit, for setting up the corresponding relation between described GUID and described ClassID.
7. system according to claim 5, is characterized in that, described identifier generation unit, generating in the process of Globally Unique Identifier GUID, is specially: utilize Microsoft's general-purpose algorithm to generate Globally Unique Identifier GUID.
8. system according to claim 5, is characterized in that, described version number acquiring unit, in the process of version number of obtaining control file, is specially: the version number that records control file by constant VERSION_INFO.
9. a control calling system, is characterized in that, comprising:
Control title receiving element, for receiving the control title of user's input;
Version number's recognition unit, for identifying the version number of control filesystem of user login;
Key name lookup unit, claims to mate with the ClassID of storage for the key name that described control title and described version number are combined into, and finds coupling ClassID;
Identifier acquiring unit, for according to the corresponding relation between GUID and ClassID, searches the GUID corresponding with described coupling ClassID;
Control file call unit, for according to the GUID corresponding with coupling ClassID finding, calls control file.
10. system according to claim 9, is characterized in that, described key name lookup unit comprises:
Key name claims component units, claims ClassID for described control title and described version number are combined into key name;
Key name claims matching unit, claims and the ClassID of storage for the key name being combined into described in mating, and finds coupling ClassID.
CN201310737252.8A 2013-12-26 2013-12-26 Control establishing method, control invoking method and control invoking system Pending CN103823671A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310737252.8A CN103823671A (en) 2013-12-26 2013-12-26 Control establishing method, control invoking method and control invoking system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310737252.8A CN103823671A (en) 2013-12-26 2013-12-26 Control establishing method, control invoking method and control invoking system

Publications (1)

Publication Number Publication Date
CN103823671A true CN103823671A (en) 2014-05-28

Family

ID=50758757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310737252.8A Pending CN103823671A (en) 2013-12-26 2013-12-26 Control establishing method, control invoking method and control invoking system

Country Status (1)

Country Link
CN (1) CN103823671A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786565A (en) * 2016-02-24 2016-07-20 锐达互动科技股份有限公司 Method for calling background control program through WEB end
CN108874466A (en) * 2018-06-08 2018-11-23 Oppo(重庆)智能科技有限公司 Control call method, electronic device and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵仁铠等: "客户端注册和使用ActiveX控件", 《电脑开发与应用》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786565A (en) * 2016-02-24 2016-07-20 锐达互动科技股份有限公司 Method for calling background control program through WEB end
CN108874466A (en) * 2018-06-08 2018-11-23 Oppo(重庆)智能科技有限公司 Control call method, electronic device and computer readable storage medium
CN108874466B (en) * 2018-06-08 2021-10-29 Oppo(重庆)智能科技有限公司 Control calling method, electronic device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US20200327145A1 (en) Cooperative naming for configuration items in a distributed configuration management database environment
CN102279749B (en) Method and equipment for merging codes
US9069788B2 (en) Truncating data associated with objects in a multi-tenant database
CN101640613B (en) Method and device for network resource relating management
CN105760184B (en) A kind of method and apparatus of charging assembly
US7606813B1 (en) Model consolidation in a database schema
US20120117067A1 (en) Method and apparatus for providing a range ordered tree structure
US9276820B2 (en) Obtaining and displaying network topology information
CN103699689A (en) Method and device for establishing event repository
US20170154123A1 (en) System and method for processing metadata to determine an object sequence
CN102665231A (en) Method of automatically generating parameter configuration file for LTE (Long Term Evolution) system
CN104679900A (en) Application program searching method and device
CN105843867A (en) Metadata model-based search method and search device based on metadata model
CN105786843A (en) Multi-language implementation method for applications and multi-language information query method and device
CN105373376A (en) Method and apparatus for configuring a software application
CN110266598B (en) Routing information processing method, device, equipment and readable storage medium
CN103823671A (en) Control establishing method, control invoking method and control invoking system
CN114116205A (en) Resource management method and device based on kubernets, storage medium and electronic equipment
US8407255B1 (en) Method and apparatus for exploiting master-detail data relationships to enhance searching operations
US20080133587A1 (en) Extending Existing Data within a Directory Service
CN105978744A (en) Resource allocation method, device and system
CN105138562A (en) Data processing method and device of relational database
CN103955519A (en) Account inquiring and recording system and inquiring and recording method thereof
CN101702180B (en) Method and system for searching associated field value
CN107463618B (en) Index creating method and device

Legal Events

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

Application publication date: 20140528

RJ01 Rejection of invention patent application after publication