Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of method and corresponding device of the change system theme that overcomes the problems referred to above or address the above problem at least in part are provided.
According to one aspect of the present invention, a kind of method of changing system's theme is provided, comprising: when monitoring when changing the relevant operation of system's theme, be the dynamic link library that sets in advance with original module dynamic replacement for checking theme signature in the system; According to dynamic link library the change system theme bag corresponding with the system theme be set, and change system's theme by loading system theme bag.
Alternatively, relevant with change system theme operation comprises: start the operation for the device of change system theme of installing on the computing machine; Install the operation of the change system theme of carrying out by this; And the operation of the change system theme of carrying out by control panel.
Alternatively, original module for checking theme signature comprises theme signature verification function in the system.
Alternatively, original module for checking theme signature in the system is replaced with the dynamic link library that sets in advance comprise: call the operational process of the process of theme signature verification function at needs, dynamic link library is injected process; In the importing function table of process, search theme signature verification function, and the address that dynamic link library is revised as in theme signature verification function address pointed.
Alternatively, the process that need call theme signature verification function comprises: main frame associated process and/or be used for the process of operation dynamic library file.
Alternatively, this method further comprises step: be pre-created and load self-defining system service, self-defining system service is used for dynamic link library is injected the main frame associated process.
Alternatively, the change system theme bag corresponding with the system theme that arrange according to dynamic link library specifically comprises: the direct corresponding system's theme bag of change and system's theme; Perhaps, carry out the operation of self-defining checking theme signature, when being proved to be successful, system's theme bag that change is corresponding with the system theme.
According to another aspect of the present invention, a kind of device of changing system's theme is provided, comprising: monitoring means is suitable for monitoring the operation relevant with changing system's theme; Replace the unit, be suitable for monitoring when changing the relevant operation of system's theme when monitoring means, with original in verifying that the module dynamic replacement that theme is signed is the dynamic link library that sets in advance in the system; The change unit, be suitable for according to dynamic link library the change system theme bag corresponding with the system theme be set, and change system's theme by loading system theme bag.
Alternatively, the operation relevant with change system theme of monitoring means monitoring comprises: the operation of the device of startup change system theme; Install the operation of the change system theme of carrying out by this; And the operation of the change system theme of carrying out by control panel.
Alternatively, original module for checking theme signature comprises theme signature verification function in the system.
Alternatively, replace the unit and be suitable for: call in the operational process of process of theme signature verification function at needs, dynamic link library is injected process; In the importing function table of process, search theme signature verification function, and the address that dynamic link library is revised as in theme signature verification function address pointed.
Alternatively, the process that need call theme signature verification function comprises: main frame associated process and/or be used for the process of operation dynamic library file.
Alternatively, this device further comprises: loading unit, and be suitable for being pre-created and load self-defining system service, self-defining system service is used for dynamic link library is injected the main frame associated process.
Alternatively, the change unit is suitable for: direct change system's theme bag corresponding with the system theme; Perhaps, carry out the operation of self-defining checking theme signature, when being proved to be successful, system's theme bag that change is corresponding with the system theme.
Method and corresponding device according to change of the present invention system theme, by being the dynamic link library that sets in advance with original module dynamic replacement for checking theme signature in the system, realized changing according to the dynamic link library that sets in advance the purpose of system's theme.Having solved thus in the prior art causes system stability to reduce owing to needing to revise system file, thereby and need to restart computer behind the modification system file and just can come into force and cause operation problem easily inadequately, obtained the beneficial effect that can under the prerequisite of not changing system file, change system's theme.Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Though shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
The embodiment of the invention provides a kind of method and device of changing system's theme, cause system stability to reduce in order to solve in the prior art owing to needing to revise system file, thereby and revise and need to restart computer behind the system file and just can come into force and cause operation problem easily inadequately.
Fig. 1 shows the process flow diagram of the method for the change system theme that the embodiment of the invention provides.As shown in Figure 1, this method originates in step S110, in step S110, when monitoring when changing the relevant operation of system's theme, is the dynamic link library that sets in advance with original module dynamic replacement for checking theme signature in the system.
Wherein, relevant with change system theme operation mainly comprises following operation:
(1) operation of the device of installing on the startup computing machine that is used for change system theme.Wherein, the device that is used for change system theme mainly refers to utilize the software of the method made of change provided by the invention system theme, therefore, when the user uses this software for the first time, needs the operation among the execution in step S110.
(2) by this operation for the performed change system theme of the device of change system theme.That is to say, when the user changes system's theme by above-mentioned software, need the operation among the execution in step S110.
(3) operation of the change system theme of carrying out by control panel.Wherein, the operation of the change system theme of carrying out by control panel refers to that mainly the user changes system's theme by the mode of routine, at this moment, also needs the operation among the execution in step S110.
In order to monitor above-mentioned operation, can the hook function be set at the corresponding run time version of aforesaid operations place, namely monitor by the hook technology.
After arbitrary operation in monitoring aforesaid operations, be the dynamic link library that sets in advance with original module dynamic replacement for checking theme signature in the system.
Wherein, original module for checking theme signature mainly comprises theme signature verification function in the system.For example, under XP operating system, corresponding theme signature verification function is the CheckThemeSignature function, and the main effect of this function is to realize the signature verification to the corresponding system of system's theme theme bag.What will illustrate here a bit is, generally, content in system's theme is to store by system's theme bag of correspondence, therefore, when change system theme, at first system's theme bag of correspondence to be changed, could change system's theme based on the system's theme bag after the change then, so the CheckThemeSignature function is mainly by the checking of checking theme signature realization to the corresponding system of system's theme theme bag.
Correspondingly, when the module that is used for checking theme signature is the theme the signature verification function, can finish the replacement to theme signature verification function in the following way: call in the operational process of process of theme signature verification function at needs, dynamic link library is injected process; In the importing function table of process, search this theme signature verification function, and the address that dynamic link library is revised as in this theme signature verification function address pointed.
Before introducing the detail of above-mentioned substitute mode, introduce the process that to call theme signature verification function earlier.These processes mainly comprise: main frame associated process and/or be used for the process of operation dynamic library file.Wherein, the main frame associated process for example can be the svchost.exe process, and this process is a general main frame process, and its a main effect is each service in the operational system.The process that is used for the operation dynamic library file mainly comprises the process of the dll file of carrying out 32, process such as rundll32 or rundll32.exe for example, and these processes are mainly used in moving dll file in internal memory.Generally, all will use the svchost.exe process in the time of system boot and operation service the time, the svchost.exe process is the host's process of serving of every system service, its process parameter Wei “ – netsvcs "; And in the time of system operation dynamic library file, just need use rundll32 or rundll32.exe process.
Introducing CheckThemeSignature function dynamic replacement below in conjunction with the above-mentioned operation relevant with change system theme is the detail of the dynamic link library that sets in advance:
1, plants operation with (1), namely " start the operation of the device of installing on the computing machine that is used for change system theme " and be example, when the user start install on the computing machine be used for the device of change system theme the time, the svchost.exe process can be called the signature that the CheckThemeSignature function is verified corresponding system's theme bag.If the verification passes, then the svchost.exe process can be served Themes by further calling system, is carried out the operation of replacing system theme by system service Themes.Change in the process of system's theme at system service Themes, this service will be called the CheckThemeSignature function equally and be come system's theme bag is verified, only verify by the time just can carry out the operation of replacing system theme.
Except in (1) above-mentioned kind operation, can serving the Themes by calling system, when system starts at every turn (when the user starts shooting), also can be by svchost.exe process transfer system service Themes, and, system service Themes can start and verify the signature of current theme early than explorer.exe, if authentication failed then can show system's theme of the win2k style of acquiescence.This shows, start the device that is used for change system theme that computing machine installs and the process that the user starts shooting for the first time for the first time the user, all can use system service Themes, and this service also can be called the CheckThemeSignature function.
Therefore, in order to change system's theme according to self-defining mode, can further include step before step S110: be pre-created and load self-defining system service, this self-defining system service is used for dynamic link library is injected main frame associated process (being the svchost.exe process).That is to say, in method provided by the invention, can also be pre-created a self-defining system service, this self-defining system service not only can be changed system's theme according to self-defining mode among the present invention, thereby the system service Themes that has with this self-defining system service alternative system itself, reach the purpose of walking around the CheckThemeSignature function, but also dynamic link library can be injected in the svchost.exe process.For the system service Themes that can enough this self-defining system service alternative systems itself has, self-defining system service was started before system service Themes, thereby reach the purpose that need not to change by the checking of CheckThemeSignature function system's theme.For this reason, at first self-defining system service to be write in the registration table and system service Themes position on the same group, secondly, also to name self-defining system service, preferably make the initial of title of self-defining system service more forward than the position of initial " T " in alphabet of system service Themes, for example with beginning of letter such as " B ", thereby self-defining system service can be started early than the system service Themes that system itself has.In order the dynamic link library that sets in advance to be injected in the svchost.exe process, can arrange this self-defining system service, when its entrance function is called, can search the importing function table of current process (being svchost.exe), and in importing function table, write the address of this dynamic link library, thereby realize this dynamic link library is injected the purpose of svchost.exe process.
By top step this dynamic link library is injected into after the svchost.exe process, also need in the importing function table of svchost.exe process, search this theme signature verification function (being the CheckThemeSignature function), and the address that this dynamic link library is revised as in this theme signature verification function address pointed, thereby realize original module for checking theme signature in the system is replaced with the operation of the dynamic link library that sets in advance.
2, plant operation with (2), namely " by this operation for the performed change system theme of the device of change system theme " is example, when the user carried out the operation of change system theme by this device that is used for change system theme, this installed corresponding software and will start the rundll32.exe process and open [display properties] dialog box.In the prior art, the rundll32.exe process can be called the signature that the CheckThemeSignature function is verified corresponding system's theme bag.For fear of the signature verification operations to system's theme bag, need among the present invention in the rundll32.exe process, to inject the dynamic link library that sets in advance, and in the importing function table of rundll32.exe process, search the CheckThemeSignature function, and the address of being revised as this dynamic link library that sets in advance, the address that the CheckThemeSignature function is pointed, thereby realize original module for checking theme signature in the system is replaced with the operation of the dynamic link library that sets in advance.
3, plant operation with (3), namely " operation of the change system theme of carrying out by control panel " be example, and when the user changed system's theme by " demonstration " dialog box in [control panel], the rundll32.exe process can be activated equally.Therefore, also need in the rundll32.exe process, to inject the dynamic link library that sets in advance, and in the importing function table of rundll32.exe process, search the CheckThemeSignature function, and the address of being revised as this dynamic link library that sets in advance, the address that the CheckThemeSignature function is pointed.
Just realized that by the mode of introducing above with original module dynamic replacement for checking theme signature in the system be the dynamic link library that sets in advance.Next, in step S120, according to this dynamic link library the change system theme bag corresponding with the system theme be set, and change system's theme by loading corresponding system theme bag.
Wherein, the set-up mode of dynamic link library can comprise multiple, for example, can dynamic link library be set to need not to verify the theme signature, directly changes the mode of the system theme bag corresponding with the system theme; Can also be set to by dynamic link library: carry out the operation of self-defining checking theme signature, when being proved to be successful, system's theme bag that change is corresponding with the system theme is when authentication failed, the refusal change system theme bag corresponding with the system theme then, and return corresponding prompting.Wherein, the operational example of self-defining checking theme signature is as realizing by the function that self-defining checking theme signature is set in dynamic link library, the user-defined theme of checking signature in this function, thereby certifying signature neatly are to satisfy user's diversified demand.
Changed after the theme bag corresponding with the system theme according to arranging of dynamic link library, loaded corresponding system theme bag and can change system's theme.Wherein, can comprise background screen images, ring sound and/or the corresponding packet of effect sound in system's theme bag.After loading this system's theme bag, the corresponding background screen images of packet, ring sound and/or effect sound will represent by user interface, and this user interface can change according to user's hobby.In addition, after loading system theme bag, block the configuration image of System menu for fear of background screen images wherein, can also further carry out transparent or semitransparent processing and demonstration to the equitant part of configuration image of the background screen images in system's theme bag and menu.
Method by change provided by the invention system theme is changed system's theme, does not need to replace system file, as long as when operation dynamic link library is injected process, and dynamically walks around signature function and gets final product.Avoid thus causing system's problem of unstable because revise system file, and, owing to be that trend injects process when operation, therefore need not to restart computer, make user's experience better.In addition, can also in the dynamic link library that sets in advance, realize self-defining signature verification function, thereby verify more neatly.
Fig. 2 shows the structural drawing of the device 200 of the change system theme that the embodiment of the invention provides.As shown in Figure 2, this device comprises: monitoring means 21, replacement unit 22 and change unit 23.Following mask body is introduced the function of each unit.
The operation that monitoring means 21 monitoring is relevant with the system of change theme.Wherein, relevant with change system theme operation mainly comprises following operation: (1) starts the operation for the device of change system theme of installing on the computing machine.(2) by this operation for the performed change system theme of the device of change system theme.(3) operation of the change system theme of carrying out by control panel.In order to monitor above-mentioned operation, monitoring means 21 can arrange the hook function at the corresponding run time version of aforesaid operations place, namely monitors by the hook technology.
Replacing unit 22 and monitor when changing the relevant operation of system's theme at monitoring means 21, is the dynamic link library that sets in advance with original module dynamic replacement of signing for the checking theme in the system.
Wherein, original module for checking theme signature mainly comprises theme signature verification function in the system.For example, under XP operating system, corresponding theme signature verification function is the CheckThemeSignature function, and the main effect of this function is to realize the signature verification to the corresponding system of system's theme theme bag.Correspondingly, when the module that is used for checking theme signature is the theme the signature verification function, replace unit 22 and can finish replacement to theme signature verification function in the following way: call in the operational process of process of theme signature verification function at needs, dynamic link library is injected process; In the importing function table of process, search this theme signature verification function, and the address that dynamic link library is revised as in this theme signature verification function address pointed.
Wherein, the process that need call theme signature verification function mainly comprises: main frame associated process and/or be used for the process of operation dynamic library file.Wherein, the main frame associated process for example can be the svchost.exe process, and this process is a general main frame process, and its a main effect is each service in the operational system.The process that is used for the operation dynamic library file mainly comprises the process of the dll file of carrying out 32, process such as rundll32 or rundll32.exe for example, and these processes are mainly used in moving dll file in internal memory.Generally, all will use the svchost.exe process in the time of system boot and operation service the time, the svchost.exe process is the host's process of serving of every system service, its process parameter Wei “ – netsvcs "; And in the time of system operation dynamic library file, just need use rundll32 or rundll32.exe process.
Introduce the detail that replacement unit 22 is the dynamic link library that sets in advance with CheckThemeSignature function dynamic replacement below in conjunction with the above-mentioned operation relevant with change system theme:
1, plants operation with (1), namely " start the operation of the device of installing on the computing machine that is used for change system theme " and be example, when the user start install on the computing machine be used for the device of change system theme the time, the svchost.exe process can be called the signature that the CheckThemeSignature function is verified corresponding system's theme bag.If the verification passes, then the svchost.exe process can be served Themes by further calling system, is carried out the operation of replacing system theme by system service Themes.Change in the process of system's theme at system service Themes, this service will be called the CheckThemeSignature function equally and be come system's theme bag is verified, only verify by the time just can carry out the operation of replacing system theme.
Except in (1) above-mentioned kind operation, can serving the Themes by calling system, when system starts at every turn (when the user starts shooting), also can be by svchost.exe process transfer system service Themes, and, system service Themes can start and verify the signature of current theme early than explorer.exe, if authentication failed then can show system's theme of the win2k style of acquiescence.This shows, start the device that is used for change system theme that computing machine installs and the process that the user starts shooting for the first time for the first time the user, all can use system service Themes, and this service also can be called the CheckThemeSignature function.
Therefore, in order to change system's theme according to self-defining mode, this device can further include loading unit 24, be used for being pre-created and loading self-defining system service, this self-defining system service is used for dynamic link library is injected main frame associated process (being the svchost.exe process).That is to say, in device provided by the invention, can also be pre-created a self-defining system service, this self-defining system service not only can be changed system's theme according to self-defining mode among the present invention, thereby the system service Themes that has with this self-defining system service alternative system itself, reach the purpose of walking around the CheckThemeSignature function, but also dynamic link library can be injected in the svchost.exe process.For the system service Themes that can enough this self-defining system service alternative systems itself has, self-defining system service was started before system service Themes, thereby reach the purpose that need not to change by the checking of CheckThemeSignature function system's theme.For this reason, at first self-defining system service to be write in the registration table and system service Themes position on the same group, secondly, also to name self-defining system service, preferably make the initial of title of self-defining system service more forward than the position of initial " T " in alphabet of system service Themes, for example with beginning of letter such as " B ", thereby self-defining system service can be started early than the system service Themes that system itself has.In order the dynamic link library that sets in advance to be injected in the svchost.exe process, can arrange this self-defining system service, when its entrance function is called, can search the importing function table of current process (being svchost.exe), and in importing function table, write the address of this dynamic link library, thereby realize this dynamic link library is injected the purpose of svchost.exe process.
By top mode this dynamic link library is injected into after the svchost.exe process, replace unit 22 and also need in the importing function table of svchost.exe process, search this theme signature verification function (being the CheckThemeSignature function), and the address that this dynamic link library is revised as in this theme signature verification function address pointed, thereby realize original module for checking theme signature in the system is replaced with the operation of the dynamic link library that sets in advance.
2, plant operation with (2), namely " by this operation for the performed change system theme of the device of change system theme " is example, when the user carried out the operation of change system theme by this device that is used for change system theme, this installed corresponding software and will start the rundll32.exe process and open [display properties] dialog box.In the prior art, the rundll32.exe process can be called the signature that the CheckThemeSignature function is verified corresponding system's theme bag.For fear of the signature verification operations to system's theme bag, replace unit 22 and need in the rundll32.exe process, inject the dynamic link library that sets in advance, and in the importing function table of rundll32.exe process, search the CheckThemeSignature function, and the address of being revised as this dynamic link library that sets in advance, the address that the CheckThemeSignature function is pointed, thereby realize original module for checking theme signature in the system is replaced with the operation of the dynamic link library that sets in advance.
3, plant operation with (3), namely " operation of the change system theme of carrying out by control panel " be example, and when the user changed system's theme by " demonstration " dialog box in [control panel], the rundll32.exe process can be activated equally.Therefore, replacing unit 22 also needs to inject the dynamic link library that sets in advance in the rundll32.exe process, and in the importing function table of rundll32.exe process, search the CheckThemeSignature function, and the address of being revised as this dynamic link library that sets in advance, the address that the CheckThemeSignature function is pointed.
Change unit 23 be used for according to dynamic link library the change system theme bag corresponding with the system theme be set, and change system's theme by loading this system's theme bag.Particularly, the system theme bag corresponding with the system theme both directly changed in change unit 23; Also can carry out the operation of self-defining checking theme signature, when being proved to be successful, system's theme bag that change is corresponding with the system theme.
Method and corresponding device according to change of the present invention system theme, by being the dynamic link library that sets in advance with original module dynamic replacement for checking theme signature in the system, realized changing according to the dynamic link library that sets in advance the purpose of system's theme.Having solved thus in the prior art causes system stability to reduce owing to needing to revise system file, thereby and need to restart computer behind the modification system file and just can come into force and cause operation problem easily inadequately, obtained the beneficial effect that can under the prerequisite of not changing system file, change system's theme.
Device described in the embodiment of the invention, wherein, described replacement unit is suitable for: call in the operational process of process of described theme signature verification function at needs, described dynamic link library is injected described process; In the importing function table of described process, search described theme signature verification function, and the address that described dynamic link library is revised as in described theme signature verification function address pointed.
The described device of the embodiment of the invention, wherein, the process that described needs call described theme signature verification function comprises: main frame associated process and/or be used for the process of operation dynamic library file.
The described device of the embodiment of the invention further comprises: loading unit, and be suitable for being pre-created and load self-defining system service, described self-defining system service is used for described dynamic link library is injected described main frame associated process.
The described device of the embodiment of the invention, wherein, described change unit is suitable for: direct change system's theme bag corresponding with the system theme; Perhaps, carry out the operation of self-defining checking theme signature, when being proved to be successful, system's theme bag that change is corresponding with the system theme.
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also at any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice under the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate this embodiment thus clearly into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different with this embodiment the module in the equipment among the embodiment.Can become a module or unit or assembly to the module among the embodiment or unit or combination of components, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless clearly statement in addition, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of features of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
Each parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use microprocessor or digital signal processor (DSP) to realize according to some or all some or repertoire of parts in the device of the embodiment of the invention in practice.The present invention can also be embodied as for part or all equipment or the device program (for example, computer program and computer program) of carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment under the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.Any order is not represented in the use of word first, second and C grade.Can be title with these word explanations.