c++ - Creating an ATL COM object that implements a specific interface -


I need to implement a simple ATL COM object that implements a specific interface for which I need the .tlb file and Both have been given. An .idl file interface is very simple and consists of only one method. I have made several ATL items in the past but have never implemented a specific interface. Why do I need to achieve this? I'm assuming that somehow I need to reference the interface IDL or TLB in my new object IDL?

Any sign is welcome.

It is much more automated than the other answers here. All boilerplate codes are written by you for Visual Studio.

You are lucky that you have ADL is, it is by far the most suitable, I think.

You can paste. The contents of the ADL file are currently available on your ATL Com project. Insert into ADL file, which will give you access to announcements about it. For example, something like this can be pasted into an IDL file:

  [object, uuid (ecaac0b8-08e6-45e8-a075-c6349bc2d0ac), dual, dislikes, helpstring ("IJim Interface "), Pointer_default (unique)] Interface IJim: IDIPatch {[ID (1), Haststrings (" method splice mbbrace ")] Hersilt splace migrase (BSRT * Avast); };  

Then in the class view, right-click on your square and click Add | Select this interface to apply .

Note that in this dialog, you can actually see a .tlb file, but I think it would be better to have a plain-text source for these things, version control and so on.

Select IJim from the list, to add it to the list to implement & gt; Press the button.

/ IJim Ways Public: STDMETHOD (SpliceMainbrace) (BSTR * Avast) {// Add your implementation implementation back here E_NOTIMPL; }

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -