I’m new at making COM servers and working with COM from Python so I want to clarify a few things I could not find explicit answers for:
Creating GUID’s Properly for COM servers
Do I generate:
The GUID for my intended COM server manually, copy it and use that # for the server from then on in? Therefore, when I distribute the application the other users will use the same GUID I created during development.
A new GUID each time the application or COM server object is initialized?
A new GUID on a per computer basis, only once during the initial setup then have the app save the GUID # and on future loads it pulls that # from the users setup file?
Example Scenario 1:
i) print(pythoncom.CreateGuid()) #in interpreter
ii) _reg_clsid_ = copy above GUID into your app
Example Scenario 2:
i)_reg_clsid_ = pythoncom.CreateGuid()
Example Scenario 3:
if self.isfile = os.path.isfile(url):
load_previous_generated_GUID(url)
else:
#first time running application or setup file is missing
GUID = pythoncom.CreateGuid()
save_GUID_to_setup_file(GUID)
Can I use GUID’s for tracking program/COM server versions?
If scenario #1 above is correct then: When I make an upgrade I can test for the old GUID so I can interact with it correctly?
TODO: How do I get the GUID of a COM server from Python and/or VBA?