Is there a “formal” way to get VC6 to assign a new GUID to an existing COM
interface? Or should I just generate one on my own and manually substitute
it in the VC6-generated .idl file?
Thanks!
RLH
Is there a “formal” way to get VC6 to assign a new GUID to an existing COM
interface? Or should I just generate one on my own and manually substitute
it in the VC6-generated .idl file?
Thanks!
RLH
> Is there a “formal” way to get VC6 to assign a new GUID to an existing COM
interface? Or should I just generate one on my own and manually substitute
it in the VC6-generated .idl file?
IIDs never change. If you have used some IID - it must NOT change just
because the developer wanted so (it will break existing VB and C++ apps
relying on the GUID etc). Define the brand new interface instead or subclass
the existing one.
Max
At 03:42 AM 12/05/2000 +0300, you wrote:
> Is there a “formal” way to get VC6 to assign a new GUID to an existing COM
> interface? Or should I just generate one on my own and manually substitute
> it in the VC6-generated .idl file?IIDs never change. If you have used some IID - it must NOT change just
because the developer wanted so (it will break existing VB and C++ apps
relying on the GUID etc).
I know. But I’m defining a new interface which has quite a few features of
the old one, and a quick way for me to do that is to simply copy the source
files and edit appropriately. The .idl file still contains the GUID of the
original (and still-existing) interface, though, so I’ve got to generate a
new GUID for the new interface. That’s why I asked the question the way I
did. What do you recommend - is there an automatic way to do it, or should I
manually generate one and just type it in? Is there a command-line app which
generates them, or do I need to throw together a quick program which calls
the appropriate Win32 API?
Thanks!
RLH
Ya, run GUIDGEN from DevStudio.
Regards,
Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com
-----Original Message-----
From: Richard Hartman [mailto:xxxxx@realresume.com]
Sent: Monday, December 04, 2000 5:05 PM
To: NT Developers Interest List
Cc: xxxxx@storagecraft.com
Subject: [ntdev] Re: New GUID?
At 03:42 AM 12/05/2000 +0300, you wrote:
> Is there a “formal” way to get VC6 to assign a new GUID to an existing COM
> interface? Or should I just generate one on my own and manually substitute
> it in the VC6-generated .idl file?IIDs never change. If you have used some IID - it must NOT change just
because the developer wanted so (it will break existing VB and C++ apps
relying on the GUID etc).
I know. But I’m defining a new interface which has quite a few features of
the old one, and a quick way for me to do that is to simply copy the source
files and edit appropriately. The .idl file still contains the GUID of the
original (and still-existing) interface, though, so I’ve got to generate a
new GUID for the new interface. That’s why I asked the question the way I
did. What do you recommend - is there an automatic way to do it, or should I
manually generate one and just type it in? Is there a command-line app which
generates them, or do I need to throw together a quick program which calls
the appropriate Win32 API?
Another way of looking at this is if you change the
GUID, you are creating a new interface. So there is no
way to change the GUID on an existing COM interface.
There is nothing inherently wrong with copying an interface,
and creating a new one with a different GUID but the
same name. But if you do it in place, and overwrite the
type library, then the old interface may cease to function.
Perhaps that is your goal. If so, I think you can do the
manual substitution.
(The thing that you should “never” do is change the interface
declaration without changing the GUID. What you would effectively
be doing is creating two interfaces with the same GUID, which is
a bad idea.)
-DH
----- Original Message -----
From: “Maxim S. Shatskih”
To: “NT Developers Interest List”
Sent: Monday, December 04, 2000 7:42 PM
Subject: [ntdev] Re: New GUID?
> > Is there a “formal” way to get VC6 to assign a new GUID to an existing COM
> > interface? Or should I just generate one on my own and manually substitute
> > it in the VC6-generated .idl file?
>
> IIDs never change. If you have used some IID - it must NOT change just
> because the developer wanted so (it will break existing VB and C++ apps
> relying on the GUID etc). Define the brand new interface instead or subclass
> the existing one.
>
> Max
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@syssoftsol.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
At 09:50 PM 12/04/2000 -0500, you wrote:
Another way of looking at this is if you change the
GUID, you are creating a new interface. So there is no
way to change the GUID on an existing COM interface.
And I’m not trying to do that. I’m simply trying to create a NEW interface,
based largely on the old one, but with a new name and new GUID.
(The thing that you should “never” do is change the interface
declaration without changing the GUID. What you would effectively
be doing is creating two interfaces with the same GUID, which is
a bad idea.)
Yep - which is why I’m not doing that.
Thanks!
RLH
At 05:19 PM 12/04/2000 -0800, you wrote:
Ya, run GUIDGEN from DevStudio.
Thanks, I knew it was in there somewhere .
RLH
>or should I manually generate one and just type it in?
Yes.
Is there a command-line app which generates them
UUIDGEN.
Max