The official documentation says they are optional. I know COM interop requires a unique identifier for each interface but every interface example I see has a GUID whether it’s used with COM or not? Is there any benefit to including a GUID if its not going to be used with COM?
The official documentation says they are optional. I know COM interop requires a unique
Share
I’ve noticed that some methods such as
Supports(to determine if a class conforms to a specific interface) require that you define a GUID before you can use them.This page confirms it with the following information:
Here’s some interesting information about interfaces, which states:
Emphasis added in both quotes.
Reading this entire article also makes you realize that
QueryInterface(which requires a GUID) is used behind the scenes for reasons such as reference counting.