Method and device for processing window problem in compatible layer environment, equipment and medium

By setting environment variable data and matching call requests in the compatibility layer environment, window problems are automatically handled, and the problem of high cost and low efficiency of window problems in the compatibility layer environment is solved, and a more efficient processing process is achieved.

CN119292659APending Publication Date: 2025-01-10ZHONGKE FANGDE SOFTWARE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411250070.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the compatibility layer environment, during the processing of window problems, the compilation and installation of modified window code and the installation of compiled code require a lot of time, resulting in high processing costs and low efficiency.

Method used

By setting environment variable data in the shell of the first operating system, including window class name and parameter value, matching the call request of the target application, automatically dealing with window problems, avoiding modification and compilation processes.

Benefits of technology

It reduces the cost of handling window problems in the compatibility layer environment, improves processing efficiency, and avoids the time spent on compiling and installing the modified window code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292659A_ABST
    Figure CN119292659A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a processing method and device for a window problem in a compatible layer environment, equipment and a medium. The method specifically comprises the steps that a window class name corresponding to the window problem is determined; setting environment variable data corresponding to the window class name in a shell of the first operating system; after the executable file of the target application is loaded, obtaining a calling request of the target application for the window processing function; the target application is an application of a second operating system; the window processing function is a function which is provided by compatible layer software and conforms to a second operating system environment; matching a first window class name in the environment variable data with a second window class name in the calling request to obtain a matching result; and if the matching result is that the matching is successful, processing the calling request according to the parameter value of the first window parameter in the environment variable data. According to the embodiment of the invention, the processing cost of the window problem in the compatible layer environment can be reduced, and the processing efficiency of the window problem in the compatible layer environment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of application transplantation technology, and in particular, to a method, device, equipment and medium for processing window problems in a compatible layer environment. Background Art

[0002] Wine (Wine Is Not an Emulator) is a compatibility layer software that can port applications from a second operating system to a first operating system. Since Wine can translate Windows API (Application Program Interface) calls into dynamic POSIX (Portable Operating System Interface) calls, it can enable Windows applications to run in operating systems other than Windows.

[0003] The compatibility layer environment provided by Wine is uncertain about the compatibility of Windows applications. Application adaptation in the compatibility layer environment can be used to discover and solve compatibility issues that may occur when Windows applications are running in the compatibility layer environment, thereby improving the running stability of Windows applications in the compatibility layer environment.

[0004] Window problems are a common compatibility layer problem. Assuming that a window A of Windows application A has a window problem, then in the relevant technology, the process of handling window problems in the compatibility layer environment specifically includes the following steps:

[0005] Step 1, determine the window class name of window A of Windows application A;

[0006] Step 2: Modify the window code of window A according to the window class name;

[0007] Step 3, compile the modified window code to obtain compiled code;

[0008] Step 4. Install the compiled code to the specified directory of the compatibility layer software;

[0009] Step 5, run Windows application A, and determine whether the window problem of window A is solved. If so, end the process; otherwise, return to step 2.

[0010] However, the compilation of the modified window code and the installation of the compiled code both take a lot of time. For example, the compilation of the modified window code may take 15 to 35 minutes. In actual applications, the debugging of a window problem often requires repeated compilation of the modified window code and installation of the compiled code, which greatly increases the processing cost of the window problem in the compatibility layer environment and seriously affects the processing efficiency of the window problem in the compatibility layer environment. Summary of the invention

[0011] The embodiment of the present application provides a method for processing window problems in a compatibility layer environment, which can reduce the processing cost of window problems in the compatibility layer environment and improve the processing efficiency of window problems in the compatibility layer environment.

[0012] Correspondingly, the embodiments of the present application also provide a device for processing window problems in a compatible layer environment, an electronic device and a machine-readable medium to ensure the implementation and application of the above method.

[0013] In order to solve the above problem, an embodiment of the present application discloses a method for processing window problems in a compatibility layer environment, wherein the compatibility layer environment is provided by a compatibility layer software running on a first operating system, and the method comprises:

[0014] Determine the window class name corresponding to the window problem;

[0015] Setting environment variable data corresponding to the window class name in the shell of the first operating system; the environment variable data includes: the first window class name, and the parameter value of the first window parameter;

[0016] After loading the executable file of the target application, obtaining a call request for a window processing function of the target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforms to the environment of the second operating system; the call request includes: a second window class name of the window to be processed;

[0017] Matching the first window class name in the environment variable data with the second window class name in the calling request to obtain a matching result;

[0018] If the matching result is successful, the calling request is processed according to the parameter value of the first window parameter in the environment variable data.

[0019] The embodiment of the present application further discloses a device for processing window problems in a compatibility layer environment, wherein the compatibility layer environment is provided by compatibility layer software running on a first operating system, and the device comprises:

[0020] A class name determination module is used to determine the window class name corresponding to the window problem;

[0021] An environment variable setting module, used to set environment variable data corresponding to the window class name in the shell of the first operating system; the environment variable data includes: the first window class name, and the parameter value of the first window parameter;

[0022] A call request acquisition module is used to acquire a call request for a window processing function of the target application after loading the executable file of the target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforms to the environment of the second operating system; the call request includes: a second window class name of the window to be processed;

[0023] A matching module, used for matching the first window class name in the environment variable data with the second window class name in the calling request to obtain a matching result;

[0024] The calling request processing module is used to process the calling request according to the parameter value of the first window parameter in the environment variable data if the matching result is a successful match.

[0025] Optionally, the first window parameter includes at least one of the following parameters:

[0026] Window creation enable parameters;

[0027] The first window displays the status parameters;

[0028] First window main style parameters; and

[0029] First window extended style parameters.

[0030] Optionally, the window processing function includes: a window creation function, and the first window parameter includes: a window creation enabling parameter;

[0031] The call request processing module includes:

