Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Interface not registered in registry

Posted on 2004-10-14
1
Medium Priority
?
407 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

597 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