Click here to Skip to main content
15,924,195 members
Home / Discussions / COM
   

COM

 
GeneralOpenGL ActiveX Pin
Member 49426111-Jul-05 20:41
Member 49426111-Jul-05 20:41 
GeneralCoCreateInstance() returns the error saying "The specific module could not be found." Pin
urssmiling11-Jul-05 18:34
urssmiling11-Jul-05 18:34 
GeneralRe: CoCreateInstance() returns the error saying "The specific module could not be found." Pin
stonewall_200012-Jul-05 14:55
stonewall_200012-Jul-05 14:55 
GeneralRe: CoCreateInstance() returns the error saying "The specific module could not be found." Pin
urssmiling12-Jul-05 20:23
urssmiling12-Jul-05 20:23 
QuestionOne IDL, Multiple Implementations? Pin
Vertig011-Jul-05 11:21
Vertig011-Jul-05 11:21 
AnswerRe: One IDL, Multiple Implementations? Pin
Anonymous11-Jul-05 21:35
Anonymous11-Jul-05 21:35 
GeneralRe: One IDL, Multiple Implementations? Pin
Vertig012-Jul-05 7:48
Vertig012-Jul-05 7:48 
GeneralRe: One IDL, Multiple Implementations? Pin
Lim Bio Liong14-Jul-05 4:28
Lim Bio Liong14-Jul-05 4:28 
Hello Vertig0,

My post here is written with due respect to my fellow developers including "Anonymous". However, I do seriously beg to differ with "Anonymous"'s answers to you which, in my sincere and humble opinion, are incorrect.

I'll go through his answers first to set the record straight and then I'll go through the original questions that you posted. Finally, I'll provide some of my own extra inputs. I have also written a set of sample codes to illustrate my points and would be glad to email it to you. My email address will be provided below.

OK, let's go through "Anonymous"'s answers :

Anonymous wrote : "If your two separate people are both implementing COM servers, which have the same interface as defined in the IDL, then you need to register one or the other DLL and which ever DLL is the last one registered will be used."

My comments : This is not correct. Two or more (multiple, in fact) COM objects housed in separate (or even the same) DLL(s) may implement the same interface AND they can ALL be registered on the same machine, live side by side and be used separately or simultaneously by a client application.

Just imagine this, vertig0 : ALL COM objects must implement IUnknown. If what Anonymous said was true, then only one object can be registered and used at one time. What kind of a COM world would we be living in ?

Anonymous wrote : "If however the two implementations do different things, despite having the same interface, then you need to use two IDL files with different GUIDs. In the client program, when you call CoCreateInstance(), specify the appropriate CLSID."

My comments : what else is the purpose of providing two or more implementations of one published interface but to treat them as providing two or more versions of the same expected functionality ? Still, vertig0, the central idea is to maintain ONE interface (with a constant IID) coded in ONE IDL file.

Anonymous wrote : "In the client program, when you call CoCreateInstance(), specify the appropriate CLSID.".

My comments : this is exactly how a client would get hold of a specific interface implemented by one particular COM object. However, the IID of the interface -must- remain the same. It is the CLSID that is different.

OK, vertig0, now onto your questions :

vertig0 wrote : " However, I've been having trouble finding help for what I'm trying to do next - making my IDL file support multiple server implementations."

My comments : my sample codes will show you how to achieve this.

vertig0 wrote : "Looking at the client's perspective, what is the best way to support multiple server implementations of the same IDL on a given system? In other words, I'm considering a situation where my client needs to distinguish between more than one registered "server.dll," while sticking with just one IDL file..."

My comments : The CLSID of the specific COM server (which implements the interface) is what you would use to distingusish between more than one registered "server.dll".

The central point is to enable your client code to create instances (via CoCreateInstance(), etc) of the various COM objects that implement your interface. You differentiate between the versions of the interface implementation by the CLSID. My sample codes will illustrate this.

Finally :

vertig0 wrote : "Perhaps I'm thinking about this the wrong way... In any case, suggestions would be much appreciated!"

My comments : you are thinking about this the right way, vertig0. It is most intuitive and is very much in line with Object-Oriented development principles.

Send an email to me, vertig0, and I'll email you the sample codes. Here is my email address :

bio_lim_2004@yahoo.com

Again, my assurance of full respect to Anonymous.


Best Regards,
Bio.

GeneralRe: One IDL, Multiple Implementations? Pin
Akth20-Jul-05 14:13
Akth20-Jul-05 14:13 
GeneralRe: One IDL, Multiple Implementations? Pin
Lim Bio Liong20-Jul-05 15:33
Lim Bio Liong20-Jul-05 15:33 
GeneralRe: One IDL, Multiple Implementations? Pin
Lim Bio Liong25-Jul-05 7:40
Lim Bio Liong25-Jul-05 7:40 
Generalconverting the type library to a .net assembly failed Pin
jwjanzen11-Jul-05 3:18
jwjanzen11-Jul-05 3:18 
Generalwriting com/shell extensions in masm Pin
salafii8-Jul-05 6:56
salafii8-Jul-05 6:56 
GeneralRe: writing com/shell extensions in masm Pin
Michael Dunn18-Jul-05 2:49
sitebuilderMichael Dunn18-Jul-05 2:49 
GeneralWhen Create Instance,Error in CoCreateInstanceEx Pin
stonewall_20007-Jul-05 21:57
stonewall_20007-Jul-05 21:57 
GeneralBuilding class in COM Pin
Logan from Singapore6-Jul-05 16:11
Logan from Singapore6-Jul-05 16:11 
GeneralThread profiling in C++/COM components Pin
rajandpayal6-Jul-05 15:51
rajandpayal6-Jul-05 15:51 
Questionaudio mux directshow filter? Pin
Taiwu Chiang6-Jul-05 11:38
Taiwu Chiang6-Jul-05 11:38 
Generalread input from a port Pin
kwena5-Jul-05 21:18
kwena5-Jul-05 21:18 
GeneralCreating an instance of a hidden interface Pin
Dave Moran5-Jul-05 9:51
Dave Moran5-Jul-05 9:51 
GeneralUsing Web Browser Pin
Chna5-Jul-05 0:25
Chna5-Jul-05 0:25 
GeneralSorry !! I occurs some problems when i add webservice to ATL COM Pin
clw89u4-Jul-05 16:21
clw89u4-Jul-05 16:21 
GeneralRe: Sorry !! I occurs some problems when i add webservice to ATL COM Pin
clw89u4-Jul-05 16:24
clw89u4-Jul-05 16:24 
GeneralCOM Newbie Question Pin
Steve Messer1-Jul-05 19:24
Steve Messer1-Jul-05 19:24 
GeneralRe: COM Newbie Question Pin
Christian Graus4-Jul-05 16:28
protectorChristian Graus4-Jul-05 16:28 

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.