Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-30 Thread Mark Hammond
> ... > if type(retVal) == types.TupleType: # Like pythoncom, we special case a tuple. > # However, if they want to return a specific HRESULT, > # then they have to return all of the out arguments > # AND the HRESULT. > if len(retVal) == len(meth._gw_out_args

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-19 Thread Smith, Brian (CR)
Yup, still trying to figure this one out but I've got a little bit more information. To summarise:  I created a Python COM Server to be used by Visual Basicand found an issue with in/out parameters because of the lack of typeinformation.  To fix this, I created a type library but this led to

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-11 Thread Smith, Brian (CR)
> My platform is Win XP Pro (SP2), Python 2.3.4, pywin Build 210.  I'm testing> using VBA in MS Excel 2000.  A bit more info...   I wanted to eliminate the older version of VBA as a possible source of the problem so I downloaded Visual Basic 2005 Express Edition and tried the same VB co

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-05 Thread Smith, Brian (CR)
Hi Mark,> > 2) VBA was giving me an error like "Expecting 3 return values, got: 2"> > whenever a function contained an [in, out] parameter.  It looks like the> > extra parameter it is looking for is the HRESULT signifying the success of>> There should be no need to return a HRESULT - but not

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-04 Thread Mark Hammond
> 2) VBA was giving me an error like "Expecting 3 return values, got: 2" > whenever a function contained an [in, out] parameter. It looks like the > extra parameter it is looking for is the HRESULT signifying the success of There should be no need to return a HRESULT - but note that the nominated

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-04 Thread Smith, Brian (CR)
> > After doing some searching on the web, I had (naively?) thought perhaps> > the answer might be creating a type library that defines the interface.> > ...> > Am I going down the wrong path with this or would it actually help?> > I don't honestly know.  I'm dubious that it will help, becau

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-03 Thread Tim Roberts
Smith, Brian (CR) wrote: > > After doing some searching on the web, I had (naively?) thought perhaps > the answer might be creating a type library that defines the interface. > I had gone as far as installing the Windows Platform SDK so I could use > midl to compile the library, but ran into a p

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-03 Thread Smith, Brian (CR)
Hi Tim,   Thanks for the response.   > Tell the VBA programmer "Don't do that".  Or, rearrange the parameters> so that the inout arguments are always first. Okay, I was afraid that would be the answer.  I don't particularly like the first option because simply telling someone not to do somet

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-02 Thread Tim Roberts
Smith, Brian (CR) wrote: >> > > I am new to COM programming and have a question about function > > parameters when implementing a COM object in Python. > > > > After reading "Python Programming on Win32", I have managed to create a > > working COM object, where "working" is defined as "I can use i

Re: [python-win32] Input-only vs. In/Out Function Parameters

2006-10-02 Thread Smith, Brian (CR)
Title: Input-only vs. In/Out Function Parameters Hi,   Just thought I'd bump this to see if I could get a response...   Brian   > > I am new to COM programming and have a question about function > parameters when implementing a COM object in Python. > > After reading "Python Programming on Wi

[python-win32] Input-only vs. In/Out Function Parameters

2006-09-28 Thread Smith, Brian (CR)
Title: Input-only vs. In/Out Function Parameters Hello, I am new to COM programming and have a question about function parameters when implementing a COM object in Python. After reading "Python Programming on Win32", I have managed to create a working COM object, where "working" is defined