I try to implement callback interface with COM techonlogy and have IDL like that:
library LogstreamScannerLib
{
importlib("stdole2.tlb");
[
uuid(8CACF064-EF0E-4496-92D5-F26C64A5858A)
]
dispinterface _IMyClassEvents
{
properties:
methods:
[id(1)] void SomeMethod([in] int data);
};
[
uuid(AFC03FCD-01A9-4F38-994F-BA98E57FF64E)
]
coclass MyComClass
{
[default] interface IMyClass;
[default, source] dispinterface _IMyClassEvents;
};
};
Please note, IMyClass has SomeMethod declaration but I can’t figure out why doesn’t it appear in my auto generated classes when I recompile/rebuild project.
It’s always declared as empty:
MIDL_INTERFACE("8CACF064-EF0E-4496-92D5-F26C64A5858A")
_IMyClassEvents : public IDispatch
{
};
What I do wrong here ?
Finally, I have found the issue.
When you use “Implement Connection Point Wizard” you should choose generate connection point from “Type Library” (instead of “IDL”). You see this choice in combobox and should change default option IDL -> Type Lib.