A method for effectively solving the problem of insufficient available memory in the process space of 32-bit programs

By splitting 32-bit applications into multiple submodules and performing window fusion and cross-process communication, the memory shortage of 32-bit programs is solved, achieving more efficient memory usage and smoother user experience.

CN119311439BActive Publication Date: 2025-07-11SICHUAN MEIKANG PHARM SOFTWARE RES & DEV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411567620.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-07-11
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

When 32-bit programs process large amounts of data or perform complex tasks, they often cause slow program operation, data loss, crashes, system page errors and increased system load due to insufficient available memory, which affects user experience and system stability.

Method used

Split 32-bit applications into multiple subfunction modules, develop adapted new programs, and realize window fusion through shared memory areas and window API functions, use socket technology to communicate across processes, and expand the number of processes to break through memory limitations.

Benefits of technology

It completely solves the memory limit problem of 32-bit applications, reduces memory footprint, improves program performance and user experience, maintains interface consistency and consistency, and supports cross-network data exchange and functional collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311439B_ABST
    Figure CN119311439B_ABST
Patent Text Reader

Abstract

The present invention provides a method for effectively solving the problem of insufficient available memory in the process space of 32-bit programs, including the following steps: analyzing the source code of the main program, splitting the functional modules to obtain multiple sub-functional modules; developing a new program adapted to the sub-functional modules, adding a custom message processing function to the sub-programs of the sub-functional modules, unifying the scheduling interfaces of the sub-functional modules, and completing the program encapsulation of the sub-functional modules; creating a shared memory area, and within the shared memory area, fusing the windows of the main program and the sub-programs to obtain a unified interface; performing data interaction between windows and program function scheduling, and developing a fusion program to complete cross-process communication of window messages; wherein, socket technology is introduced for network communication between programs. The present invention can reduce memory occupancy, provide a set of application programs with complete functions, operability, and a complete, continuous, and unified human-computer interaction interface for users, and greatly optimize the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer memory management, and particularly to a method for effectively solving the problem of insufficient available memory in the process space of 32-bit programs. Background Art

[0002] In the Microsoft Windows operating system, due to the limitation of the 32-bit process virtual address space (usually the user-mode address space is 2GB or less), when a 32-bit program needs to process a large amount of data or execute complex tasks, it may encounter the problem of insufficient available memory. When there is insufficient available memory (hereinafter referred to as memory shortage) in the process space of the 32-bit application main program, it will have a great negative impact on both the process itself and the operating system, and may cause various problems, including but not limited to:

[0003] 1. Slow program operation: When the memory is insufficient, the operating system will continuously transfer data from the memory to the virtual memory on the hard disk to free up space. This frequent data exchange will cause the running speed of the program to decrease significantly because the read and write speed of the hard disk is much slower than that of the memory. 2. Program data loss: Because of insufficient memory, some data fails to be correctly written into the memory and is lost, affecting the execution result of the program. 3. Program crash: Insufficient memory causes the program to fail to run properly, and the program may crash and exit abnormally, affecting the stability and reliability of the program. 4. System page faults: When the memory is insufficient, the operating system will perform page swapping frequently, which may lead to an increase in page faults, and also affect the running efficiency of the program. 5. Increased system load: When the memory is insufficient, the system needs to continuously perform memory management and scheduling, which will increase the system load and reduce the response speed and stability of the system. 6. System crash or freeze: The running application main program may suddenly stop working, or the system may freeze completely. This will not only affect the ongoing work, but may also cause user data loss or corruption.

[0004] These problems will directly affect the user experience and work efficiency. Therefore, for 32-bit programs with large memory occupancy, optimizing their memory usage is crucial for ensuring the stable operation of the program and the system and a good user experience. Summary of the Invention

[0005] In order to overcome the deficiencies of the prior art, the purpose of the present invention is to provide a method for effectively solving the problem of insufficient available memory in the process space of 32-bit programs, which effectively breaks through the available memory limitation of the operating system for the virtual address space of 32-bit application programs, can reduce memory occupancy, and provides users with a set of application programs with a complete and operable function and a complete, continuous, and unified human-computer interaction interface, greatly optimizing the user experience.

[0006] To achieve the above object, the present invention provides the following solution: A method for effectively solving the problem of insufficient available memory in the process space of a 32-bit program, comprising the following steps:

[0007] Obtain the application main program, analyze the source code of the application main program to obtain the function modules in the application main program that have memory requirements, and then split the function modules according to the memory requirements to obtain a plurality of sub-function modules and the sub-programs of the sub-function modules;

[0008] Develop new programs adapted to the different sub-function modules, add a custom message processing function to the sub-programs of the sub-function modules, unify the scheduling interfaces of the sub-function modules, and complete the program encapsulation of the sub-function modules;

[0009] Create a shared memory area, and within the shared memory area, use the window API function to fuse the windows of the application main program and the sub-programs to complete the appearance fusion and obtain a unified interface;

[0010] Use the window API function to perform data interaction and program function scheduling between windows to complete cross-process communication of window messages;

[0011] Introduce socket technology for network communication between the application main program, sub-programs and new programs.

[0012] Optionally, obtaining the application main program, analyzing the source code of the application main program to obtain the function modules in the application main program that have memory requirements, and then splitting the function modules according to the memory requirements to obtain a plurality of sub-function modules and the sub-programs of the sub-function modules, includes:

[0013] Obtain the application main program, analyze the source code of the application main program to obtain the function modules in the application main program that have memory requirements;

[0014] Taking 1GB - 1.4GB memory requirement as the standard, split the function modules to obtain a plurality of sub-function modules and the sub-programs of the sub-function modules;

[0015] Analyze all the sub-function modules to determine whether there are sub-function modules with a memory requirement exceeding 2GB. If the determination result is yes, split the sub-function modules with a memory requirement exceeding 2GB into a plurality of low-requirement function modules.

[0016] Optionally, developing new programs adapted to the different sub-function modules, adding a custom message processing function to the sub-programs of the sub-function modules, unifying the scheduling interfaces of the sub-function modules, and completing the program encapsulation of the sub-function modules, includes:

[0017] Develop new programs according to different sub - function modules and low - demand function modules; wherein, the number of the new programs is the sum of the sub - function modules and the low - demand function modules.

[0018] Design scheduling interfaces in the sub - programs of each function module according to the input and output parameters of each function module, and trim the scheduling interfaces to complete the unification of the sub - program scheduling interfaces.

[0019] Introduce custom message - handling functions in the main - window message loop of each sub - program to perform cross - process message - driven functions and complete the encapsulation of all function modules.

[0020] Optionally, create a shared memory area, including:

[0021] Based on the sub - function modules, create a new computer program to obtain a new main program.

[0022] Create blank windows in the new main program and set the blank windows as the parent windows of the sub - programs; wherein, the number of the blank windows is the same as and corresponds one - to - one with the number of sub - windows to be displayed in the sub - programs.

[0023] Optionally, use window API functions to fuse the windows of the application main program and the sub - programs to complete appearance fusion and obtain a unified interface, including:

[0024] When the application main program runs, call the CreateProcess function to start the new main program and the sub - programs using the application main program, and then call the FindWindowEx function to find all the windows of the sub - programs.

[0025] Call the SetParent function to specify the blank window of the new main program as the parent window of the sub - programs.

[0026] Call the SetWindowPos function to adjust the display position and display size of the sub - windows of the sub - programs in the parent window to achieve the fusion and coordinated operation between the sub - windows and the parent window.

[0027] Optionally, use window API functions to perform data interaction and program - function scheduling between windows, and develop a fusion program for sharing and interaction between the sub - programs to complete cross - process communication of window messages, including:

[0028] Define one or more message identifiers for differentiating different message types between the sending process and the receiving process of the program; the message identifiers are custom message identifiers.

[0029] Call the FindWindowEx function to find the window handle of the receiving process. Based on the window handle of the receiving process, the sending process uses the SendMessage or PostMessage function to send a message to the receiving process;

[0030] According to the custom message type, rewrite the window procedure using the receiving window to perform operations corresponding to the custom message;

[0031] The receiving process uses the SendMessage or PostMessage function to return the processing result of the custom message to the target window message queue of the sending process for processing.

[0032] By providing a method to effectively solve the problem of insufficient available memory in the 32-bit program process space, the present invention discloses the following technical effects:

[0033] 1. Thoroughly solve the problem of available memory limitation faced by 32-bit applications: According to the technical solution of the present invention, multi-process design is carried out for the target 32-bit application. Each process can have a maximum of 4GB of process space. By expanding the number of processes, the problem of insufficient available memory of the application can be thoroughly solved.

[0034] 2. Reduce memory occupancy: After splitting the 32-bit application that occupies more memory into multiple sub-programs, the memory occupied by a single program will be significantly reduced. This helps to improve the overall performance of the program and reduce problems such as program crashes caused by insufficient memory. And by creating a shared memory area, multiple processes can access the same memory space to achieve fast data reading and writing and sharing. However, it is necessary to pay attention to synchronization and mutual exclusion issues to avoid data competition and inconsistency.

[0035] 3. Modular development: Through the splitting and encapsulation of the program, complex functions can be divided into independent sub-programs for development. This helps to improve the maintainability and reusability of the code, and reduce development costs and maintenance costs.

[0036] 4. User experience optimization: Use window fusion technology to integrate the windows of multiple processes into the main program interface. The window functions are responsible for their respective processes, and the operating system is responsible for resource scheduling. In this way, not only can the unity and consistency of the user interface be maintained, but also users can get faster operation responses, smoother human-computer interactions, and better user operation experiences.

[0037] 5. Socket communication: In more complex scenarios, socket communication technology can be used to achieve network communication between applications. Through sockets, cross-network and cross-platform data exchange and functional collaboration can be achieved.

[0038] The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Description of the Drawings

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings can be obtained based on these drawings without creative efforts.

[0040] Figure 1 It is a schematic flowchart of the method provided for the embodiment of the present invention. Detailed Embodiments

[0041] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0042] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] In the Microsoft Windows operating system, all system resources are allocated for processes. The operating system will allocate an independent 4GB virtual address space for each 32-bit application process. Among them, approximately 2GB (or less) is the user-mode address space, and all the user's application code and running data share this 2GB address space. If there is a 32-bit application A (abbreviated as Program A) that needs to store more than 2GB (such as 6GB) of data in the process space during operation, then the process will encounter the problem of insufficient available memory in the process space. At this time, Program A may experience problems such as abnormal program functions, loss of program data, or program crashes during operation. In severe cases, it may even affect the stable operation of the operating system itself. Generally speaking, all 32-bit application programs running in the Microsoft Windows operating system environment cannot break through the limit of the maximum 4GB process space of a single process, which is determined by the design and implementation of the operating system itself.

[0044] The present invention can solve the practical problem of insufficient available memory in the process space when a 32-bit application stores and uses more than 2GB of data under the limitation of a maximum 4GB process space for a single process. Taking the aforementioned Program A as an example, assuming its memory requirement during operation is 6GB, the technical solution described in this application is applied to it as follows

[0045] As Figure 1 shown, the present invention provides a method for effectively solving the problem of insufficient available memory in the process space of a 32-bit program, so as to solve the practical problem of insufficient available memory in the process space when a 32-bit application stores and uses more than 2GB of data under the limitation of a maximum 4GB process space for a single process. Taking the aforementioned Program A as an example, assuming its memory requirement during operation is 6GB. The present invention includes the following steps:

[0046] 1. Program splitting

[0047] Obtain the application main program, analyze the source code of the application main program to obtain the functional modules in the application main program that have memory requirements, and then split the functional modules according to the memory requirements to obtain multiple sub-functional modules and the sub-programs of the sub-functional modules.

[0048] A computer program is essentially composed of one source code statement after another. From the perspective of the source code structure of a computer program, multiple source code statements form a functional module, and multiple functional modules form a computer program. Therefore, a conclusion can be drawn: a complete computer program can definitely be split into multiple functional modules at the source code level. This conclusion provides the most fundamental technical theoretical support for the technical solution described in this application. The technical solution described in this application is mainly to solve the problem of insufficient memory in the process space. Therefore, in the current step, the aforementioned Program A will be split and encapsulated according to the measurement standard of memory requirement.

[0049] Program splitting: We first need to analyze the source code of Program A, focus on the functional modules in the program that have memory requirements, and then split Program A by functional modules according to the memory requirements. During this process, if there is a functional module with a memory requirement exceeding 2GB, then this functional module needs to be analyzed again and split into multiple sub-functional modules with lower memory requirements. Splitting Program A by functional modules according to the memory requirements, the splitting granularity should not be too fine. According to experience, it is recommended to split the functional modules based on a memory requirement standard of 1 - 1.4GB. In this example, assume that Program A is split into 5 functional modules according to the memory requirements, namely M1, M2, M3, M4, and M5, a total of 5 functional modules, and the maximum memory requirement of each single module is within 1.4GB. So far, the splitting work of Program A has been completed.

[0050] 2. Program Encapsulation

[0051] Develop a new program adapted to the sub - function module according to different sub - function modules, add a custom message handling function to the sub - programs of the sub - function module, unify the scheduling interfaces of the sub - function modules, and complete the program encapsulation of the sub - function modules.

[0052] Program Encapsulation: In the above steps, program A has been split into 5 functional modules M1, M2, M3, M4, and M5. Next, perform sub - program encapsulation. Create a new computer program A1 and integrate functional module M1 into program A1; create a new computer program A2 and integrate functional module M2 into program A2, and so on. In this way, the development of programs A1, A2, A3, A4, and A5 is completed. During this process, it is necessary to carefully sort out the input and output parameters of each functional module, then implement the scheduling interface of the module function in the sub - program that integrates the functional module, and finally add a custom message handling function to the main window message loop of the sub - program to achieve the purpose of driving the functional module using cross - process messages. According to practical experience, it is recommended to trim the scheduling interface of the functional module during the process of encapsulating the functional module into a sub - program to unify the scheduling interfaces of the sub - programs as much as possible and reduce the program complexity. Thus, the work of unpacking and encapsulating program A into 5 sub - programs A1, A2, A3, A4, and A5 has been completed.

[0053] The current step is the most critical step in the present invention. In the present invention, a program with a total memory requirement of 6GB is split into 5 sub - programs with a memory requirement of less than 1.4GB each, enabling the application program to finally use 6GB of memory space and successfully solving the problem that the application program with a large memory requirement cannot be normally executed due to the operating system process space limit.

[0054] 3. Window Fusion Technology

[0055] Create a shared memory area, and within the shared memory area, use the window API functions to fuse the windows of the application main program and the sub - programs to complete the appearance fusion and obtain a unified interface.

[0056] By creating a shared memory area, multiple processes can access the same memory space, enabling fast reading and writing and sharing of data. However, it is necessary to pay attention to synchronization and mutual exclusion issues to avoid data competition and inconsistency.

[0057] In the Microsoft Windows operating system, the operating system provides a series of window API functions, which greatly facilitate various operations on program windows. Among the API functions related to the technical solution of this application, the 4 most important functions are:

[0058] 1) CreateProcess function: Creates a new process and its primary thread, and this new process runs the specified executable file.

[0059] 2) FindWindowEx function: Searches for a child window that matches the specified criteria in the list of windows managed by the operating system.

[0060] 3) SetParent function: This function can set the parent window for a certain child window, and at this time the child window will be displayed in the client area of the parent window.

[0061] 4) SetWindowPos function: Using this function, it is possible to display the specified child window at the specified position and size in the parent window.

[0062] By using the above 4 API functions, cross-process window fusion can be achieved: when the user runs the main program, the main program (by calling the CreateProcess function) automatically starts the subprograms, then (by calling the FindWindowEx function) finds all the windows in the subprograms, then (by calling the SetParent function) designates the window in the main program as the parent window of the subprogram windows, and finally (by calling the SetWindowPos function) adjusts parameters such as the display position and size of the subwindows in the parent window, making the fusion effect between the subwindows and the parent window appear more natural and smooth. In this way, the main program and the subprograms run in coordination, and all the windows of the subprograms will be displayed in the corresponding windows of the main program, thus forming a whole visually and providing the user with a continuous and unified interface experience.

[0063] Creating a shared memory area: After the previous step, program A has been split and encapsulated into 5 subprograms, namely A1, A2, A3, A4, and A5. In the current step, first create a new computer program A0 as the new main program after transforming using the technical solution described in this application. Then, according to the number of child windows to be displayed in subprograms A1 - A5, create corresponding blank windows in the new main program A0 as the parent windows of the child windows in subprograms A1 - A5. During the running of program A0, use the above 4 API functions to fuse the windows in the subprograms into the corresponding parent windows in the main program as needed and fill the visible area of the parent windows, making it look like a part of a 32-bit application for the user to view and operate.