[0032] a non-creation module, configured to not create the to-be-processed window when the parameter value of the window creation enabling parameter indicates that the window creation is prohibited; or

[0033] The window creation module is used to create the to-be-processed window according to the window creation function when the parameter value of the window creation enabling parameter indicates that the window creation is allowed.

[0034] Optionally, the first window parameter further includes: a first window main style parameter; the window creation function includes: a second window main style parameter;

[0035] The window creation module includes:

[0036] A first parameter setting module is used to set the parameter value of the first window main style parameter to the second window main style parameter when the parameter value of the window creation enabling parameter indicates that the window creation is allowed;

[0037] The first window creation module is used to create the window to be processed according to the window creation function.

[0038] Optionally, the first window parameter further includes: a first window extended style parameter; the window creation function includes: a second window extended style parameter;

[0039] The window creation module includes:

[0040] A second parameter setting module is used to set the parameter value of the first window extended style parameter to the second window extended style parameter when the parameter value of the window creation enabling parameter indicates that the window creation is allowed;

[0041] The second window creation module is used to create the window to be processed according to the window creation function.

[0042] Optionally, the window processing function includes: a window display control function, the first window parameter includes: a first window display state parameter; the window display control function includes: a second window display state parameter;

[0043] The call request processing module includes:

[0044] A third parameter setting module, used to set the parameter value of the first window display state parameter to the second window display state parameter;

[0045] The state control module is used to control the display state of the window to be processed according to the window display control function.

[0046] Optionally, the class name determination module includes:

[0047] The log analysis module is used to analyze the logs provided by the compatibility layer software to obtain the window class name corresponding to the window problem.

[0048] Optionally, the environment variable setting module includes:

[0049] A name determination module, used to determine the environment variable name;

[0050] Struct building blocks for building JSON JavaScript Object Notation data structures;

[0051] The setting module is used to set environment variable data in the shell of the first operating system by using the environment variable setting command of the first operating system; the name of the environment variable data is the environment variable name, and the structure of the environment variable data is a JSON data structure.

[0052] The embodiment of the present application further discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the method described in the embodiment of the present application.

[0053] The embodiment of the present application further discloses a machine-readable medium on which executable code is stored. When the executable code is executed, a processor executes the method described in the embodiment of the present application.

[0054] The embodiments of the present application include the following advantages:

[0055] In the technical solution of the embodiment of the present application, environment variable data is set in the shell of the first operating system, wherein the environment variable data may include: the first window class name with window problems, and the parameter value of the first window parameter used to process the window problems. In this way, when the target application issues a call request for the window processing function, the embodiment of the present application can determine whether the window to be processed is the target window with window problems based on the match between the first window class name in the environment variable data and the second window class name in the call request, and if so, process the call request according to the parameter value of the first window parameter in the environment variable data.

[0056] The embodiment of the present application realizes the processing of window problems based on the setting and matching of environment variable data and the automatic use of the parameter value of the first window parameter that matches successfully. Since the processing process of the window problem in the embodiment of the present application does not involve: the compilation of the modified window code and the installation of the compiled code, the embodiment of the present application saves the time consumed by the compilation of the modified window code and the installation of the compiled code. Therefore, the embodiment of the present application can reduce the processing cost of window problems in the compatibility layer environment, and can improve the processing efficiency of window problems in the compatibility layer environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 This is a flowchart of the steps of a method for processing window problems in a compatible layer environment according to an embodiment of the present application;

[0058] Figure 2 This is a flowchart of the steps of a method for processing window problems in a compatible layer environment according to an embodiment of the present application;

[0059] Figure 3 It is a structural schematic diagram of a device for processing window problems in a compatible layer environment according to an embodiment of the present application;

[0060] Figure 4 It is a schematic diagram of the structure of a device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0062] The embodiments of the present application can be applied to the field of application transplantation technology. In the field of application transplantation technology, for example, a compatibility layer software such as Wine can be used to transplant the application program of the second operating system to the first operating system.

[0063] Examples of the first operating system may include: Linux, mac OS (Macintosh Operating System), and BSD (Berkeley Software Distribution), etc. Examples of the second operating system may include: Windows operating system (Windows operating system), etc. It is understood that the embodiments of the present application do not limit the specific first operating system and the second operating system.

[0064] In the embodiment of the present application, the processing of window problems in the compatibility layer environment can not only improve the compatibility between the target application of the second operating system and the first operating system, but also improve the operating stability of the target application of the second operating system in the compatibility layer environment.

[0065] Related technologies usually deal with window problems in a compatibility layer environment based on manual modification of window codes, compilation of the modified window codes, and installation of the compiled codes.

[0066] However, the compilation of the modified window code and the installation of the compiled code both take a lot of time. For example, the compilation of the modified window code may take 15 to 35 minutes. In actual applications, the debugging of a window problem often requires repeated compilation of the modified window code and installation of the compiled code, which greatly increases the processing cost of the window problem in the compatibility layer environment and seriously affects the processing efficiency of the window problem in the compatibility layer environment.

[0067] In view of the technical problems of high processing cost and low processing efficiency of window problems in a compatibility layer environment in the related art, an embodiment of the present application provides a method for processing window problems in a compatibility layer environment, wherein the compatibility layer environment is provided by a compatibility layer software running on a first operating system, and the method specifically comprises the following steps:

[0068] Determine the window class name corresponding to the window problem;

[0069] Setting the environment variable data corresponding to the above window class name in the shell of the first operating system; the above environment variable data includes: the first window class name, and the parameter value of the first window parameter;

[0070] After loading the executable file of the target application, obtaining a call request for a window processing function of the target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforms to the environment of the second operating system; the call request includes: a second window class name of the window to be processed;

[0071] Matching the first window class name in the above environment variable data with the second window class name in the above calling request to obtain a matching result;

[0072] If the matching result is successful, the calling request is processed according to the parameter value of the first window parameter in the environment variable data.

