IUnknown interface - for COM \ COM + objects?

I do not understand how to use the IUnknown interface. Is the IUnknown interface designed only for working with COM / COM + objects and some unmanaged codes such as the Win API?

+3
source share
3 answers

COM interfaces are mainly used by unmanaged code. If you need C #, which you write to interact with unmanaged code, you can export it as COM interfaces:

COM Interop with C #

IUnknown is usually the base class for COM objects.

+7
source

In the context of C # and .NET, yes. You should use IUnknown for COM only.

+2

IUnknown - COM/COM+. .NET, #.

+2

Source: https://habr.com/ru/post/1719826/


All Articles