views:

51

answers:

1

I am using python for making a COM local server. In fact, the whole COM part is implemented in a dll and my python script is calling that dll thanks to ctypes. It works ok when I run the script manually.

I would like to see my server automatically ran when a COM client request it. I know that it is possible by giving the command line as value of the LocalServer32 registry key.

Unfortunatelly, I can't manage to see windows running my python script properly. I've tried to use python and pythonw with a similar problems. It seems that windows is adding a "-Embedding" flag to the command line and I guess that it can be a problem for python.

Any ideas?

Does anybody how to avoid the "-Embedding" flag in the command line?

A: 

The "-embedding" flag is added by COM automatically, the purpose of which is so that the server application can parse this flag to determine that it was run by COM.

COM appends the "-Embedding" flag to the string, so the application that uses flags will need to parse the whole string and check for the -Embedding flag. The following code example shows the setting for this value.

You will need to handle this in your server code.

1800 INFORMATION
The "-Embedding" flag was badly handled by my script. It works ok now. Thanks for your help
luc