?
Solved

Interface not registered in registry

Posted on 2004-10-14
1
Medium Priority
?
406 Views
Last Modified: 2008-03-06
Hi !
  I made a component with two interfaces. I used the ATL wizards. Its a simple object only. Only the first interface is registered in the registry. I dont see the registry entry for the second! Hence, my CoCreateInstance fails when I try to create a pointer to the second interface! How do I ensure that the registry entry is made (Under Classes) for the second interface?

0
Comment
Question by:manoj_johar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
stu_pb earned 750 total points
ID: 12309147
You can edit the object.rgs file in the project to add the second object.

You can use a tool likd GUIDgen to create a CLSID for the second object.

HKCR
{
      MyObject.Object1.1 = s 'Object Class'
      {
            CLSID = s '{FF01DABF-43C5-4B80-8696-FB81C6CBA74A}'
      }
      MyObject.Object1= s 'Object Class'
      {
            CLSID = s '{FF01DABF-43C5-4B80-8696-FB81C6CBA74A}'
            CurVer = s MyObject.Object1.1'
      }
      NoRemove CLSID
      {
            ForceRemove {FF01DABF-43C5-4B80-8696-FB81C6CBA74A} = s Object Class'
            {
                  ProgID = s MyObject.Object1.1'
                  VersionIndependentProgID = s MyObject.Object1
                  ForceRemove 'Programmable'
                  InprocServer32 = s '%MODULE%'
                  {
                        val ThreadingModel = s 'Apartment'
                  }
                  'TypeLib' = s '{5BC2EA21-81ED-44CE-ADDA-02ABE29790B8}'
            }
      }
               MyObject.Object2.1 = s 'Object Class'
      {
            CLSID = s '{AF01DABF-43C5-4B80-8696-FB81C6CBA74A}'
      }
      MyObject.Object2= s 'Object Class'
      {
            CLSID = s '{AF01DABF-43C5-4B80-8696-FB81C6CBA74A}'
            CurVer = s MyObject.Object2.1'
      }
      NoRemove CLSID
      {
            ForceRemove {AF01DABF-43C5-4B80-8696-FB81C6CBA74A} = s Object Class'
            {
                  ProgID = s MyObject.Object2.1'
                  VersionIndependentProgID = s MyObject.Object2
                  ForceRemove 'Programmable'
                  InprocServer32 = s '%MODULE%'
                  {
                        val ThreadingModel = s 'Apartment'
                  }
                  'TypeLib' = s '{ABC2EA21-81ED-44CE-ADDA-02ABE29790B8}'
            }
      }
}

Good Luck!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question