I'm trying to understand the COM server examples of pywin32, and in win32comext/shell/demos/servers/icon_handler.py
I saw the line
_com_interfaces_ = [shell.IID_IExtractIcon, pythoncom.IID_IPersistFile]
While that pretty clearly refers to an IconHandler
having to implement the IExtractIcon
and IPersistFile
interfaces, I cannot find any documentation where _com_interfaces_
is actually used. It is nowhere to be seen in win32com.server.register
or win32com.server.localserver.py
, so neither registration nor the server call seem to actually use this. Is there any documentation on _com_interfaces_
?
_com_interfaces_
is an optional attribute a Server Policy looks for:The list is used to answer
QueryInterface
enqueries, see thewin32com.server.policy
module to see how this is being used, specifically theBasicPolicy._wrap()
andBasicPolicy._QueryInterface_
methods.