[python-win32] Calling (D)COM Server from another PC

Jens B. Jorgensen jens.jorgensen at tallan.com
Mon Jun 21 11:00:04 EDT 2004


I have a bit of experience with this and I can tell you you're in for 
some fun. When I was doing something like this (not controlling IE but 
rather my own COM object) I found that if a COM object has a 
InprocServer32 entry on the machine you're running this on then your 
attempt to create an instance on a remote machine will succeed but in 
fact instead an instance is created on the local machine. In order to 
convince COM to actually create an instance on the remote machine you'd 
have to remove the InprocServer32 entry. This was my experience anyway.

Note that this has nothing to do with anything wrong with Python or 
anything like that. The code I was working with was in C++. If you 
haven't already done it you need to go out and get yourself a copy of 
Don Box' "Essential COM" 
<http://www.amazon.com/exec/obidos/tg/detail/-/0201634465/qid=1087829698/sr=1-2/ref=sr_1_2/102-5830482-8566539?v=glance&s=books>: 
The title ain't just kiddin'. For the kind of stuff you're talking about 
doing you'll need this level of understanding. The next thing you're 
probably going to find is that getting the permissions set such that you 
can create a graphical application on the logged-in user's desktop will 
be even more interesting. There's all sorts of security stuff that has 
to be in line for this kind of thing to happen.


Christian Junker wrote:

>Hello together,
>this question might be foolish, but after quite some search I could not find
>how to make use of DCOM with the current win32com package.
>I tested out the DispatchEx which takes as its second parameter a 'machine',
>probably either the hostname or the IP. I tried to invoke methods of the
>Internet Explorer on other PCs in the network, and actually it worked (no
>exception thrown), but on the target machine no changes could be seen
>(IE.Visible=1 would make a IE Window visible but it didn't do anything on
>the other pc).
>So does someone of you know how to make use of DCOM, ie calling COM or OLE
>objects on other PCs.
>
>Thanks in advance.
>
>Best regards
>Christian
>
>
>
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32
>  
>


-- 
Jens B. Jorgensen
jens.jorgensen at tallan.com

"With a focused commitment to our clients and our people, we deliver value through customized technology solutions"  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20040621/9813a5d2/attachment-0001.html


More information about the Python-win32 mailing list