[python-win32] COM object has been seperated from its underlying RCW cannot be used.

2005-11-08 Thread Amit Upadhyay
Hi,I am getting a crash with message: "COM object has been seperated from its underlying RCW cannot be used.", when using a COM server written in win32com and being accessed by .NET client. I have win2k-sp3 on that machine, and its not very reproducable. I get no results on msdn about this message,

[python-win32] Bug in pythoncom.CoInitialize(Ex)

2005-11-08 Thread Mark Hammond
There is a subtle bug in CoInitialize and CoInitializeEx. I'd like some feedback on how to best fix it. The problem is that error results from these functions are not reported correctly. This is best demonstrated by example: --- coinit.py --- import thread, time import pythoncom def wtf():

Re: [python-win32] com error

2005-11-08 Thread Michael Johnstone
--- Mark Hammond <[EMAIL PROTECTED]> wrote: > > Hi Mark > > > > Not sure if I got what you suggested correct. The > > method I am trying to use is defined as: > > > > def SyncWrite(self, > NumItems=defaultNamedNotOptArg, > > ServerHandles=defaultNamedNotOptArg, > > Values=defaultNamedNotOptArg),

Re: [python-win32] com error

2005-11-08 Thread Mark Hammond
> Hi Mark > > Not sure if I got what you suggested correct. The > method I am trying to use is defined as: > > def SyncWrite(self, NumItems=defaultNamedNotOptArg, > ServerHandles=defaultNamedNotOptArg, > Values=defaultNamedNotOptArg), > Errors=pythoncom.Missing): There appears to be an extra close

Re: [python-win32] com error

2005-11-08 Thread Michael Johnstone
--- Mark Hammond <[EMAIL PROTECTED]> wrote: > > > "C:\Python22\Lib\site-packages\win32com\client\__init__.py", > > line 446, in _ApplyTypes_ > > return self._get_good_object_( > > com_error: (-2147352567, 'Exception occurred.', > (0, > > None, None, None, 0, -2147024809), None) > > The secon

Re: [python-win32] Reading custom output parameters fromLabVIEW/Acti veX

2005-11-08 Thread Mark Hammond
> So the new question is: how do you create a 1D array of variants > in python? > >From what I've read this is normally handled behind the scenes by > PythonCom...? That's correct - just pass a list or tuple. However, that is rarely the complete answer - what *type* of variant should be in the ar

Re: [python-win32] com error

2005-11-08 Thread Michael Johnstone
--- Graham Bloice <[EMAIL PROTECTED]> wrote: > > Traceback (most recent call last): > > File > > > "C:\Python22\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > > line 310, in RunScript > > exec codeObject in __main__.__dict__ > > File > > > "C:\Deneb\BHSS\Projects\AKL_0502\

[python-win32] Reading custom output parameters from LabVIEW/Acti veX

2005-11-08 Thread Ola Rylow
By using pythoncom.Missing, which I read about in another thread, I got a LabVIEW error message instead: return self._get_good_object_( pywintypes.com_error: (-2147352567, 'Exception occurred.', (5002, 'LabVIEW', 'LabVIEW : paramVals type mismatch. Expected 1D array of variants.', None, 0, 0),

Re: [python-win32] com error

2005-11-08 Thread Graham Bloice
> Traceback (most recent call last): > File > "C:\Python22\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File > "C:\Deneb\BHSS\Projects\AKL_0502\VC\PythonApplications\OPCWriteTestor.py", > line 103, in ? >