com - C# coclass - GetTypeInfoCount returns 0 -


i have c# class implements interface defined in separate external tlb file, imported project through interop.

[comvisible(true)] [comdefaultinterface(typeof(iinterfacefromseparatetlb ))] [classinterface(classinterfacetype.autodual)] [guid("4ffbbd0d-6f4b-47d4-b4f9-586f8c108bad")] [idispatchimpl(idispatchimpltype.compatibleimpl)] public class mycoclass : iinterfacefromseparatetlb {} 

when pass instance of mycoclass c++ function takes idispatch argument , call idispatch::gettypeinfocount, 0. why?

calling idispatch::gettypeinfocount forgot check hresult, 0x8002802b (type_e_elementnotfound). put copy of .tlb file beside dll, set "embed interop types" option false, , problem has gone.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -