Wednesday, May 6, 2020

Automation in Windows, Communication between Applications

Automation in Windows is a technology by which an application can communicate with another application, and through communication one application can execute the functions of another application.


To perform such task, one application communicates using the properties and methods of the classes or objects of another application. But both applications are able to communicate only when they expose the properties and methods of their objects.

We know that two people can communicate only if both are exposed to each other and understand each other and if one person's language is capable of understanding to the other person then communication between them is possible. Similarly, It is important to understand that when an application wants to communicate with other application, it is important that the properties and methods of the applications are exposed. Without this, automation between applications is not possible.

There are two types of automation.
  • In-process automation
  • Out-of-process automation

Under the In-process automation, when an application automates another application, the one application allocates memory space to the objects of the another application within its own memory. In this way, the memory of the first application is affected. This is to say that the first application provides memory during automation. The caller application that invokes another application gives its own workspace to the objects of the called application. The process of automating in this way is called in-process automation. Both applications communicate by placing their own objects in the same workspace.

In-process automation occurs, for example, at the operating system level. During communication among different objects of the operating system, they work in the same environment i.e. within the fixed workspace or within a fixed memory. Communication between applications is faster because of common workspace environment.

The automation in which the invoked application objects reside in the memory space of the calling application and doesn't occupy separate workspace is called in-process automation. So, the main point to remember is that common memory is shared between them.

In contrast, when there is communication between two applications in which objects of the applications are in their own separate workspace or memory, then this type of automation is called out-of-process automation.

The automation in which the invoked, called application objects reside in separate memory space from the memory space of the caller application and doesn't occupy workspace of the invoking application is called out-of-process automation. So, main point to remember is that each application has its separate memory space for the objects involved in communication.
Hope you would have understood the difference between them.

No comments:

Post a Comment

Hot Topics