Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-18 Thread Dave Calkins
On 12/17/2012 8:25 PM, Mark Hammond wrote: So after running makepy, a work-around is: klass=win32com.client.gencache.GetClassForProgID(MyApp.Application) x = klass() x.GetSettingValue(foo) u'foo=testValue123' I tried the work-around. I've run MakePy and then gave the above a try. The

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-17 Thread Dave Calkins
On 12/16/2012 6:17 PM, Mark Hammond wrote: I'm the vendor of the object :) As I mentioned, I just created this small test app which reproduces the issue having just those 3 simple methods. However, I'm not able to talk to it via Python. Is the source to this available? Yes, its just a

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-17 Thread Dave Calkins
On 12/17/2012 8:25 PM, Mark Hammond wrote: Dave sent me the source via email. The root problem is that the MFC project is not supporting the GetTypeInfo() and associated calls, and TBH I'm not sure how hard it would be to make it support that. The end result is that the makepy support for

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-16 Thread Dave Calkins
On 12/16/2012 12:46 AM, Mark Hammond wrote: That's very strange. pywin32 *will* be passing a second param - a byref bstr. byref params do work in general, so you might need to contact the vendor of the object for help. Cheers, Mark I'm the vendor of the object :) As I mentioned, I just

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-14 Thread Dave Calkins
On 12/13/2012 10:39 PM, Mark Hammond wrote: This is the form you should use, but the method name you are trying to call is GetSettingValue, not GetSettingName, hence the AttributeError. Mark Ah, yes. Good catch! Unfortunately, correcting that typo didn't seem to fix it. Here's what I

[python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-12 Thread Dave Calkins
I'd like to be able to call an OLE Automation (IDispatch) server from python to automate an existing application. I'm not at liberty to change the existing automation interface provided by the application so I need to get it to work with what the app currently exposes. The interface I'm