..
Interoperability (Interoperation in English) is a term used to refer to the practice of interacting with portions of "unmanaged code" in a managed code. In fact, though. NET Framework provides a great number of features, two situations make the necessary interoperability:
For example, an application may need to use Microsoft Excel and a procedure environment, since the library is not written in Excel. NET, you will need to access it, to use the so-called Component Object Model (COM) .
. NET and COM are two quite different execution environments and the only way to share functionality between them is to use the interoperability, also known as Interop.
Before the advent of. NET Framework, COM was the reference framework through which developers interact with Windows operating systems.
One thing the two environments have in common is the fact that to use external libraries must first import them. After you import them you can declare and instantiate objects in those libraries in the same way as objects belonging to the framework itself. And 'possible to import new types from both the code and setting the right references in Visual Studio.
The. NET Framework provides a great support for COM interoperability, including the ability to import type libraries. The mechanism that enables communication between the execution environment. NET and COM component is called a Runtime Callable Wrapper (RCW). This component handles most aspects of communication between the two environments, including event management, and management interfaces.
Unlike. NET components, COM components must be registered before being used. After recording these components need to be imported through Visual Studio or by using Type Library Importer tool. If, for example, we use a particular library or DLL, called utility.dll, we must open the DOS command prompt and register the component by writing and executing the following line
Execute Regsvr32 utility.dll
Let us now see the two ways you can import that DLL. In Viual Studio, within the project in which you want to use it, just click the right mouse button on the References node, choosing Add Reference

In the window that pops open the COM tab, select the registered DLL and click OK

To import the DLL instead of using the tool should run the Type Library Importer Visual Studio Command Prompt

Set the path to the DLL and write the following line
tlbimp utility.dll
| |
ASP Zero (Ebook)
Learning Microsoft ASP and VBScript from scratch. At only 29 €. |
| |
VB.NET (Course)
Make Desktop Applications with Visual Basic.. From 49 €. |
| |
Web Marketing (Course)
Site promotion, search engines and marketing. From 39 €. |