开发者

Can a CLSID be different for the same program installed on two different machines?

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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