binary compatibility across com classes 
Author Message
 binary compatibility across com classes

I have two dlls each of them implements the same interface.  One is
named CNoopInspection and the other is named CStdInspection.  I want to
make them binary compatible with each other.  Since the library names
are different VB won't let me.  Is there a way around this?

dan holmes
integrated visual systems



Sat, 24 Jul 2004 03:36:34 GMT  
 binary compatibility across com classes
They can't be binary compatible with each other, since part of binary
compatibility is the CLSID of each class, which of course has to be
different (VB determines the CLSID when the project is first compiled).  My
guess is that you want to call either class from the same code, determining
which to call at runtime, and having them both implement the same interface
is all you need to achieve that (the common interface should be defined in
IDL -> TLB [http://www.yukondude.com/articletamevbwithidl.asp] or a separate
VB project).  One way to determine which class actually gets created is to
identify them by ProgId and lookup the ProgId somewhere at runtime.

--------------------------------------------------
Automate your software builds with Visual Build
http://www.kinook.com


Quote:
> I have two dlls each of them implements the same interface.  One is
> named CNoopInspection and the other is named CStdInspection.  I want to
> make them binary compatible with each other.  Since the library names
> are different VB won't let me.  Is there a way around this?

> dan holmes
> integrated visual systems



Sat, 24 Jul 2004 04:51:05 GMT  
 binary compatibility across com classes

Quote:

> I have two dlls each of them implements the same interface.  One is
> named CNoopInspection and the other is named CStdInspection.  I want to
> make them binary compatible with each other.  Since the library names
> are different VB won't let me.  Is there a way around this?

Open the project containing CStdInspection, go to Project/References,
and select the DLL containing CNoopInspection.  (I assume "Noop" means
"no operation"?)  You might want to consider making a /third/ class,
perhaps CGenericInspection, and making your other inspection classes
compatible with it instead.  Beware of events, because Implements will
not import them along with the methods and properties.  =(

Also, if you want to use your classes from VBScript, you'll have to
make certain that the functionality is accessible through the primary
interface:

 URL:http://groups.google.com/groups?selm=e2CHjgbVBHA.2416%40tkmsftngp05

Keep in mind that Implements doesn't work more than one level deep, so
if you make another class that Implements Sheep, this new class won't
automatically import Cloneable or Disposeable along with Sheep.

--
Joe Foster <mailto:jlfoster%40znet.com>     Got Thetans? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sat, 24 Jul 2004 04:58:23 GMT  
 binary compatibility across com classes
Well, actually i want both.  What you said below and binary
compatibility with each other.  I need binary compatibility because
these dlls will reside in mts.  If they are not binary compatible with
each other then i when i switch them out i have to run the client
install on each client again.  That is what i was hoping to avoid by
using the tlb.

dan

Quote:

> They can't be binary compatible with each other, since part of binary
> compatibility is the CLSID of each class, which of course has to be
> different (VB determines the CLSID when the project is first compiled).  My
> guess is that you want to call either class from the same code, determining
> which to call at runtime, and having them both implement the same interface
> is all you need to achieve that (the common interface should be defined in
> IDL -> TLB [http://www.yukondude.com/articletamevbwithidl.asp] or a separate
> VB project).  One way to determine which class actually gets created is to
> identify them by ProgId and lookup the ProgId somewhere at runtime.

> --------------------------------------------------
> Automate your software builds with Visual Build
> http://www.kinook.com



>>I have two dlls each of them implements the same interface.  One is
>>named CNoopInspection and the other is named CStdInspection.  I want to
>>make them binary compatible with each other.  Since the library names
>>are different VB won't let me.  Is there a way around this?

>>dan holmes
>>integrated visual systems



Sat, 24 Jul 2004 21:40:47 GMT  
 binary compatibility across com classes
Why do they need to be compatible with one another.  Wouldn't having
them compatible with a third component, one whose interface they
implement be sufficient?

Bruce Johnson
TAG Consulting
http://www.tagconsulting.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 24 Jul 2004 22:13:48 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. binary compatibility - class module found

2. Binary compatibility, Public Class, Name conflicts with existing module, project, or object library

3. Binary Compatibility Changes with Persistable Classes

4. binary compatibility - class module found

5. COM Experts : Question on Binary Compatibility and other Automation Errors

6. Send binary data (.JPG) across sockets

7. Binary Compatibility in VBA project

8. binary compatibility

9. Binary Compatibility

10. New article on maintaining binary compatibility

11. Binary/Project compatibility question

12. binary compatibility issues

 

 
Powered by phpBB® Forum Software