Search code examples
pythonwindowsvbadllcom

How to unregister Python COM server


I'm developing a very simple COM server for educational purpose. I can get it to work but every time i have to change anything (code/logic) , i have to delete every instance of the COM Server Name in the regedit.exe under various headings till it disappears from the PythonWin >> Tools Menu >> Python COM Server Browser.

I have tried the -- unregister command in the Command prompt , it says over there that the com server is unregistered but I can still see in the "Python COM Server Browser".

Moreover, even after deleting all the instances of the COM server from the regedit.exe and re-registering the COM server brings me back to the OLD code instead of the new saved code which i want to run.(i.e new objects won't be detected, etc).

So for each time I make a change, I have to register a new COM server in a new file with a new name.

Can someone please tell me what I'm doing wrong ? Is there any easier way of doing this.


Solution

  • well the -- unregister command works well for unregistering COM objects , but -- debug is more usable in this position , when someone wants to modify the code. Also if you keep getting the Old instance of the COM object just restart the programs , and it'll detect the new changed code.

    The -- debug command will produce results in the PythonWin Trace Collector Windows under Tools Menu.