[0073] The embodiment of the present application sets environment variable data in the shell of the first operating system, wherein the environment variable data may include: the first window class name with window problems, and the parameter value of the first window parameter used to process the window problems. In this way, when the target application issues a call request for the window processing function, the embodiment of the present application can determine whether the window to be processed is the target window with window problems based on the match between the first window class name in the environment variable data and the second window class name in the call request, and if so, process the call request according to the parameter value of the first window parameter in the environment variable data.

[0074] The embodiment of the present application realizes the processing of window problems based on the setting and matching of environment variable data and the automatic use of the parameter value of the first window parameter that matches successfully. Since the processing process of the window problem in the embodiment of the present application does not involve: the compilation of the modified window code and the installation of the compiled code, the embodiment of the present application saves the time consumed by the compilation of the modified window code and the installation of the compiled code. Therefore, the embodiment of the present application can reduce the processing cost of window problems in the compatibility layer environment, and can improve the processing efficiency of window problems in the compatibility layer environment.

[0075] Method Example 1

[0076] refer to Figure 1 , shows a schematic flow chart of the steps of a method for processing window problems in a compatibility layer environment according to an embodiment of the present application, wherein the compatibility layer environment is provided by a compatibility layer software running on a first operating system, and the method specifically comprises the following steps:

[0077] Step 101, determine the window class name corresponding to the window problem;

[0078] Step 102: setting environment variable data corresponding to the window class name in the shell of the first operating system; the environment variable data includes: the first window class name, and the parameter value of the first window parameter;

[0079] Step 103: after loading the executable file of the target application, obtaining a call request for a window processing function of the target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforming to the environment of the second operating system; the call request includes: a second window class name of the window to be processed;

[0080] Step 104: Match the first window class name in the environment variable data with the second window class name in the call request to obtain a matching result;

[0081] Step 105: If the matching result is successful, the calling request is processed according to the parameter value of the first window parameter in the environment variable data.

[0082] Figure 1 The method embodiment shown can be used to handle window problems in a compatibility layer environment. After handling the window problems in the compatibility layer environment, not only can the compatibility between the target application of the second operating system and the first operating system be improved, but also the running stability of the target application of the second operating system in the compatibility layer environment can be improved.

[0083] Figure 1 The steps included in the method embodiment shown can be executed by the compatible layer software. It can be understood that the embodiment of the present application is for Figure 1 The specific execution subject of the illustrated method embodiment is not limited.

[0084] In step 101, the window problem may be a window-related problem that exists when an application of the second operating system runs in a compatibility layer environment.

[0085] The embodiments of the present application do not limit specific window problems. For example, the window problem may be a problem related to the visual presentation of the window, which specifically includes: size and position problems, resolution and clarity problems, title and icon problems, or border problems.

[0086] The embodiments of the present application do not limit the specific method for obtaining window problems. For example, a person skilled in the art can adapt the application of the second operating system in a compatibility layer environment, and obtain the window problems existing in the application of the second operating system during the adaptation process. Of course, a window problem collection interface can also be provided on the client, and the window problem collection interface is used to collect window problems existing in the application of the second operating system.

[0087] The process of determining the window class name corresponding to the window problem in the embodiment of the present application specifically includes: analyzing the log provided by the compatibility layer software to obtain the window class name corresponding to the window problem.

[0088] The log of the compatibility layer software will record various log information related to the operation of the application of the second operating system. The above log information may include information on window creation, drawing, event processing, etc.

[0089] For example, the following log channel of the compatibility layer software Wine records window-related information:

[0090] Relay channel: traces all Windows API calls and displays the entry and exit of functions.

[0091] msg (message) channel: records the sending and processing of window messages.

[0092] Window channel: tracks window creation, destruction, and message passing.

[0093] commdlg (common dialog) channel: tracks operations of common dialogs, such as file open / save dialogs

[0094] The process of analyzing the log provided by the compatibility layer software in the embodiment of the present application specifically includes:

[0095] Step A1: Match the occurrence time of the window problem with the timestamp of the log to obtain a target log record corresponding to the window problem; for example, the timestamp range corresponding to the target log record includes the occurrence time of the window problem.

[0096] Step A2: searching the target log for call information related to the window processing function;

[0097] Step A3: Obtain the window class name corresponding to the window problem from the calling information.

[0098] For example, the window processing function includes: the window creation function. Assuming that the function name of the window creation function is: WIN_CreateWindowEx, the function name of the window creation function can be used as a search term to search for call information related to the window processing function from the target log. Then, the window class name can be obtained from the call information related to the window processing function.

[0099] In step 102, the environment variable setting command of the first operating system may be used to set the environment variable data corresponding to the window class name in the shell of the first operating system.

[0100] When the first operating system is a Linux system, the environment variable setting command may be: an Export command, for example, export MY_VAR="hello", which is used to set the value of the environment variable name MY_VAR to "hello".

[0101] In an optional embodiment of the present application, setting the environment variable data corresponding to the above window class name in the shell of the first operating system includes:

[0102] Step B1, determine the environment variable name;

[0103] Step B2: construct a JSON (JavaScript Object Notation) data structure;

[0104] Step B3: using the environment variable setting command of the first operating system to set environment variable data in the shell of the first operating system; the name of the environment variable data is the environment variable name, and the structure of the environment variable data is a JSON data structure.

[0105] The embodiment of the present application can set environment variable data in JSON format in the shell of the first operating system.

[0106] The JSON format can use key-value pairs and lists to represent data. Key-value pairs represent data objects, where the key can be a string and the value can be a string, number, Boolean value, array, object, or null. Lists represent arrays, containing one or more values.

[0107] The JSON format allows nested objects and arrays, so it can represent complex data structures and supports the following data types: strings (enclosed in double quotes), numbers (integers or floating-point numbers), Boolean values ​​(true or false), arrays (enclosed in square brackets), objects (enclosed in curly braces, containing key-value pairs), and null values.

