Click here to Skip to main content
15,916,091 members
Home / Discussions / COM
   

COM

 
Generalautoactivate deskband Pin
Mårten14-Jan-03 9:25
Mårten14-Jan-03 9:25 
GeneralRe: autoactivate deskband Pin
Shaun Harrington11-Oct-06 4:02
Shaun Harrington11-Oct-06 4:02 
GeneralDCOM VB Active X Control in MFC fails but works when hosted in VB Pin
quannum13-Jan-03 23:23
quannum13-Jan-03 23:23 
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 
Thanks for the reply Smile | :)

Well, now I have a client (my effects browser). I have three effect COM servers, each declaring a "IMyEffect" interface, with a method "GetName()" which simply returns the name of the effect it provides.

In each COM server, I have over-ridden the default GetCategoryMap() method and added a category map to my coclass which specifies a single implemented category using a single defined CATID (in a header file accessible to all my COM servers).

In my effect browser client I've implemented code to simply list all the progIDs/clsIDs which it does successfully!

OK, now what I want to do is call the GetName() method on each and surely I should have enough information just from the CLSIDs but that's just my problem!

Normally, I'd call the CoCreateInstance method, specifying a CLSID (well I've got that, so that's OK), a reference to the interface identifier and an interface pointer in which to return a pointer to the interface on which I want to call the method!

That's now the problem though. Normally, I'd declare a pointer to the interface but I need access to the appropriate header file, likewise I also need the IID but again I need the header file. The problem is of course, I don't know which header file to include because the whole point of the browser is to select the COM server dynamically!

OK, I believe there's certain fundamentals of using COM which I'm just not grasping, but I'm close I hope Smile | :)

I'm wondering if:

a) there's some magical way of calling QueryInterface() to return what I need though from what I can tell, I still need an IID to specify (can I get the IID from the CLSID?). And what then about the IMyEffect pointer? I'd still have to have access to a header file!

b) I need to create a COM server defining the IMyEffect interface, then allow my effect COM servers to aggregate it and implement the actual methods themselves.

(b) sounds the most promising to me (what do you think or have I misunderstood even further how COM is supposed to work?). I could then have a header file which contined the single IID of IMyEffect and a declaration of the IMyEffect interface. Unfortunately, how do I then categorise the interfaces so that my browser can "discover" all the available effect servers at run-time?


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 
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 

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.