WO2000013085A1 - Interface between a control process and a target process - Google Patents
Interface between a control process and a target process Download PDFInfo
- Publication number
- WO2000013085A1 WO2000013085A1 PCT/US1999/019968 US9919968W WO0013085A1 WO 2000013085 A1 WO2000013085 A1 WO 2000013085A1 US 9919968 W US9919968 W US 9919968W WO 0013085 A1 WO0013085 A1 WO 0013085A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target process
- request
- control process
- target
- shared memory
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
Definitions
- the present invention relates to a method of indirectly accessing and controlling one process from another within a multitasking computer operating system environment.
- each process is assigned a unique process address space, typically, 4-GB.
- Such a process address space contains the executable code and data necessary for the process, that is, the code for the EXE and DLL files and their required data.
- a process also owns certain resources such as files, dynamic memory allocations, and threads.
- pointers when pointers are used to reference memory, the pointer value refers to a memory address in that process's own assigned memory space. It is not possible for one process to create a pointer which references memory assigned to another process.
- control windows messages typically requires that some message argument parameters be in the form of a memory address of a required data structure. As described above, however, memory addresses are only meaningful within a given process. Thus, user text within an edit control of one process is not available to another process.
- a preferred embodiment of the present invention provides a method for interfacing between a control process and a target process in a multitasking computer operating system environment.
- the method includes the steps of : a. establishing a region of shared memory between the control process and the target process; b. generating a request with the control process for a desired operation by the target process and storing arguments and data for the request in the region of shared memory; c. communicating the request for the desired operation to the target process; and d. effecting execution of the desired operation by the target process.
- the method includes: a. establishing a region of shared memory between the control process and the target process; b. hooking an executable link module into an address space of the target process; c.
- the step of receiving may further include retrieving arguments and data for the request from the shared memory.
- the step of sending may further include writing new data from the target process into the shared memory.
- the step of sending may further include retrieving the new data by the control process from the shared memory.
- a preferred embodiment is also directed to an interface system used between a control process and a target process in a multitasking computer operating system environment.
- a system comprises: a. a region of shared memory that is established between the control process and the target process; b. a request generator which generates a request from the control process for a desired operation by the target process and stores arguments and data for the request in the region of shared memory; c. a request communicator which communicates the request for the desired operation to the target process; and d. a request receiver which effects execution by the target process of the desired operation.
- Another preferred embodiment includes an interface system used between a control process and a target process in a multitasking computer operating system environment. Such a system comprises: a.
- a region of shared memory that is established between the control process and the target process; b. an executable link module hooked into an address space of the target process; c. a request generator which generates a request for a desired operation by the target process and stores arguments and data for the request in the shared memory; d. a request communicator which communicates the request for the desired operation to the executable link module; e. receiving the private message in the executable link module; f. means for executing the requested action in the target process; and g. a message acknowledger within the executable link module which sends a message acknowledging receipt and accomplishment of the request by the target process to the control process.
- Fig. 1 illustrates the logical flow associated with a preferred embodiment.
- Fig. 2 illustrates the inter-relationships of various functional blocks within the operating system environment according to a preferred embodiment.
- FIG. 3 illustrates computer process arrangements in which a preferred embodiment may be employed.
- a preferred embodiment of the present invention includes a technique for an originating control process 24 having generally a non-keyboard input 32, to exchange detailed information with and send commands from a command output block 31 to a separate target process 27.
- Such techniques are useful, for instance, where the control process 24 is an automatic speech recognition engine 33 having a speech input 34, and running in a 32-bit operating system environment 21, such as Windows NT ® , and the target process 27 is a non-speech aware application, such as an e-mail program, running separately in the same operating system environment 21.
- a preferred embodiment may be advantageously employed in various operating system environments 21, including, for instance, Windows NT ® , Windows 95 ® , Windows 98 ® , X for Windows, and UNIX.
- a preferred embodiment involves inserting a hook filter function 26 (also known as a callback function) into the target process 27, and creating a pointer 29b from the hook filter function 26 to an executable link module in shared system memory, such as a dynamic linked library (DLL) file 25.
- a hook filter function 26 is a program mechanism which can intercept events in a process message queue 28 such as messages, keystrokes, and mouse actions before they reach the target process 27. To operate between separate processes, the filter function invoked by the hook filter function 26 is placed within a DLL 25. The DLL 25 then allows inter-process communication and control via shared memory within the DLL 25. Thus, the shared memory 25 is common to the operating system 21 and accessible to both the control process 24 via pointer 29a, and the target process 27 via pointer 29b.
- control process 24 may obtain access to information from the target process 27 which is not usually available via inter process communication (IPC), such as user input text in the edit control of a dialog box of a target process 27. It also allows text from the control process 24, e.g.,the text output from an automatic speech recognition program, to be passed, via the shared memory in the DLL 25, to an edit control in the target process 27 which treats the text as if it were provided by the user from a keyboard.
- IPC inter process communication
- Such inter-process text passing to a target process edit control may be considered a short term or an immediately obtainable advantage of a preferred embodiment of the present invention. More prolonged or longer term usefulness may also be realized.
- the hook filter function 26 may be employed for ongoing monitoring of the operation of the target process 27 for the occurrence of target process events which are of interest to the control process 24.
- Such interesting events may include, for example, opening a menu, making a menu selection, or opening a dialog box within the target process 27.
- a preferred embodiment may start with the control process 24 installing a WH_GETMESSAGE hook filter function 26 in the target process 27, step 11 in Fig. 1.
- the hook filter function 26 is installed by calling SetWindoi ⁇ sHookEx as follows:
- HHOOK hhook SetWindowsHookEx(WH_GETMESSAGE, GetMsgProc, hinstDll, TargetThreadName);
- the first parameter, WH_GETMESSAGE indicates the type of hook filter function 26 to install.
- WH_GETMESSAGE is a hook filter function 26 called when the GetMessage or the PeekMessage function is about to return a message to the target process 27.
- the hook filter function 26 will receive a pointer 29b to a message structure within the shared memory of the DLL 25 which contains the actual message.
- the second parameter, GetMsgProc identifies the address of a function in the shared memory of the DLL 25 that the operating system 21 should call whenever a window in the target process 27 is about to process a message in its message queue 28.
- the third parameter, hinstDll identifies the DLL 25 that contains the GetMsgProc function.
- a DLL's hinstDll value identifies the 32-bit virtual memory address where the DLL 25 is mapped into the address space 22 of the control process 24. Since the memory address space of the DLL 25 will be shared by both the control process 24 and the target process 27, it may be considered accessible to each process via a pointer, 29a and 29b respectively.
- the fourth parameter, TargetThreadName identifies the thread to hook in the target process 27. A value of NULL may be passed for the fourth parameter to instruct the operating system 21 to hook all threads in the system.
- the operating system 21 checks whether a WH_GETMESSAGE hook 26 is installed on that thread in the target process 27, and whether the DLL 25 containing the GetMsgProc function is mapped into the address space 23 of the target process 27. If the DLL 25 has not been mapped, the operating system 21 forces the DLL 25 to be mapped into the address space 23 of the target process 27 via pointer 29b and increments a lock count on the mapping of the DLL 25 in the target process 27.
- the operating system 21 looks at the hinstDll of the DLL 25 as it applies to the target process 27 and checks to see whether the hinstDll of the DLL 25 is at the same location as it applies to the control process 24. If the hinstDlls are the same, the memory address of the GetMsgProc function is also the same in the two process address spaces. In such a case, the operating system 21 can simply call the GetMsgProc function in the address space 22 of the control process 24.
- the operating system 21 increments a lock count on the mapping of the DLL 25 in the address space 23 of the target process 27, and also calls the GetMsgProc function in the address space 23 of the target process 27.
- GetMsgProc returns, the operating system 21 decrements a lock count on the mapping of the DLL 25 in the target process 27. Injecting or mapping the DLL 25 containing the hook filter function 26 maps the whole DLL 25 into the target process 27, not just the hook filter function 26. Any and all functions contained in the DLL 25 now exist and can be called from threads running in the context of the target process 27.
- the WH_GETMESSAGE hook 26 is set on the thread that created the window, and then, when the GetMsgProc function is called, call SetWindoz ⁇ Long to subclass the window.
- the subclass procedure must be in the same DLL 25 as the GetMsgProc function.
- the hook filter function 26 examines messages in the message queue 28 coming into the target process 27 for messages from the control process 24. Thereafter, the control process 24, in step 12, may generate a request for action or information from the target process 27 and via the pointer 29a place in the shared memory of the DLL 25 a description of the type of operation requested and any arguments necessary. Then, in step 13, a message is sent from the control process 24 to the target process 27 notifying the hook filter function 26 of the request from the control function 24. This message includes an index pointer, 29b in Fig. 2, to the shared memory location in the DLL 25 where the required information and arguments are available.
- the hook filter function 26 in the target process 27, in step 14, receives the message in the address space 23 of the target process 27, recognizes the message as a command from the control process 24, and uses the index pointer 29 to obtain the necessary information and arguments from the shared memory of the DLL 25, step 15.
- the control process 24 enjoys the same level of access within the target process 27 as does the target process 27 itself.
- the control process 24 may thereafter perform any actions within the target process 27 which the target process 27 itself could do.
- the message may direct the target process 27 to, for example, move the insertion point, or retrieve text or data from an edit control in the target process 27 and, optionally as in step 17, write the data to the shared memory of the DLL 25.
- the control process 24 After the control process 24 has sent its initial message to the hook filter function 26, it waits for notification from the target process 27 that it has accomplished the directed operation.
- This notification may be accomplished in various manners such as by posting a message in the message queue of the control process 24, or by changing the state of an event object which managed by the operating system 21 and monitored by the control process 24. Any text or data from the target process 27 may be posted to the shared memory of the DLL where it may be retrieved by the control process 24, step 19 of Fig. 1. If the control process 24 no longer requires the use of the hook filter function 26, the hook filter function 26 may be removed from the target process 27 by the control process 24. This may be accomplished by use of the UnhookWindoi ⁇ sHookEx function.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP99946701A EP1116111A1 (en) | 1998-09-01 | 1999-08-31 | Interface between a control process and a target process |
CA002342246A CA2342246A1 (en) | 1998-09-01 | 1999-08-31 | Interface between a control process and a target process |
AU59053/99A AU5905399A (en) | 1998-09-01 | 1999-08-31 | Interface between a control process and a target process |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US9876298P | 1998-09-01 | 1998-09-01 | |
US60/098,762 | 1998-09-01 | ||
US10008198P | 1998-09-14 | 1998-09-14 | |
US60/100,081 | 1998-09-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2000013085A1 true WO2000013085A1 (en) | 2000-03-09 |
Family
ID=26795065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US1999/019968 WO2000013085A1 (en) | 1998-09-01 | 1999-08-31 | Interface between a control process and a target process |
Country Status (4)
Country | Link |
---|---|
EP (1) | EP1116111A1 (en) |
AU (1) | AU5905399A (en) |
CA (1) | CA2342246A1 (en) |
WO (1) | WO2000013085A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1372070A1 (en) * | 2001-03-19 | 2003-12-17 | Mitsubishi Denki Kabushiki Kaisha | Vehicle-mounted multimedia device |
US6952722B1 (en) * | 2002-01-22 | 2005-10-04 | Cisco Technology, Inc. | Method and system using peer mapping system call to map changes in shared memory to all users of the shared memory |
CN103064749A (en) * | 2013-01-09 | 2013-04-24 | 上海斐讯数据通信技术有限公司 | Inter-process communication method |
US10929573B2 (en) * | 2017-03-21 | 2021-02-23 | The Boeing Company | Systems and methods for designing and modeling products in a cloud environment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0647902A1 (en) * | 1993-10-12 | 1995-04-12 | International Business Machines Corporation | A data processing system |
-
1999
- 1999-08-31 EP EP99946701A patent/EP1116111A1/en not_active Withdrawn
- 1999-08-31 WO PCT/US1999/019968 patent/WO2000013085A1/en not_active Application Discontinuation
- 1999-08-31 AU AU59053/99A patent/AU5905399A/en not_active Abandoned
- 1999-08-31 CA CA002342246A patent/CA2342246A1/en not_active Abandoned
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0647902A1 (en) * | 1993-10-12 | 1995-04-12 | International Business Machines Corporation | A data processing system |
Non-Patent Citations (2)
Title |
---|
"METHOD FOR IMPLEMENTING DIRECTORY-LIMIT FUNCTIONS IN WINDOWS FILE MANAGER", IBM TECHNICAL DISCLOSURE BULLETIN,US,IBM CORP. NEW YORK, vol. 38, no. 7, July 1995 (1995-07-01), pages 9-10, XP000521585, ISSN: 0018-8689 * |
JORDAN D: "INSTANTIATION OF C++ OBJECTS IN SHARED MEMORY", JOURNAL OF OBJECT-ORIENTED PROGRAMMING,US,NEW YORK, NY, vol. 4, no. 1, March 1991 (1991-03-01), pages 21-24,26-28, XP000501371 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1372070A1 (en) * | 2001-03-19 | 2003-12-17 | Mitsubishi Denki Kabushiki Kaisha | Vehicle-mounted multimedia device |
EP1372070A4 (en) * | 2001-03-19 | 2007-04-04 | Mitsubishi Electric Corp | Vehicle-mounted multimedia device |
US7231642B2 (en) | 2001-03-19 | 2007-06-12 | Mitsubishi Denki Kasbushiki Kaisha | Vehicle-mounted multimedia device |
US6952722B1 (en) * | 2002-01-22 | 2005-10-04 | Cisco Technology, Inc. | Method and system using peer mapping system call to map changes in shared memory to all users of the shared memory |
CN103064749A (en) * | 2013-01-09 | 2013-04-24 | 上海斐讯数据通信技术有限公司 | Inter-process communication method |
US10929573B2 (en) * | 2017-03-21 | 2021-02-23 | The Boeing Company | Systems and methods for designing and modeling products in a cloud environment |
Also Published As
Publication number | Publication date |
---|---|
CA2342246A1 (en) | 2000-03-09 |
EP1116111A1 (en) | 2001-07-18 |
AU5905399A (en) | 2000-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2915842B2 (en) | System and method for controlling and managing a distributed object server using first class distributed objects | |
US7631300B2 (en) | Providing instrumentation data to an instrumentation data source from within a managed code | |
US5613148A (en) | Method and apparatus for activating and executing remote objects | |
EP1474753B1 (en) | Component model for real time system control | |
US6611878B2 (en) | Method and apparatus for software technology injection for operating systems which assign separate process address spaces | |
US6567861B1 (en) | Method and apparatus for remotely running objects using data streams and/or complex parameters | |
US6529985B1 (en) | Selective interception of system calls | |
US6157960A (en) | Technique for programmatically creating distributed object programs | |
US6226690B1 (en) | Method and apparatus for utilizing proxy objects to communicate with target objects | |
US7840967B1 (en) | Sharing data among isolated applications | |
US7712077B2 (en) | Method and system for instantiating components conforming to the “COM” specification in custom contexts | |
US20040154020A1 (en) | Component oriented and system kernel based process pool/thread pool managing method | |
US20030233634A1 (en) | Open debugging environment | |
JPH07121373A (en) | Data processing system and its operating method | |
WO1995031787A1 (en) | Method and apparatus for handling requests regarding information stored in a file system | |
JPH0283627A (en) | Interpreter | |
US5655154A (en) | Method and system for sharing utilities between operating systems | |
US6513157B1 (en) | System and method for dynamically aggregating objects | |
WO2000013085A1 (en) | Interface between a control process and a target process | |
US8676842B2 (en) | Creating multiple Mbeans from a factory Mbean | |
US5812129A (en) | Method and system for accessing functions of a user interface environment from processes running outside of the user interface environment | |
US7254817B2 (en) | Apparatus and methods for integrating APIs for program execution management | |
EP1041485A1 (en) | Object with polymorphism | |
US7421711B2 (en) | System, method and apparatus for supporting a kernel mode driver | |
WO2000062160A2 (en) | Method and system for dynamic injection of execution logic into a windowed operating system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): AU CA JP |
|
AL | Designated countries for regional patents |
Kind code of ref document: A1 Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
ENP | Entry into the national phase |
Ref document number: 2342246 Country of ref document: CA Ref country code: CA Ref document number: 2342246 Kind code of ref document: A Format of ref document f/p: F |
|
WWE | Wipo information: entry into national phase |
Ref document number: 59053/99 Country of ref document: AU |
|
WWE | Wipo information: entry into national phase |
Ref document number: 1999946701 Country of ref document: EP |
|
WWP | Wipo information: published in national office |
Ref document number: 1999946701 Country of ref document: EP |
|
WWW | Wipo information: withdrawn in national office |
Ref document number: 1999946701 Country of ref document: EP |