[0108] In a specific implementation, the first window parameter may include at least one of the following parameters:

[0109] Window creation enable parameter; its parameter value can include: true (true) or false (false). True means that window creation is allowed. False means that window creation is prohibited.

[0110] The first window displays state parameters; the meaning of the parameter value may include: minimize the window, maximize the window, etc.

[0111] The first window main style parameter; the main style parameter represented by its parameter value may be different from the default window main style.

[0112] The first window extended style parameter, whose parameter value represents an extended style parameter that may be different from the default window extended style.

[0113] It can be understood that, for each first window parameter, those skilled in the art can set a corresponding parameter value according to the meaning of each parameter value.

[0114] Both main styles and extended styles can represent style attributes of a window.

[0115] Among them, the main style usually defines the basic appearance and behavior characteristics of the window, which includes common properties: such as whether the window has a title bar, whether it is resizable, whether it has a border, etc.

[0116] Extended styles are used to further define specific properties and functions of a window, which usually provide more advanced features or fine-tune the behavior of the window. Examples of extended styles include: layered display effects of windows, etc.

[0117] An example of environment variable data in JSON format is as follows:

[0118] WIN_CONTRL=

[0119] [{CLASSNAME:\\4f01\\4e13\\ca06\40f3,DISABLE_CREATE:true,SHOW_WINDOW_CM D:9},

[0120] {CLASSNAME:\\3e31\\3e53\\3e07\30f3,SET_STYLE:0x80000000,SET_EXSTYLE:0x56000000}]

[0121] The environment variable name of the above-mentioned environment variable data is "WIN_CONTRL", which specifically includes two window class names. Among them, the first window class name is "\\4f01\\4e13\\ca06\40f3", and its first window parameter includes: window creation enable parameter "DISABLE_CREATE" and first window display status parameter "SHOW_WINDOW_CMD". The parameter value of the window creation enable parameter "DISABLE_CREATE" is true. The parameter value of the first window display status parameter "SHOW_WINDOW_CMD" is 9. Those skilled in the art can determine the meaning of the window display status represented by 9 according to actual application requirements. The embodiment of the present application does not limit the specific window display status represented by 9.

[0122] The second window class name is "\\3e31\\3e53\\3e07\30f3", and its first window parameter includes: window creation enable parameter "DISABLE_CREATE", window main style parameter "SET_STYLE" and window extended style parameter "SET_EXSTYLE". The parameter value of the window main style parameter "SET_STYLE" is 0x80000000. The parameter value of the window extended style parameter "SET_EXSTYLE" is 0x56000000. Those skilled in the art can determine the meaning of the window main style parameter represented by 0x80000000 according to actual application requirements, and can also determine the meaning of the window extended style parameter represented by 0x56000000.

[0123] In step 103, the compatibility layer software loads the executable file of the target application to trigger the start of the target application. The executable file may include: a PE (Portable Executable) file, etc.

[0124] In order to provide a second operating system environment, the compatibility layer software will provide a window processing function for the target application to call. In order to perform window processing, the target application will send a call request for the window processing function to the compatibility layer software during the startup process or after the startup is completed.

[0125] Examples of window processing functions may include: a window creation function or a window display control function, etc. Among them, the window creation function is used to create a window. The window display control function is used to control the display state of the created window.

[0126] Step 104 and step 105 may be used to process the call request according to the environment variable data.

[0127] Step 104 and step 105 can process the call request using preset code according to the environment variable data. The preset code can be located before the original code of the window processing function. In this way, after receiving the call request, the window processing function can first execute the preset code. Therefore, the window processing function can include: the preset code in front and the original code in the back.

[0128] Step 104 may first read the environment variable data, and then match the first window class name in the environment variable data with the second window class name in the call request. For example, the getenv (get environment variable) function may be used to read the value of the environment variable WIN_CONTRL. If the read result is empty, it means that the environment variable data is not set, and the original code may be executed; if the read result is not empty, the environment variable data may be parsed.

[0129] The embodiment of the present application can parse the environment variable data in JSON format into the environment variable data in structured format. For example, the embodiment of the present application can parse the aforementioned environment variable data in JSON format into the database structure shown in Table 1. The fields of the above database structure specifically include: window class name, window creation enable parameter, first window display state parameter, first window main style parameter and first window extended style parameter. Among them, the field content of a certain field is null, indicating that the environment variable configuration is not performed on this field.

[0130] Table 1

[0131]

[0132]

[0133] The window creation function may have corresponding call parameters. The second window class name may be one of the call parameters, used to indicate the class name of the window to be processed. The call request may carry the above call parameters.

[0134] By matching the first window class name in the above environment variable data with the second window class name in the above calling request, it can be determined whether the character string corresponding to the first window class name is the same as the character string corresponding to the second window class name. If they are the same, the matching result is a successful match; if they are different, the matching result is a failed match.

[0135] In step 105, if the matching result is successful, the calling request may be processed according to the parameter value of the first window parameter in the environment variable data.

[0136] The embodiment of the present application can provide the following technical solutions for processing the above call request:

[0137] Technical solution 1,

[0138] In technical solution 1, the window processing function specifically includes: a window creation function, and the first window parameter specifically includes: a window creation enabling parameter;

[0139] The process of processing the above-mentioned call request according to the parameter value of the first window parameter in the above-mentioned environment variable data specifically includes:

[0140] If the parameter value of the window creation enabling parameter indicates that window creation is prohibited, the to-be-processed window is not created; or

[0141] In the case where the parameter value of the window creation enabling parameter indicates that window creation is allowed, the to-be-processed window is created according to the window creation function.

[0142] For example, the window creation enable parameter may be DISABLE_CREATE, which indicates whether to forbid the creation of a certain window. When the value is true, the window creation is prohibited. When the value is empty or false, the window is created normally. Normal window creation may be: creating the to-be-processed window according to the window creation function.

[0143] In one implementation, the first window parameter may further include: a first window main style parameter; the window creation function may include: a second window main style parameter;

[0144] Then, in the case where the parameter value of the window creation enabling parameter indicates that the window creation is allowed, the process of creating the above-mentioned window to be processed according to the above-mentioned window creation function specifically includes:

[0145] Step C1: when the parameter value of the window creation enabling parameter indicates that window creation is allowed, setting the parameter value of the first window main style parameter to the second window main style parameter;

[0146] Step C2: Create the above-mentioned window to be processed according to the window creation function.

[0147] In step C1, assuming that the first window main style parameter is SET_STYLE, its function is: when creating a new window, a preset main style can be specified by the first window main style parameter to overwrite the default main style.

[0148] The embodiment of the present application can use the assignment method in programming to set the parameter value of the first window main style parameter to the second window main style parameter. For example, if an object-oriented programming language is used, the assignment can be performed through the object's property setting method; if a functional programming language is used, the assignment can be performed through a specific function call or parameter passing method. It can be understood that the embodiment of the present application does not limit the specific implementation process of setting the parameter value of the first window main style parameter to the second window main style parameter.

[0149] After setting the parameter value of the first window main style parameter to the second window main style parameter, step C2 creates the above-mentioned window to be processed according to the window creation function, so that the window creation function can create a corresponding window according to the parameter value of the first window main style parameter.

[0150] In another implementation, the first window parameter may further include: a first window extended style parameter; the window creation function may include: a second window extended style parameter;

[0151] In the case where the parameter value of the window creation enabling parameter indicates that the window creation is allowed, the process of creating the above-mentioned window to be processed according to the above-mentioned window creation function specifically includes:

[0152] Step D1: when the parameter value of the window creation enabling parameter indicates that window creation is allowed, setting the parameter value of the first window extended style parameter to the second window extended style parameter;

[0153] Step D2: Create the above-mentioned window to be processed according to the window creation function.

[0154] In step D1, assuming that the first window extended style parameter is SET_EXSTYLE, its function is: when creating a new window, a preset extended style can be specified by the first window extended style parameter to overwrite the default extended style.

[0155] The embodiment of the present application can use the assignment method in programming to set the parameter value of the first window extended style parameter to the second window extended style parameter. For example, if an object-oriented programming language is used, the assignment can be performed through the object's property setting method; if a functional programming language is used, the assignment can be performed through a specific function call or parameter passing method. It can be understood that the embodiment of the present application does not limit the specific implementation process of setting the parameter value of the first window extended style parameter to the second window extended style parameter.

[0156] After setting the parameter value of the first window extended style parameter to the second window extended style parameter, step D2 creates the above-mentioned window to be processed according to the window creation function, and the window creation function can create a corresponding window according to the parameter value of the first window extended style parameter.

[0157] Technical solution 2,

[0158] In technical solution 2, the above-mentioned window processing function includes: a window display control function, and the above-mentioned first window parameter specifically includes: a first window display state parameter; the above-mentioned window display control function may include: a second window display state parameter;

[0159] The process of processing the above-mentioned call request according to the parameter value of the first window parameter in the above-mentioned environment variable data specifically includes:

[0160] Step E1, setting the parameter value of the first window display state parameter to the second window display state parameter;

[0161] Step E2: Control the display status of the above-mentioned window to be processed according to the window display control function.

[0162] The window display control function is used to control the display state of the created window. The first window display state parameter may be SHOW_WINDOW_CMD, which is used to specify the display state of the window, such as minimized window, maximized window, etc.

[0163] The embodiment of the present application may adopt an assignment method in programming to set the parameter value of the first window display state parameter to the second window display state parameter.

[0164] After setting the parameter value of the first window display state parameter to the second window display state parameter, step E2 controls the display state of the above-mentioned window to be processed according to the window display control function, so that the window display control function can control the display state of the window to be processed according to the parameter value of the first window display state parameter.

[0165] It is understandable that the above window creation function and window display control function are only examples of window processing functions. In fact, those skilled in the art can also adopt other window processing functions according to actual application requirements. It is understandable that the embodiment of the present application does not limit the specific window processing function.

[0166] It should be noted that, after the above-mentioned call request is processed according to the parameter value of the first window parameter in the above-mentioned environment variable data, the embodiment of the present application can record the window information of the window to be processed by means of logs, functional tests, etc., and judge whether the window problem of the window to be processed has been solved according to the window information of the window to be processed. If the window problem of the window to be processed has been solved, the processing flow of the window problem can be ended. If the window problem of the window to be processed has not been solved, it can return to execute step 102, and step 102 can set the new environment variable data corresponding to the above-mentioned window class name in the shell of the first operating system, so that steps 103 to 105 can be used to process the window problem according to the new environment variable data corresponding to the window class name. It can be understood that steps 102 to 105 can be steps of loop execution, and the condition for the end of the loop can be: the window problem of the window to be processed has been solved.

[0167] It should also be noted that, when the matching result is a matching failure, it can be considered that there is no window problem for the window to be processed, or it can be considered that the window to be processed is not a target window that requires window problem processing. Therefore, the call request for the window to be processed can be processed according to the original processing logic of the window processing function.

[0168] In summary, the method for handling window problems in a compatible layer environment of an embodiment of the present application sets environment variable data in the shell of the first operating system, wherein the environment variable data may include: the first window class name with the window problem, and the parameter value of the first window parameter used to handle the window problem. In this way, when the target application issues a call request for the window processing function, the embodiment of the present application can determine whether the window to be processed is the target window with the window problem based on the match between the first window class name in the environment variable data and the second window class name in the call request, and if so, the call request is processed according to the parameter value of the first window parameter in the environment variable data.

