Changing GUIDS of an existing ATL project 
Author Message
 Changing GUIDS of an existing ATL project

Hello,

I have created an ATL project with the AppWizard and added some
additional functionality to it. Now I want to change all the GUIDS
from that project to use it as a base for a new control. Simply
replacing all existing GUID's with new ones from guidgen does not seem
to work. The control does register correctly but powerpoint gives me a
"Object library invalid or contains references to object definitions
that could not be found" error. I did make sure that I have
unregistered the control before and searched the registry for remains
of the old control but with no success. Is there anything besides the
registry that needs to be cleaned out there?

Thanks in advance,
Marc



Sat, 05 Mar 2005 22:43:11 GMT  
 Changing GUIDS of an existing ATL project
Have you replaced the GUIDs in both the IDL file and .RGS file? Do they
match?
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hello,

> I have created an ATL project with the AppWizard and added some
> additional functionality to it. Now I want to change all the GUIDS
> from that project to use it as a base for a new control. Simply
> replacing all existing GUID's with new ones from guidgen does not seem
> to work. The control does register correctly but powerpoint gives me a
> "Object library invalid or contains references to object definitions
> that could not be found" error. I did make sure that I have
> unregistered the control before and searched the registry for remains
> of the old control but with no success. Is there anything besides the
> registry that needs to be cleaned out there?

> Thanks in advance,
> Marc



Sun, 06 Mar 2005 00:24:25 GMT  
 Changing GUIDS of an existing ATL project

Quote:

> Have you replaced the GUIDs in both the IDL file and .RGS file? Do they
> match?
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken



> > Hello,

> > I have created an ATL project with the AppWizard and added some
> > additional functionality to it. Now I want to change all the GUIDS
> > from that project to use it as a base for a new control. Simply
> > replacing all existing GUID's with new ones from guidgen does not seem
> > to work. The control does register correctly but powerpoint gives me a
> > "Object library invalid or contains references to object definitions
> > that could not be found" error. I did make sure that I have
> > unregistered the control before and searched the registry for remains
> > of the old control but with no success. Is there anything besides the
> > registry that needs to be cleaned out there?

> > Thanks in advance,
> > Marc

Hi,

I did a search and replaced all the GUIDS with the "same" new ones, I
triple-checked that.
As a reality check I did the following: I have created a new ATL
project, with one full control in it. Then I build and registered it.
After that I unregistered it and changed only the main CLSID guid in
the relevant files. Result: I get the same error in WORD again. The
control works fine however in the test container.

This is driving me crazy!!!

Marc



Sun, 06 Mar 2005 20:40:25 GMT  
 Changing GUIDS of an existing ATL project
You mean you are trying to open the same DOC file that used to have old
object embedded in it, and expect it to automatically switch to a new
object? Of course this fails - DOC file has CLSID of the old object
stored in it. You will have the same problem in Test Container if you
save TCS session file with the old control, unregister old CLSID,
register new CLSID, and try to open old TCS file again.

That said, see TreatAs registry setting.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> I did a search and replaced all the GUIDS with the "same" new ones, I
> triple-checked that.
> As a reality check I did the following: I have created a new ATL
> project, with one full control in it. Then I build and registered it.
> After that I unregistered it and changed only the main CLSID guid in
> the relevant files. Result: I get the same error in WORD again. The
> control works fine however in the test container.



Sun, 06 Mar 2005 21:43:54 GMT  
 Changing GUIDS of an existing ATL project
Quote:
> You mean you are trying to open the same DOC file that used to have old
> object embedded in it, and expect it to automatically switch to a new
> object? Of course this fails - DOC file has CLSID of the old object
> stored in it. You will have the same problem in Test Container if you
> save TCS session file with the old control, unregister old CLSID,
> register new CLSID, and try to open old TCS file again.

No, I registered the control with the original classid, unregistered
it, changed the classid and THEN embedded it in word, which failed.
The same happens if I change ALL GUIDS for the project (not just the
classid).
One thing that seems pretty obvious and can be verified when looking
through the registry after unregistering a control is that
unregistering does by far not completely remove any references to it.
Now, I did eventually get it to work with the new GUIDS by bumping up
the version number in the rgs and idl files. Is this the right way to
do it though or do I also need to change the name???
In any case, this behaviour is weird as I would hope that
unregistering a control get's completely rid of it.

-Marc

Quote:

> You mean you are trying to open the same DOC file that used to have old
> object embedded in it, and expect it to automatically switch to a new
> object? Of course this fails - DOC file has CLSID of the old object
> stored in it. You will have the same problem in Test Container if you
> save TCS session file with the old control, unregister old CLSID,
> register new CLSID, and try to open old TCS file again.

> That said, see TreatAs registry setting.
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken



> > I did a search and replaced all the GUIDS with the "same" new ones, I
> > triple-checked that.
> > As a reality check I did the following: I have created a new ATL
> > project, with one full control in it. Then I build and registered it.
> > After that I unregistered it and changed only the main CLSID guid in
> > the relevant files. Result: I get the same error in WORD again. The
> > control works fine however in the test container.



Mon, 07 Mar 2005 16:24:10 GMT  
 Changing GUIDS of an existing ATL project

Quote:
> No, I registered the control with the original classid, unregistered
> it, changed the classid and THEN embedded it in word, which failed.
> The same happens if I change ALL GUIDS for the project (not just the
> classid).
> One thing that seems pretty obvious and can be verified when looking
> through the registry after unregistering a control is that
> unregistering does by far not completely remove any references to it.
> Now, I did eventually get it to work with the new GUIDS by bumping up
> the version number in the rgs and idl files. Is this the right way to
> do it though or do I also need to change the name???
> In any case, this behaviour is weird as I would hope that
> unregistering a control get's completely rid of it.

That sounds like an issue with the .rgs file. Sounds like your
NoRemove/ForceRemove options are incorrectly set.

Can you post the server's .rgs file for us?

Loz.



Mon, 07 Mar 2005 18:52:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. changing existing dynamic library project to static library project

2. Can't add ATL support to existing MFC project

3. Add WTL features to existing ATL project?

4. converting wince atl project into win32 atl project

5. modify an existing project to a database project in VC++ 5

6. Create a new Project from a Existing Project?

7. Changing ATL COM Project Library Name

8. using ATL types in non-ATL project

9. When debug ATL/VB client - breakpoints in ATL project become disabled

10. Can't add more than one ATL object to an ATL project using wizard

11. Changing project configuration for a Win32 Static Lib Project

12. problem adding a web service to the existing project

 

 
Powered by phpBB® Forum Software