Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #34607

Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params"

From Paul Kölle <paul@subsignal.org>
Subject Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params"
Date 2012-12-11 09:42 +0100
References <38a14001-82b6-4a91-b3ad-2cb5c8ee580d@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.716.1355215375.29569.python-list@python.org> (permalink)

Show all headers | View raw


Hi,

Am 10.12.2012 20:13, schrieb bitbucket:
> I have an existing Windows application which provides an OLE
> Automation (IDispatch) interface.  I'm not able to change that
> interface.  I'd like to call it from a scripting language.  I figure
> this would provide a nice quick way to invoke on the app.
>
> I initially tried this with Windows Powershell but ran into the
> following problem.  I was able to create the object and invoke simple
> methods on it.  However the interface for this app has methods which
> take out params.  i.e. you pass in a reference to a variable and the
> server fills in the value.  I couldn't get that to work.  I finally
> gave up and decided it was just a limitation of Powershell, not being
> able to work with those out params.

[snipp]
Before switching technologies I'd check if this solves your problem 
http://geekswithblogs.net/Lance/archive/2009/01/14/pass-by-reference-parameters-in-powershell.aspx 


TL;DR IMHO "out" parameters are basically pointers (pass by reference) 
and need to be passed like GetSettingValue("name", [ref]$value)...

cheers
  Paul

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-10 11:13 -0800
  Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" Terry Reedy <tjreedy@udel.edu> - 2012-12-10 15:58 -0500
    Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-10 13:39 -0800
      Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-12-10 18:39 -0500
      Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" Mark Hammond <skippy.hammond@gmail.com> - 2012-12-11 12:16 +1100
        Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-11 07:48 -0800
          Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-11 07:54 -0800
          Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-11 07:54 -0800
          Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" Mark Hammond <mhammond@skippinet.com.au> - 2012-12-12 08:55 +1100
        Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-11 07:48 -0800
    Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-10 13:39 -0800
  Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" Paul Kölle <paul@subsignal.org> - 2012-12-11 09:42 +0100
    Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-11 07:37 -0800
    Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" bitbucket <coder1024@gmail.com> - 2012-12-11 07:37 -0800

csiph-web