I'm writing a plugin implementing a 3rd-party interface in C++. I created an ATL project in MSVS, added an ATL Simple Object, then used the "Implement Interface" shortcut on that class. All of the interface methods got stubbed and it builds. I also added:
[assembly:System::Runtime::InteropServices::ComVisible(true)];
and have these running (successfully) after the build:
regsvr32.exe VWorksCPPATL.dll
regasm /codebase /tlb VWorksCPPATL.dll
However, when I open the DLL in oleview, I don't see any of the interface's methods exposed (aside from IUnknown
) and the DLL doesn't get loaded by the container for the plugin.
When I open a working DLL that I wrote in C#, I see the interfaces that I've implemented and their methods listed under the coclass. (I had set the "register for COM interop" and "make assembly COM-visible" attributes on the project.)
When I open working DLLs that the vendor (creator of plugin container) wrote in C++, I see the exposed methods/interfaces in some, but not all, of the DLLs.
Do I need to manually modify my IDL file to expose these methods? Right now it shows (attributes omitted):
interface IPF400 : IDispatch{}
library VWorksCPPATLIB{
coclass PF400{
[default] interface IPF400;
}
}
...Or am I likely having troubles for other reasons?
IPF400
is there. Your IDLIPF400
is also empty, just what you see in the compiled TLB. – Roman R.IQTAction::Run
in particular. Not sure about automatic generation, but your IDL does have to have these definitions before you build the project. – Roman R.