简体   繁体   中英

IUnknown interface -for COM \COM + objects?

I am bit unclear in using IUnknown interface. Is IUnknown interface only meant to work with COM /COM + Objects and some unmanaged codes like Win APIs?

COM interfaces are used primarily by unmanaged code. If you need the C# you are writing to interoperate with unmanaged code, you can export it as COM interfaces:

COM Interop with C#

IUnknown is generally the base class for COM objects.

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

IUnknown is a COM/COM+ interface. Its not used natively by .NET languages such as C#.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM