What is required to enable marshaling for a COM interface?

后端 未结 3 546
粉色の甜心
粉色の甜心 2021-01-06 13:17

I have a 32-bit ATL COM component without a type library. It has a class factory for one given class that implements several interfaces.

When I use it as an in-proc

3条回答
  •  盖世英雄少女心
    2021-01-06 13:24

    For an COM interface to be marshallable using Microsoft's default marshaller, the interface has to have either the DUAL or the OLEAUTOMATION property defined in its header.

    If there are arguments for the methods defined that are interface pointers, the same requirement extends to those interfaces.

    Plus the interface name must be present in the LIBRARY section of the IDL defining it. This also extends to other referenced interfaces.

    If these conditions are not met, the interface won't be marshallable.

提交回复
热议问题