4 Mayıs 2020 Pazartesi

Component Object Model - COM

Giriş
COM kullanınca direkt DLL ile linklemek gerekmiyordu. Açıklaması şöyle. Ayrıca ilk başta COM dosyaları registry kullanılarak bulunuyordu.
In the early 1990s Microsoft introduced COM (Component Object Model) which was widely used in various programming environments include Visual Basic 5 & 6. Also known as ActiveX (at least if COM & ActiveX are not the same thing they are often conflated).

COM required adding information in the Windows registry so that a program would be able to find & use code packaged into a DLL. e.g., you write a class and compile it into a DLL. But your program wouldn't link directly with that DLL (as was typical beforehand), instead the DLL would be registered on the computer which meant: references to the DLL would be stored in the Windows registry with a unique ID. Later when a program wanted to use something from that DLL it would look in the registry for the ID and hopefully find the required DLL from there.
Daha sonra sadece registry ile çalışma yöntemi değiştirildi. Açıklaması şöyle.
Note -- later on, in Windows XP IIRC Microsoft provided an additional file-based mechanism to tie together a program and its COM DLL references that did not require the registry at all. So it apparently was not strictly necessary to use the registry-based approach.
COM Nesnesi Yaratmak
Açıklaması şöyle
... there are two ways to create COM objects:

- The module that implements the object might provide a function specifically designed to create instances of that object.
- Alternatively, COM provides a generic creation function named CoCreateInstance.

Hiç yorum yok:

Yorum Gönder