Why would QueryInterface() fail when the interface is surely implemented and has built-in marshaller in Windows?

后端 未结 3 1274
予麋鹿
予麋鹿 2021-01-22 08:07

I have the following setup. There\'s a COM server that is installed into COM+ (to run in a separate process) and has this interface definition:

[object, uuid(\"I         


        
3条回答
  •  故里飘歌
    2021-01-22 08:34

    You can either have your IDL import objidl.idl, or define IStream (and ancestors) manually in your own IDL (just be sure to use the standard IID value for it). Then you can use IStream instead of IUnknown as your parameter type and not worry about QueryInterface() anymore.

提交回复
热议问题