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. ATL / WTL / STL
  4. ATL 7.0 Creating Clients for COM Components

ATL 7.0 Creating Clients for COM Components

Scheduled Pinned Locked Moved ATL / WTL / STL
comc++tutorialquestion
2 Posts 2 Posters 5 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.
  • J Offline
    J Offline
    jparsons
    wrote on last edited by
    #1

    I'm at the edge right now. I've spent all afternoon trying to create a client for the simplest of COM components. I started an ATL project library. I added a class Calculator with the interface ICalculator. Now I just want to make a trivial client that calls the Add method. I can't get anything to work. I try to include "../Calculator.h" into the Client code but I get errors with DECLARE_PROTECT_FINAL_CONSTRUCT. Including _Utils.tlb isn't helping at all. Can anyone point me to where I can find a simple tutorial for creating clients for ATL 7.0 com objects? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

    J 1 Reply Last reply
    0
    • J jparsons

      I'm at the edge right now. I've spent all afternoon trying to create a client for the simplest of COM components. I started an ATL project library. I added a class Calculator with the interface ICalculator. Now I just want to make a trivial client that calls the Add method. I can't get anything to work. I try to include "../Calculator.h" into the Client code but I get errors with DECLARE_PROTECT_FINAL_CONSTRUCT. Including _Utils.tlb isn't helping at all. Can anyone point me to where I can find a simple tutorial for creating clients for ATL 7.0 com objects? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n

      J Offline
      J Offline
      Jorgen Sigvardsson
      wrote on last edited by
      #2

      You're including the wrong file I'm afraid. If your COM-dll projects is named XYZ, include the autogenerated XYZ.h. Also make sure you include XYZ_i.c somewhere, perhaps stdafx.cpp? It contains the GUIDs related to your interfaces and classes. Either that or #import "XYZ.dll" -- Only in a world this shitty could you even try to say these were innocent people and keep a straight face.

      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