[0064] The window fusion technology uses the API functions provided by the operating system to achieve the effect of window fusion, allowing the windows between different programs to form a whole visually through the window fusion technology and providing the user with a continuous and unified interface experience.

[0065] 4. Implementing multi-process communication using window message technology

[0066] Use the window API functions to perform data interaction between windows and program function scheduling, and complete cross-process communication of window messages; among them, socket technology is introduced for network communication between programs.

[0067] The biggest feature of the Microsoft Windows operating system is its graphical operation interface, and its graphical interface is built on the basis of its message processing mechanism. In the Microsoft Windows operating system, the window is the core for the operating system to provide human-computer interaction functions, and the window message is the basis for the window to work properly. Each window has a window procedure to receive the messages passed to the window, and its task is to obtain the messages and then respond to them. The operating system provides a large number of API functions related to windows and window messages. Among the API functions related to the technical solution described in this application, the two most important functions are:

[0068] 1) SendMessage function: Send a message to the specified window and wait for the message to be processed.

[0069] 2) PostMessage function: Post a message to the message queue of the specified window and then return immediately.

[0070] In the previous steps, the windows of the subprograms have been integrated into the parent window of the main program, but this is only an appearance integration. The ownership and function scheduling of each subwindow still belong to the corresponding subprogram. At this time, when there are requirements for data interaction between windows or program function scheduling, etc., it is necessary to use the above two API functions to implement the cross-process communication function. Cross-process communication is an important means to achieve multitask parallel processing, resource sharing and data exchange. Using window messages for cross-process communication is a common inter-process communication method in the Windows operating system. The recommended implementation method in the technical solution described in this application is as follows:

[0071] 1) Define message identifiers: Between the sending and receiving processes, one or more unique message identifiers need to be defined first. These message identifiers are used to distinguish different message types. Usually, these identifiers can be custom integer constants or one of the Windows predefined messages (but for the clarity and security of cross-process communication, it is recommended to use custom message identifiers).

[0072] 2) Find the target window handle: The sending process needs to know the handle of the receiving process window in order to send the message to it. This is usually achieved by calling the FindWindowEx function. This function allows you to search for the window handle according to the window class name or title.

[0073] 3) Sending Messages: Once the handle of the receiving window is obtained, the sending process can use the SendMessage or PostMessage function to send messages. The SendMessage function immediately sends the message to the target window and waits for the window to process the message before returning. The PostMessage function, on the other hand, simply places the message in the message queue of the target window and then returns immediately without waiting for the message to be processed.

[0074] 4) Processing Messages: The receiving process needs to rewrite its window procedure (WindowProcedure) to perform corresponding operations when receiving custom messages. The window procedure is a callback function that receives the message as input and executes the corresponding processing logic based on the message type.

[0075] 5) Returning Results: When the receiving process needs to return the result of processing the custom message to the sending process, it can also use the SendMessage or PostMessage function to send the custom message to the message queue of the target window of the sending process, and then the window procedure of the sending process is responsible for receiving and processing it.

[0076] The above steps have split Program A into 5 subprograms A1 - A5, and a new main program A0 has been specifically written to integrate the windows of the subprograms. By applying the cross - process communication scheme recommended in the current steps, two - way interaction between the main program A0 and the subprograms A1 - A5, as well as two - way interaction between the subprograms A1 - A5 with each other, can be completed.

[0077] Cross - process communication is an essential part between the operating system and applications, as well as between applications. Cross - process communication is an important means to achieve multi - task parallel processing, resource sharing, and data exchange. Using window messages for cross - process communication is a common inter - process communication method in the Windows operating system. This communication method is simple, efficient, and applicable to most situations.

[0078] 5. Socket Communication

[0079] In more complex scenarios, socket communication technology can be used to achieve network communication between applications (between the application main program, subprograms, and the new main program). Through sockets, cross - network and cross - platform data exchange and functional collaboration can be achieved.

[0080] Therefore, by providing a method to effectively solve the shortage of available memory in the process space of 32-bit programs, the present invention effectively breaks through the available memory limit of the virtual address space of 32-bit applications by the operating system, can reduce memory occupancy, and provides users with a set of application programs with complete functions, operability, and a complete, continuous, and unified human-computer interaction interface, greatly optimizing the user experience.

[0081] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other.

