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,
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():
--- 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),
> 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
--- 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
> 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
--- 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\
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),
> 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 ?
>