tags:

views:

45

answers:

2

I am using comtypes to generate wrappers for a certain com library. I am having certain issues with a few things, that are not being generated properly. I can get around this by doing the missing work, manually. However can i depend on the fact that CLSID's will not change?

Lets say:

I install a program with the com library Foo 1.0, now i install the exact same version of that program on another PC, will the CLSID's of the interfaces change?

This might be a terribly dumb question.

+1  A: 

The CLSID is at least supposed not to change. Naturally a program can do a lot many stupid things breaking regulations. But: AS the CLSID is how the class is loaded, a changed CLSID would mean the USING program of a class would also have to use the changed CLSID.

Su, yous assumption is right - if the same program in the same version is installed on two computers, it is safe to assume the CLSID does not change.

This is even supposed t obe so between versions.... but if the library Foo 1.0 is only used by one program, the programmer may get away with a changed CLSID. It is not supposed to change, though.

TomTom
+1  A: 

Disclaimer: Done a lot of COM, but never with python.

The UUID for a COM interface is part of the definition of the interface. It should be the same on every machine, and for all time.

Also, in ATL COM land, classes have CLSIDs, interfaces have IIDs. They both have UUIDs (or possibly GUIDs). Not sure about python.

Spike
Sorry i am really tired and i think i messed up my CLSID's and IID's and GUIDS ugh. Thanks tho this answered my question.
UberJumper