[0082] Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for effectively solving the problem of insufficient available memory in the process space of 32-bit programs, characterized in that, Including the following steps: Obtain the application main program, analyze the source code of the application main program to obtain the function modules in the application main program that have memory requirements, and then split the function modules according to the memory requirements to obtain multiple sub-function modules and the sub-programs of the sub-function modules; Develop new programs adapted to the different sub-function modules, add a custom message handling function to the sub-programs of the sub-function modules, unify the scheduling interfaces of the sub-function modules, and complete the program encapsulation of the sub-function modules; Create a shared memory area, and within the shared memory area, use the window API function to fuse the windows of the application main program and the sub-programs to complete the appearance fusion and obtain a unified interface; Use the window API function to perform data interaction and program function scheduling between windows to complete cross-process communication of window messages; Introduce socket technology for network communication between the application main program, sub-programs, and new programs.

2. A method for effectively solving the problem of insufficient available memory in the process space of 32-bit programs according to claim 1, characterized in that, Obtain the application main program, analyze the source code of the application main program to obtain the function modules in the application main program that have memory requirements, and then split the function modules according to the memory requirements to obtain multiple sub-function modules and the sub-programs of the sub-function modules, including: Obtain the application main program, analyze the source code of the application main program to obtain the function modules in the application main program that have memory requirements; Taking 1GB - 1.4GB memory requirement as the standard, split the function modules to obtain multiple sub-function modules and the sub-programs of the sub-function modules; Analyze all the sub-function modules to determine whether there are sub-function modules with a memory requirement exceeding 2GB. If the judgment result is yes, split the sub-function modules with a memory requirement exceeding 2GB into multiple low-requirement function modules.

3. A method for effectively solving the shortage of available memory in the process space of 32-bit programs according to claim 2, characterized in that, Develop new programs adapted to the different sub-function modules, add a custom message handling function to the sub-programs of the sub-function modules, unify the scheduling interfaces of the sub-function modules, and complete the program encapsulation of the sub-function modules, including: Develop new programs according to the different sub-function modules and the low-requirement function modules; where the number of the new programs is the sum of the sub-function modules and the low-requirement function modules; Design scheduling interfaces in the sub-programs of each function module according to the input and output parameters of each function module, and modify the scheduling interfaces to complete the unification of the sub-program scheduling interfaces; Introduce a custom message handling function in the main window message loop of each sub-program to perform cross-process message-driven functions and complete the encapsulation of all function modules.

4. A method for effectively solving the shortage of available memory in the process space of 32-bit programs according to claim 3, characterized in that, Create a shared memory area, including: Based on the sub-function modules, create a new computer program to obtain a new main program; Create blank windows in the new main program and set the blank windows as the parent windows of the sub-programs; where the number of the blank windows is the same as and corresponds one-to-one with the number of sub-windows to be displayed in the sub-programs.

5. A method for effectively solving the shortage of available memory in the process space of a 32-bit program according to claim 4, characterized in that, Using the window API functions, fuse the windows of the application main program and the subprogram to complete the appearance fusion and obtain a unified interface, including: When the application main program runs, call the CreateProcess function, use the application main program to start the new main program and the subprogram, and then call the FindWindowEx function to find all the windows of the subprogram; Call the SetParent function to specify the blank window of the new main program as the parent window of the subprogram; Call the SetWindowPos function to adjust the display position and display size of the sub-windows of the subprogram in the parent window, and realize the fusion and coordinated operation between the sub-windows and the parent window.

6. A method for effectively solving the shortage of available memory in the process space of a 32-bit program according to claim 5, characterized in that Using the window API functions, perform data interaction and program function scheduling between windows to complete cross-process communication of window messages, including: Define one or more message identifiers for distinguishing different message types between the sending process and the receiving process of the program; the message identifiers are custom message identifiers; Call the FindWindowEx function to find the window handle of the receiving process, and based on the window handle of the receiving process, the sending process uses the SendMessage or PostMessage function to send a message to the receiving process; According to the custom message type, rewrite the window procedure using the window handle of the receiving process to execute the operations corresponding to the custom messages; The receiving process uses the SendMessage or PostMessage function to return the processing result of the custom message to the target window message queue of the sending process for processing.

Citation Information

Patent Citations

  • Progress invoking method of shared windows

    CN101097529A

  • System and method for an extensible 3D interface programming framework

    US20070169066A1