Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. What are the ways a COM dll can be used? + questions

What are the ways a COM dll can be used? + questions

Scheduled Pinned Locked Moved COM
comc++questionworkspace
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    grassrootkit
    wrote on last edited by
    #1

    * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file? * Creation using ProgIDs is efficient? Please verify: * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside. (that we do by adding simple ATL object into workspace?)//Containment ,aggregation etc. * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

    R A 2 Replies Last reply
    0
    • G grassrootkit

      * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file? * Creation using ProgIDs is efficient? Please verify: * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside. (that we do by adding simple ATL object into workspace?)//Containment ,aggregation etc. * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

      R Offline
      R Offline
      Roger Stoltz
      wrote on last edited by
      #2

      grassrootkit wrote:

      * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file?

      A header file will be created during the build process that usually has the .tlh extension.

      grassrootkit wrote:

      * Creation using ProgIDs is efficient?

      In comparison to what? The CLSID I presume. Due to how the registry is organized, using the ProgID will require an extra round-trip to find out the CLSID since it's underneath that key in the registry the path to the dll is found.

      grassrootkit wrote:

      * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside.

      Correct in the sense that a COM DLL may contain more than one COM server.

      grassrootkit wrote:

      * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

      Yes.

      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
      "High speed never compensates for wrong direction!" - unknown

      A G 4 Replies Last reply
      0
      • G grassrootkit

        * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file? * Creation using ProgIDs is efficient? Please verify: * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside. (that we do by adding simple ATL object into workspace?)//Containment ,aggregation etc. * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

        A Offline
        A Offline
        Alexandre GRANVAUD
        wrote on last edited by
        #3

        - Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file? the #import creates .tli and .tlh files which are headers - Creation using ProgIDs is efficient? it must be slower because it looks at the progid in registry then at the clsid - A COM DLL doesn't mean a component. A COM dll may contain any number of components inside. (that we do by adding simple ATL object into workspace?)//Containment ,aggregation etc. yes a COM DLL can have many components inside - A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly. yes with ATL you have no problem, each class factory is instanciated within an OBJET MAP

        1 Reply Last reply
        0
        • R Roger Stoltz

          grassrootkit wrote:

          * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file?

          A header file will be created during the build process that usually has the .tlh extension.

          grassrootkit wrote:

          * Creation using ProgIDs is efficient?

          In comparison to what? The CLSID I presume. Due to how the registry is organized, using the ProgID will require an extra round-trip to find out the CLSID since it's underneath that key in the registry the path to the dll is found.

          grassrootkit wrote:

          * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside.

          Correct in the sense that a COM DLL may contain more than one COM server.

          grassrootkit wrote:

          * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

          Yes.

          "It's supposed to be hard, otherwise anybody could do it!" - selfquote
          "High speed never compensates for wrong direction!" - unknown

          A Offline
          A Offline
          Alexandre GRANVAUD
          wrote on last edited by
          #4

          hopefully we gave the same results ;)

          1 Reply Last reply
          0
          • R Roger Stoltz

            grassrootkit wrote:

            * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file?

            A header file will be created during the build process that usually has the .tlh extension.

            grassrootkit wrote:

            * Creation using ProgIDs is efficient?

            In comparison to what? The CLSID I presume. Due to how the registry is organized, using the ProgID will require an extra round-trip to find out the CLSID since it's underneath that key in the registry the path to the dll is found.

            grassrootkit wrote:

            * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside.

            Correct in the sense that a COM DLL may contain more than one COM server.

            grassrootkit wrote:

            * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

            Yes.

            "It's supposed to be hard, otherwise anybody could do it!" - selfquote
            "High speed never compensates for wrong direction!" - unknown

            G Offline
            G Offline
            grassrootkit
            wrote on last edited by
            #5

            Thanks, both of you.

            1 Reply Last reply
            0
            • R Roger Stoltz

              grassrootkit wrote:

              * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file?

              A header file will be created during the build process that usually has the .tlh extension.

              grassrootkit wrote:

              * Creation using ProgIDs is efficient?

              In comparison to what? The CLSID I presume. Due to how the registry is organized, using the ProgID will require an extra round-trip to find out the CLSID since it's underneath that key in the registry the path to the dll is found.

              grassrootkit wrote:

              * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside.

              Correct in the sense that a COM DLL may contain more than one COM server.

              grassrootkit wrote:

              * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

              Yes.

              "It's supposed to be hard, otherwise anybody could do it!" - selfquote
              "High speed never compensates for wrong direction!" - unknown

              G Offline
              G Offline
              grassrootkit
              wrote on last edited by
              #6

              But what does this mean?

              #import "C:\Program Files\Common Files\System\ADO\msado15.dll"

              R 1 Reply Last reply
              0
              • R Roger Stoltz

                grassrootkit wrote:

                * Just by knowing the component's CLSID & the interface's IDs? Use a component with the "import" directive, that takes information from the .tlb file? <-won't this require any header file?

                A header file will be created during the build process that usually has the .tlh extension.

                grassrootkit wrote:

                * Creation using ProgIDs is efficient?

                In comparison to what? The CLSID I presume. Due to how the registry is organized, using the ProgID will require an extra round-trip to find out the CLSID since it's underneath that key in the registry the path to the dll is found.

                grassrootkit wrote:

                * A COM DLL doesn't mean a component. A COM dll may contain any number of components inside.

                Correct in the sense that a COM DLL may contain more than one COM server.

                grassrootkit wrote:

                * A CoClass is a component object. As a COM DLL can contain more components, there'll be more CoClasses accordingly.

                Yes.

                "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                "High speed never compensates for wrong direction!" - unknown

                G Offline
                G Offline
                grassrootkit
                wrote on last edited by
                #7

                Also, my program has not generated any .tlh or .tli files. But it has created a C file with _i suffixed. like this : MyComTest_i.c. I should use this rather? Using VC8.0.

                R 1 Reply Last reply
                0
                • G grassrootkit

                  But what does this mean?

                  #import "C:\Program Files\Common Files\System\ADO\msado15.dll"

                  R Offline
                  R Offline
                  Roger Stoltz
                  wrote on last edited by
                  #8

                  It means that you want to include type library information from the file. Read more here[^].

                  "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                  "High speed never compensates for wrong direction!" - unknown

                  1 Reply Last reply
                  0
                  • G grassrootkit

                    Also, my program has not generated any .tlh or .tli files. But it has created a C file with _i suffixed. like this : MyComTest_i.c. I should use this rather? Using VC8.0.

                    R Offline
                    R Offline
                    Roger Stoltz
                    wrote on last edited by
                    #9

                    The extensions of the preprocessor generated files can be configured in the project settings. Different versions of MSVC seem to use different extensions. Don't worry about the *.c-file. If you want to use the typelibrary information from another file, simply include the preprocessor generated header file. A common way is to do the import in the stdafx.h file and then include the preprocessor generated header file as needed.

                    "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                    "High speed never compensates for wrong direction!" - unknown

                    G 2 Replies Last reply
                    0
                    • R Roger Stoltz

                      The extensions of the preprocessor generated files can be configured in the project settings. Different versions of MSVC seem to use different extensions. Don't worry about the *.c-file. If you want to use the typelibrary information from another file, simply include the preprocessor generated header file. A common way is to do the import in the stdafx.h file and then include the preprocessor generated header file as needed.

                      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                      "High speed never compensates for wrong direction!" - unknown

                      G Offline
                      G Offline
                      grassrootkit
                      wrote on last edited by
                      #10

                      //You mean,In the project option, Configuration properties-> MIDL->Output->IID File = MyProject_i.c ? I should use this file for using with client?

                      1 Reply Last reply
                      0
                      • R Roger Stoltz

                        The extensions of the preprocessor generated files can be configured in the project settings. Different versions of MSVC seem to use different extensions. Don't worry about the *.c-file. If you want to use the typelibrary information from another file, simply include the preprocessor generated header file. A common way is to do the import in the stdafx.h file and then include the preprocessor generated header file as needed.

                        "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                        "High speed never compensates for wrong direction!" - unknown

                        G Offline
                        G Offline
                        grassrootkit
                        wrote on last edited by
                        #11

                        Hey got it :).. I've used COM but not from a C++ client. So my first C++ client takes off well :D. :jig: thanks. Next is to use Connection points in a C++ client. ;) Can you point to a good article that speaks about USING connection points in a C++ client?

                        modified on Friday, February 20, 2009 5:41 AM

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups