[python-win32] Using py2exe with COM server question

Wolf Logan wolf@circle-cross.org
Tue, 1 Apr 2003 11:30:38 -0800


CreateGuid() will create (in most cases) a CLSID that is unique. that means
that no one else will ever produce that same CLSID. in that case, you can
distribute your package with that CLSID hard-coded, and it'll work just
fine -- it willnever collide with another CLSID.

non-python objects that are distributed in other ways also use a hard-coded
CLSID. the trick is to create a *new* CLSID when your object is revised
sufficiently that its interface changes.

----- Original Message -----
From: "Larry Bates" <lbates@syscononline.com>
Sent: Tuesday, April 01, 2003 7:28 AM


> Problem:
>
> I'm confused about how to 'properly' handle the _reg_clsid_
> attribute of the class.  It is my understanding that this needs
> to come from pythoncom.CreateGuid() on the machine where the COM
> object is being installed and it is unique to that machine.
> If this is the case, what is the best way to make this happen in
> a 'frozen' COM object?  The example shown has a hard coded GUID
> and that just doesn't seem right for distribution to other machines.