<HEAD>
<STYLE>body{font-family: Geneva,Arial,Helvetica,sans-serif;font-size:9pt;background-color: #ffffff;color: black;}</STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.19190"></HEAD>
<BODY id=compText>
<P>I am trying to write a Python server that will be used by a C++ client. It has taken me quite a while longer than I expected. I have been through the archives and that helped me get to where I am. Many thanks to all those who support these packages.<BR><BR>I am using Python 2.5.1 as it is required by some vendor equipment that I must use.<BR><BR>One of the reasons it took me a while to get this going was that I was trying to test it in Python. Once I switched to testing it in VBA then I made much faster progress.<BR><BR>For demonstration purposes I used the Pippo test in the 'win32com\test' directory. I modified the testpippo.py by adding some code at the start of the testLeaks method. I added the 4 lines:<BR><BR> in1 = 15<BR> inout1 = 99<BR> hr= self.object.Method3( in1, inout1)<BR> print hr, "retval = %d inout1 = %d"%(hr[0], hr[1])<BR></P>
<P>The printed line was "(0, -31) retval = 0 inout1 = -31".</P>
<P><BR>I get "retval = -41 inout1= -31" if I execute the VBA code:</P>
<P>Sub TestPippo()<BR> Dim obj As Pippo<BR> Dim in1 As Long<BR> Dim inout1 As Long</P>
<P> Set obj = CreateObject("Python.Test.Pippo")<BR> in1 = 1<BR> inout1 = 2<BR> retval = obj.Method3(in1, inout1)<BR> MsgBox ("retval = " & retval & " inout1 = " & inout1)<BR> <BR>End Sub<BR></P>
<P>Is there a way to call the same Python Server Method, Method3, so that both Python and VBA receive the same return data?</P></BODY>