[0169] The embodiment of the present application realizes the processing of window problems based on the setting and matching of environment variable data and the automatic use of the parameter value of the first window parameter that matches successfully. Since the processing process of the window problem in the embodiment of the present application does not involve: the compilation of the modified window code and the installation of the compiled code, the embodiment of the present application saves the time consumed by the compilation of the modified window code and the installation of the compiled code. Therefore, the embodiment of the present application can reduce the processing cost of window problems in the compatibility layer environment, and can improve the processing efficiency of window problems in the compatibility layer environment.

[0170] Method Example 2

[0171] refer to Figure 2 , shows a schematic flow chart of the steps of a method for processing window problems in a compatibility layer environment according to an embodiment of the present application. The compatibility layer environment may be provided by a compatibility layer software running on a first operating system, and the second operating system may be a Windows system. The method may specifically include the following steps:

[0172] Step 201, loading the link library of Windows system;

[0173] Examples of Windows system link libraries may include: NT (new technology) layer dynamic link libraries. The NT layer dynamic link library is a core component that simulates the kernel function of the Windows NT system. Loading the Windows system link library can be used to simulate the environment of the Windows system on the first operating system.

[0174] Step 202: Load the executable file of the target application;

[0175] Step 203: Reading environment variable data from the shell of the first operating system;

[0176] The compatibility layer software can pre-set the environment variable data corresponding to the above window class name in the shell of the first operating system; the above environment variable data includes: the first window class name, and the parameter value of the first window parameter. After loading the executable file of the target application, the compatibility layer software can read the environment variable data into the environment variable space of the Windows system, so that the target application can access these environment variables as in a real Windows system when running.

[0177] Step 204, obtaining a call request for a window processing function from a target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforms to the environment of the second operating system; the call request includes: a second window class name of the window to be processed;

[0178] The compatibility layer software can use the HOOK method to obtain the target application's call request for the window processing function. Alternatively, the compatibility layer software can add a preset code before the original code of the window processing function. The original code corresponds to the original processing logic of the window processing function. The preset code is used to process the call request according to the environment variable data. After receiving the call request, the window processing function can first execute the preset code. Therefore, the window processing function can include: the preset code in front and the original code in the back.

[0179] Step 205: Match the first window class name in the environment variable data with the second window class name in the call request to obtain a matching result;

[0180] Step 205 may be performed by a preset code, or, step 205 may be performed by a hook function. A hook function is a mechanism used in a software system to intercept specific events or system calls. In computer programming, a hook function allows custom processing logic to be inserted when a specific event occurs. The custom processing logic may be used to perform steps 205 and 206.

[0181] Step 206: If the matching result is successful, the calling request is processed according to the parameter value of the first window parameter in the environment variable data.

[0182] Step 207: If the matching result is a match failure, the calling request is processed according to the window processing function.

[0183] Among them, when the window processing function includes: a window creation function, step 206 may specifically include: when the parameter value of the window creation enable parameter indicates that window creation is prohibited, not creating the window to be processed; or, when the parameter value of the window creation enable parameter indicates that window creation is allowed, creating the window to be processed according to the window creation function.

[0184] In one implementation, the first window parameter may further include: a first window main style parameter; the window creation function may include: a second window main style parameter;

[0185] The above process of creating the above-mentioned window to be processed according to the above-mentioned window creation function when the parameter value of the window creation enable parameter indicates that the window creation is allowed specifically includes: when the parameter value of the window creation enable parameter indicates that the window creation is allowed, setting the parameter value of the first window main style parameter to the second window main style parameter; and creating the above-mentioned window to be processed according to the window creation function.

[0186] In another implementation, the first window parameter may further include: a first window extended style parameter; the window creation function may include: a second window extended style parameter;

[0187] The above process of creating the above-mentioned window to be processed according to the above-mentioned window creation function when the parameter value of the window creation enable parameter indicates that the window creation is allowed, specifically includes: when the parameter value of the window creation enable parameter indicates that the window creation is allowed, setting the parameter value of the first window extended style parameter to the second window extended style parameter; creating the above-mentioned window to be processed according to the window creation function.

[0188] In the case where the above-mentioned window processing function includes: a window display control function, the above-mentioned first window parameter specifically includes: a first window display state parameter; the above-mentioned window display control function may include: a second window display state parameter;

[0189] The process of processing the above-mentioned call request according to the parameter value of the first window parameter in the above-mentioned environment variable data specifically includes: setting the parameter value of the first window display state parameter to the second window display state parameter; and controlling the display state of the above-mentioned window to be processed according to the window display control function.

[0190] In actual applications, the compatibility layer software can sequentially obtain the first call request and the second call request sent by the target application, wherein the first call request is for the window creation function, used to create a window; the second call request is for the window display control function, used to control the display state of the created window. The compatibility layer software can also sequentially process the first call request and the second call request to achieve window creation and control of the display state of the created window.

[0191] It should be noted that the compatibility layer software can process the first call request and the second call request corresponding to the first window of the target application before the target application is started. It can also process the first call request and the second call request corresponding to the subsequent window of the target application after the target application is started. It can be understood that the embodiment of the present application does not limit the specific window corresponding to the call request.

[0192] Step 207 can process the call request of the window to be processed according to the original processing logic of the window processing function. For example, the window creation function can create the window to be processed according to the original processing logic and set the main style of the window to be processed as the default main style.

[0193] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0194] Based on the above embodiment, this embodiment further provides a device for processing window problems in a compatibility layer environment, wherein the compatibility layer environment is provided by a compatibility layer software running on a first operating system, Figure 3 As shown in the structural diagram, the device specifically includes: a class name determination module 301, an environment variable setting module 302, a call request acquisition module 303, a matching module 304 and a call request processing module 305.

[0195] Wherein, the class name determination module 301 is used to determine the window class name corresponding to the window problem;

