<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in1 = 15<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inout1 = 99<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hr= self.object.Method3( in1, inout1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp;= -41 inout1= -31"&nbsp; if I execute the VBA code:</P>
<P>Sub TestPippo()<BR>&nbsp;&nbsp;&nbsp; Dim obj As Pippo<BR>&nbsp;&nbsp;&nbsp; Dim in1 As Long<BR>&nbsp;&nbsp;&nbsp; Dim inout1 As Long</P>
<P>&nbsp;&nbsp;&nbsp; Set obj = CreateObject("Python.Test.Pippo")<BR>&nbsp;&nbsp;&nbsp; in1 = 1<BR>&nbsp;&nbsp;&nbsp; inout1 = 2<BR>&nbsp;&nbsp;&nbsp; retval = obj.Method3(in1, inout1)<BR>&nbsp;&nbsp;&nbsp; MsgBox ("retval = " &amp; retval &amp; " inout1 = " &amp; inout1)<BR>&nbsp;&nbsp; <BR>End Sub<BR></P>
<P>Is there a way to call the same Python Server Method, Method3,&nbsp;so that both Python and VBA receive the same return data?</P></BODY>