Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pointers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'reference)': 0.09; 'scripting': 0.09; 'url:archive': 0.09; 'subject:python': 0.11; 'received:141': 0.13; 'value.': 0.15; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:accessing': 0.16; 'subject:which': 0.16; 'basically': 0.17; 'windows': 0.19; 'app': 0.19; 'variable': 0.20; 'parameters': 0.20; 'subject:) ': 0.20; "i'd": 0.22; 'work.': 0.23; 'cheers': 0.24; 'paul': 0.24; 'pass': 0.25; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'skip:[ 10': 0.26; 'language.': 0.27; 'i.e.': 0.27; 'interface': 0.27; 'header:X-Complaints-To:1': 0.28; 'app.': 0.29; 'invoke': 0.29; "i'm": 0.29; 'initially': 0.30; 'figure': 0.30; 'problem.': 0.32; 'automation': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'hi,': 0.33; 'server': 0.35; 'received:org': 0.36; 'but': 0.36; 'limitation': 0.36; 'subject: (': 0.36; 'being': 0.37; 'passed': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'application': 0.40; 'header:Received:5': 0.40; 'your': 0.60; 'url:aspx': 0.60; 'provide': 0.62; 'decided': 0.65; 'gave': 0.65; 'finally': 0.66; 'url:14': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: =?UTF-8?B?UGF1bCBLw7ZsbGU=?= Subject: Re: accessing an OLE Automation (IDispatch) server from python which requires the use of "out params" Date: Tue, 11 Dec 2012 09:42:35 +0100 References: <38a14001-82b6-4a91-b3ad-2cb5c8ee580d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 141.43.79.246 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <38a14001-82b6-4a91-b3ad-2cb5c8ee580d@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355215375 news.xs4all.nl 6938 [2001:888:2000:d::a6]:54050 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34607 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