We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 22,099 times

Contents

Related Categories

Keeping VB Components Compatible - GUIDs and TypeLibs and Interfaces

LACanadian

GUIDs and TypeLibs and Interfaces

Unfortunately, to understand the different compatibility levels, the first place we need to go is deep into the bowels of COM. At its heart, a COM component provides services to its clients by exposing classes. By using these classes, it is possible for clients to create objects and manipulate properties and methods to their benefit. The set of properties and methods that are exposed by a class (the ones that are declared as Public) is called its interface. The information about the interface, including each property (name and data type) and method (name, parameter list and data type) is contained in a type library, also called a TypeLib. For VB components, the TypeLib is stored as a resource in the DLL/OCX file. For C++ components, it is usually be found in a separate file with a .tlb extension.

Now the first time you compile your ActiveX project, each interface (remember that each class has its own set of properties and methods and therefore its own interface) is automatically assigned a Globally Unique Identifier, or GUID. This is a 128-bit number that is used to identify the interface. How unique? Well, you would have to compile your application multiple times a second for well over a century in order to generate a conflicting GUID. This GUID is stored in your registry and acts as a link between the component's interface, the class name and the file that contains the executable code.

I am the owner of a small application development consulting company that specialized in the design and implementation of Internet-based applications. While there are others who can make a web site look good, our expertise is in making the site function. This includes infrastructure design, database design and administration, software development and deployment. For the most part, we utilize Microsoft-based languages and tools. And we are skilled enough to have generated two patent applications for our clients.

Comments

  • Removing old references

    Posted by LACanadian on 31 Jan 2003

    When I've had the same problem, I would follow these steps:

    1. Manually unregister the component with regsvr32 /u [i]path[/i].

    2. Edit the registry using your favorite tool

    3. Starting in ...

  • How to remove old references?

    Posted by dhnc on 21 Nov 2002

    Very interesting article on component compatibility. It gave me good insight in something I had trouble with during a long time already.
    I have the following question though:
    how can you remove the ...

  • Very Good

    Posted by pleitch on 10 Jul 2002

    Looks like it is straight out of a text book. I checked through it all and it is all correct. I had to by a series of advanced COM/COM++/VB and COM books to decypher - ah I mean learn - the same inf...