Click here to Skip to main content
15,915,873 members
Home / Discussions / COM
   

COM

 
GeneralLicense Control!!! Pin
akelasher13-Jan-03 11:49
akelasher13-Jan-03 11:49 
GeneralBest method for implementing IEnumXXXX Pin
Heath Stewart12-Jan-03 19:19
protectorHeath Stewart12-Jan-03 19:19 
GeneralDynamic COM Server Use Pin
Anonymous10-Jan-03 12:29
Anonymous10-Jan-03 12:29 
GeneralRe: Dynamic COM Server Use Pin
geo_m10-Jan-03 21:29
geo_m10-Jan-03 21:29 
GeneralRe: Dynamic COM Server Use Pin
Anonymous12-Jan-03 1:42
Anonymous12-Jan-03 1:42 
GeneralRe: Dynamic COM Server Use Pin
geo_m12-Jan-03 3:07
geo_m12-Jan-03 3:07 
GeneralRe: Dynamic COM Server Use Pin
thowra13-Jan-03 13:23
thowra13-Jan-03 13:23 
GeneralRe: Dynamic COM Server Use Pin
geo_m13-Jan-03 21:33
geo_m13-Jan-03 21:33 
Well, so first to your question,
phykell wrote:
Note at this point, I haven't implemented a method GetName() for my plugin which I guess is necessary to over-ride the one provided by my plugin's coclass' default interface "IEffect". Is that right because if so, how come the compiler hasn't generated an error *requiring* me to provide an implementation?
yeah, you need to implement all the methods specified in the interface. That's simply because in interface all methods are virtual with PURE specification. So you are right, compiler should generate an error. If he didn't do so, he probably found some implementation somewhere or it might be, you didn't change the class declaration for deriving the class from the interface.

But we can do it other way. Briefly - you have the tlb definig the interface IEffect and you have some object wanting to implement this interface.

So choose the class view in your devstudio, right click on the class you want to implement the IEffect interface (I guess CEffectMosaic) and select Implement interface (in msvc.net it is Add/Implement interface). Here you have to select the IEffect somehow. I guess the wizard is self explanatory, but if you'll have difficulties, I am mostly allways here.

If gods will be with you and the wizard will not crash, you'll have all done - your class is derived from the IEffect interface, it should be written between BEGIN_COM_MAP and END_COM_MAP and all this work it have to do. You have now only to add the Category stuff.

So let's go on - why the CoCreateInstance returns the class not registered? Hmm, difficult to say - I would check, if you pass correct CLSID to it. Also here I would suggest to use the smart pointers - it will simplify your code and take care about addref/release things. Then the code will looks like somehow like that one:
<br />
CComPtr<IEffect> spEffect;<br />
hr = spEffect.CoCreateInstance( myCLSID );<br />


Then I would try to directly create one specified plugin - spEffect.CoCreateInstance( CLSID_EffectMosaic(?) ) this could help to find the problem...

#import part. well... you included the IEffect from the Effects.h. This is OK, but now imagine, that you have no access to it for any reason, not important now. So instead of
<br />
#include "..\effects\effects.h"<br />


you can use
<br />
#import "effects.tlb" + modifiers


and you'll achieve the same goal - in fact the effects.h and effects_i.c are generated again here (or something very similar). Then the choice is on the developer what he will prefer. The Add Interface wizard uses the #import part.

Hope this helps you a bit more.
GeneralRe: Dynamic COM Server Use Pin
thowra14-Jan-03 8:24
thowra14-Jan-03 8:24 
GeneralCOM Interface Name Clashes Pin
Anonymous10-Jan-03 7:08
Anonymous10-Jan-03 7:08 
GeneralRe: COM Interface Name Clashes Pin
geo_m10-Jan-03 21:51
geo_m10-Jan-03 21:51 
GeneralRe: COM Interface Name Clashes Pin
Anonymous12-Jan-03 1:12
Anonymous12-Jan-03 1:12 
GeneralRe: COM Interface Name Clashes Pin
geo_m12-Jan-03 3:19
geo_m12-Jan-03 3:19 
GeneralDear ERIK!!!!!!!!!!Please..... Pin
vcarivu10-Jan-03 0:53
vcarivu10-Jan-03 0:53 
GeneralPluging ActiveXContol in I.E toolbar-Pls help me Urgent Pin
vcarivu9-Jan-03 20:30
vcarivu9-Jan-03 20:30 
QuestionIs OLE object = to COM?? Pin
E_LISE_LI9-Jan-03 14:14
E_LISE_LI9-Jan-03 14:14 
AnswerRe: Is OLE object = to COM?? Pin
geo_m10-Jan-03 4:44
geo_m10-Jan-03 4:44 
GeneralSTL map of _variant_t Pin
[James Pullicino]5-Jan-03 21:58
[James Pullicino]5-Jan-03 21:58 
GeneralRe: STL map of _variant_t Pin
geo_m7-Jan-03 6:58
geo_m7-Jan-03 6:58 
GeneralAutomation Problem with ROT (Running Object Table) Pin
Alois Kraus3-Jan-03 5:57
Alois Kraus3-Jan-03 5:57 
GeneralMS exchange server - deleting attachments Pin
Ammad Amjad31-Dec-02 20:58
Ammad Amjad31-Dec-02 20:58 
GeneralRe: help me!!!!!!!!!!!!!!!!!!!!! Pin
Renjith Ramachandran31-Dec-02 20:46
Renjith Ramachandran31-Dec-02 20:46 
GeneralRe: help me!!!!!!!!!!!!!!!!!!!!! Pin
Anders Molin3-Jan-03 14:05
professionalAnders Molin3-Jan-03 14:05 
QuestionHow to using the second IDispatch of a COM object in VBScript Pin
bojinyu30-Dec-02 0:10
bojinyu30-Dec-02 0:10 
AnswerRe: How to using the second IDispatch of a COM object in VBScript Pin
Vi230-Dec-02 1:06
Vi230-Dec-02 1:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.