[0196] The environment variable setting module 302 is used to set the environment variable data corresponding to the window class name in the shell of the first operating system; the environment variable data includes: the first window class name, and the parameter value of the first window parameter;

[0197] The calling request acquisition module 303 is used to acquire a calling request of the target application for a window processing function after loading the executable file of the target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforms to the environment of the second operating system; the calling request includes: a second window class name of the window to be processed;

[0198] A matching module 304, used for matching the first window class name in the environment variable data with the second window class name in the call request to obtain a matching result;

[0199] The call request processing module 305 is used to process the call request according to the parameter value of the first window parameter in the environment variable data if the matching result is a successful match.

[0200] Optionally, the first window parameter includes at least one of the following parameters:

[0201] Window creation enable parameters;

[0202] The first window displays the status parameters;

[0203] First window main style parameters; and

[0204] First window extended style parameters.

[0205] Optionally, the window processing function includes: a window creation function, and the first window parameter includes: a window creation enabling parameter;

[0206] The above-mentioned call request processing module includes:

[0207] A non-creation module is used for not creating the above-mentioned to-be-processed window when the parameter value of the window creation enabling parameter indicates that the window creation is prohibited; or

[0208] The window creation module is used to create the above-mentioned to-be-processed window according to the above-mentioned window creation function when the parameter value of the window creation enabling parameter indicates that the window creation is allowed.

[0209] Optionally, the first window parameter further includes: a first window main style parameter; the window creation function includes: a second window main style parameter;

[0210] The above window creation module includes:

[0211] A first parameter setting module is used to set the parameter value of the first window main style parameter to the second window main style parameter when the parameter value of the window creation enabling parameter indicates that the window creation is allowed;

[0212] The first window creation module is used to create the above-mentioned window to be processed according to the window creation function.

[0213] Optionally, the first window parameter further includes: a first window extended style parameter; the window creation function includes: a second window extended style parameter;

[0214] The above window creation module includes:

[0215] A second parameter setting module is used to set the parameter value of the first window extended style parameter to the second window extended style parameter when the parameter value of the window creation enabling parameter indicates that the window creation is allowed;

[0216] The second window creation module is used to create the above-mentioned window to be processed according to the window creation function.

[0217] Optionally, the window processing function includes: a window display control function, the first window parameter includes: a first window display state parameter; the window display control function includes: a second window display state parameter;

[0218] The above-mentioned call request processing module includes:

[0219] A third parameter setting module, used to set the parameter value of the first window display state parameter to the second window display state parameter;

[0220] The state control module is used to control the display state of the above-mentioned window to be processed according to the window display control function.

[0221] Optionally, the class name determination module includes:

[0222] The log analysis module is used to analyze the logs provided by the compatibility layer software to obtain the window class name corresponding to the window problem.

[0223] Optionally, the above environment variable setting module includes:

[0224] A name determination module, used to determine the environment variable name;

[0225] Struct building blocks for building JSON JavaScript Object Notation data structures;

[0226] The setting module is used to set environment variable data in the shell of the first operating system by using the environment variable setting command of the first operating system; the name of the above environment variable data is the environment variable name, and the structure of the above environment variable data is a JSON data structure.

[0227] In summary, in the apparatus for processing window problems under the compatibility layer environment of the embodiment of the present application, the environment variable data is set in the shell of the first operating system, wherein the above environment variable data may include: the first window class name with the window problem, and the parameter value of the first window parameter used to process the window problem. In this way, when the target application issues a call request for the window processing function, the embodiment of the present application can determine whether the window to be processed is the target window with the window problem based on the match between the first window class name in the environment variable data and the second window class name in the call request, and if so, the call request is processed according to the parameter value of the first window parameter in the above environment variable data.

[0228] The embodiment of the present application realizes the processing of window problems based on the setting and matching of environment variable data and the automatic use of the parameter value of the first window parameter that matches successfully. Since the processing process of the window problem in the embodiment of the present application does not involve: the compilation of the modified window code and the installation of the compiled code, the embodiment of the present application saves the time consumed by the compilation of the modified window code and the installation of the compiled code. Therefore, the embodiment of the present application can reduce the processing cost of window problems in the compatibility layer environment, and can improve the processing efficiency of window problems in the compatibility layer environment.

[0229] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0230] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).

[0231] The embodiments of the present disclosure may be implemented as a device that uses any appropriate hardware, firmware, software, or any combination thereof to perform a desired configuration, and the device may include: electronic devices such as terminal devices and servers (clusters). Figure 4 An exemplary apparatus 1100 that can be used to implement various embodiments described in this application is schematically shown.

[0232] For one embodiment, Figure 4 An exemplary apparatus 1100 is shown having one or more processors 1102, a control module (chip set) 1104 coupled to at least one of the (one or more) processors 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.

[0233] The processor 1102 may include one or more single-core or multi-core processors, and the processor 1102 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1100 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present application.

[0234] In some embodiments, the device 1100 may include one or more computer-readable media (e.g., memory 1106 or non-volatile memory / storage device 1108) having instructions 1114 and one or more processors 1102 configured to execute the instructions 1114 in combination with the one or more computer-readable media to implement a module to perform the actions described in the present disclosure.

[0235] For one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1102 and / or any suitable device or component in communication with the control module 1104 .

[0236] The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0237] The memory 1106 may be used, for example, to load and store data and / or instructions 1114 for the device 1100. For one embodiment, the memory 1106 may include any suitable volatile memory, such as a suitable DRAM (Dynamic Random Access Memory). In some embodiments, the memory 1106 may include a double data rate type four synchronous dynamic random access memory.

[0238] For one embodiment, the control module 1104 may include one or more input / output controllers to provide an interface to the non-volatile memory / storage device 1108 and the input / output device(s) 1110 .

[0239] For example, non-volatile memory / storage 1108 may be used to store data and / or instructions 1114. Non-volatile memory / storage 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives, one or more optical disk drives, and / or one or more digital versatile optical disk drives).

[0240] The non-volatile memory / storage device 1108 may include storage resources that are physically part of the device on which the apparatus 1100 is installed, or it may be accessible to the device without being part of the device. For example, the non-volatile memory / storage device 1108 may be accessed via (one or more) input / output devices 1110 over a network.

[0241] The input / output device(s) 1110 may provide an interface for the apparatus 1100 to communicate with any other appropriate device, and the input / output device 1110 may include a communication component, an audio component, a sensor component, etc. The network interface 1112 may provide an interface for the apparatus 1100 to communicate through one or more networks, and the apparatus 1100 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi (Wireless Fidelity), 2G (2nd Generation Wireless Telephone Technology), 3G (3rd Generation Wireless Telephone Technology), 4G (4th Generation Wireless Telephone Technology), 5G (5th Generation Wireless Telephone Technology), etc., or a combination thereof for wireless communication.

[0242] For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers of the control module 1104 to form a system-in-package. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104 to form a system-on-chip.

[0243] In various embodiments, the device 1100 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a touch screen device, a netbook, etc.). In various embodiments, the device 1100 may have more or fewer components and / or a different architecture. For example, in some embodiments, the device 1100 includes one or more cameras, a keyboard, a liquid crystal display screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, a dedicated integrated circuit, and a speaker.

[0244] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or non-volatile memory / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0245] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0246] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0247] The present application embodiment is described with reference to the flowchart and / or block diagram of the method, terminal device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for implementing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0248] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0249] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0250] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0251] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0252] The above describes in detail a method and device for processing window problems in a compatible layer environment, an electronic device and a machine-readable medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application sets. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing window problems in a compatibility layer environment, characterized in that: The compatibility layer environment is provided by compatibility layer software running on the first operating system, and the method comprises: Determine the window class name corresponding to the window problem; Setting environment variable data corresponding to the window class name in the shell of the first operating system; the environment variable data includes: the first window class name, and the parameter value of the first window parameter; After loading the executable file of the target application, obtaining a call request for a window processing function of the target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforms to the environment of the second operating system; the call request includes: a second window class name of the window to be processed; Matching the first window class name in the environment variable data with the second window class name in the calling request to obtain a matching result; If the matching result is successful, the calling request is processed according to the parameter value of the first window parameter in the environment variable data.

2. The method according to claim 1, characterized in that The first window parameter includes at least one of the following parameters: Window creation enable parameters; The first window displays the status parameters; First window main style parameters; and First window extended style parameters.

3. The method according to claim 1, characterized in that The window processing function includes: a window creation function, and the first window parameter includes: a window creation enabling parameter; The processing of the call request according to the parameter value of the first window parameter in the environment variable data includes: If the parameter value of the window creation enabling parameter indicates that window creation is prohibited, the to-be-processed window is not created; or In the case where the parameter value of the window creation enabling parameter indicates that window creation is allowed, the to-be-processed window is created according to the window creation function.

4. The method according to claim 3, characterized in that The first window parameter also includes: a first window main style parameter; the window creation function includes: a second window main style parameter; The step of creating the window to be processed according to the window creation function when the parameter value of the window creation enabling parameter indicates that the window creation is allowed includes: When the parameter value of the window creation enabling parameter indicates that the window creation is allowed, setting the parameter value of the first window main style parameter to the second window main style parameter; The window to be processed is created according to the window creation function.

5. The method according to claim 3, characterized in that: The first window parameter also includes: a first window extended style parameter; the window creation function includes: a second window extended style parameter; The step of creating the window to be processed according to the window creation function when the parameter value of the window creation enabling parameter indicates that the window creation is allowed includes: When the parameter value of the window creation enabling parameter indicates that the window creation is allowed, setting the parameter value of the first window extended style parameter to the second window extended style parameter; The window to be processed is created according to the window creation function.

6. The method according to claim 1, characterized in that The window processing function includes: a window display control function, the first window parameter includes: a first window display state parameter; the window display control function includes: a second window display state parameter; The processing of the call request according to the parameter value of the first window parameter in the environment variable data includes: Setting the parameter value of the first window display state parameter to the second window display state parameter; According to the window display control function, the display state of the window to be processed is controlled.

7. The method according to claim 1, characterized in that The determining of the window class name corresponding to the window problem includes: Analyze the logs provided by the compatibility layer software to obtain the window class name corresponding to the window problem.

8. The method according to any one of claims 1 to 7, characterized in that: The step of setting the environment variable data corresponding to the window class name in the shell of the first operating system includes: Determine the environment variable name; Build JSON JavaScript Object Notation data structures; The environment variable setting command of the first operating system is used to set environment variable data in the shell of the first operating system; the name of the environment variable data is the environment variable name, and the structure of the environment variable data is a JSON data structure.

9. A device for processing window problems in a compatibility layer environment, characterized in that: The compatibility layer environment is provided by compatibility layer software running on the first operating system, and the device includes: A class name determination module is used to determine the window class name corresponding to the window problem; An environment variable setting module, used to set environment variable data corresponding to the window class name in the shell of the first operating system; the environment variable data includes: the first window class name, and the parameter value of the first window parameter; A call request acquisition module is used to acquire a call request for a window processing function of the target application after loading the executable file of the target application; the target application is an application of the second operating system; the window processing function is a function provided by the compatibility layer software and conforms to the environment of the second operating system; the call request includes: a second window class name of the window to be processed; A matching module, used for matching the first window class name in the environment variable data with the second window class name in the calling request to obtain a matching result; The calling request processing module is used to process the calling request according to the parameter value of the first window parameter in the environment variable data if the matching result is a successful match.

10. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the method according to any one of claims 1 to 8.

11. A machine-readable medium having executable codes stored thereon, which, when executed, causes a processor to perform the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Method and device for dragging and dropping file in compatible layer environment, equipment and medium

    CN119718474A