[python-win32] PythonService.exe and Windows Server 2003

2006-02-04 Thread mark mclarnon
I have a class which was configured to start as a service (using an external PY file) under Windows 2000 Server. It started/stopped just fine on Win2k but when trying to start it on Windows 2003 Server I get an error that reports a message like the stub recieved bad data. 
I can start this class manually from the command line but obviously I want it to start as a service. I didnt record the error code that was associated with the message but was wondering, has anyone had problems with 
PythonService.exe and Windows 2003 Server?I was running ActiveState Python 2.4.1 and upgraded to 2.4.2 yesterday but that did not help the issue. I even manaully upgraded the pywin32 package also to no avail.
Mark
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Problem passing a VARIANT argument to a method of aCOM object

2006-02-04 Thread Mark Hammond
 I am struggling with a problem related to passing a
 VARIANT argument to a COM object.

 I am getting this exception:

 TypeError: The VARIANT type is unknown (001e)

Hmmm - I guess that is a bug in pywin32 - that variant type *is* valid in a
TYPEDESC, so pywin32 probably should convert that during the makepy process.

 The makepy generated code-snippet is this:

 - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - - - - - - - -
   def AddTest(self, lpProperty=defaultNamedNotOptArg,
 vValue=defaultNamedNotOptArg):
   method AddTest
   return self._oleobj_.InvokeTypes(4, LCID, 1, (24,
 0), ((30, 1), (12, 1)),lpProperty, vValue)

Can you please try changing the 30 there to 8 (ie, changing from VT_LPSTR to
VT_BSTR) and let me know if it works?

Actually, better yet - if it *does* work, please open a new pywin32 bug at
sourceforge.  If it *doesn't* work it may point at an error in the COM
object.

 What does the above exception really mean? Regardless
 of what I pass as the second argument, I get the same
 exception message.
 It just complains about unknown type 001e, which
 probably corresponds to VT_LPSTR. But, why is it
 trying to convert True to a VT_LPSTR?!

It is the first string arg that is causing the problem.

Thanks,

Mark.

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32