Monday, April 25, 2011

What's are the naming conventions on COM libraries? When do I choose .ocx, .oca, .tlb, .olb?

EDIT: Since the original wording of my question caused much frowning I re-phrased it. Sorry about the confusion.

Until now all my COM DLLs had the extension .dll, but I assume there are some rules about that. I know there are .ocx, .oca, .tlb and .olb files. I'm aware that these files all contain "COM stuff" but what exactly?

  • What are these files in general: .ocx, .oca, .tlb, .olb?
  • What is the difference between an OLB and a TLB?
  • What is the difference between TLB and OCX?
  • What is the difference between .ocx and .oca?
  • When should I name my library .ocx and when .tlb? If they contain a certain kind of feature?
  • Which properties do my libraries have to have to use a certain extension?
From stackoverflow
    • .ocx
      • ActiveX Control
    • .oca
      • Extended type library/custom control cache file that goes along with a .ocx
    • .tlb
      • Contains the definitions of the COM interfaces and types contained in its associated COM library. It is a cross language "header file".
    • .olb
      • A Microsoft Object Library file that contains information referenced by Microsoft Office components.
    DR : What do you mean by "user interface data"? What is the difference between "user interface data" and an ActiveX control?
    Aardvark : Type Libraries (tlb) contain the definitions of the COM interfaces and types contained in it's associated COM library. It is a cross language "header file" (if you're familiar with c/c++). I think that's a typo in Mark's answer.
    DR : OK, that would make sense.
    Mark Biek : Thanks Aardvark. I've updated my answer.

0 comments:

Post a Comment