[python-win32] Strange message pump behavior

2006-03-17 Thread Sumeet Sobti
Hi, I have a very simple, single-threaded COM client program. I use COM objects created by a third-party software. I use win32com to do all COM-related processing in my program. In my program, I create a few COM objects, some of which are supposed to periodically receive events. So, I have a mes

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

2006-02-09 Thread Sumeet Sobti
--- Mark Hammond <[EMAIL PROTECTED]> wrote: > > STDMETHODIMP CTTOrderSelector::AddTest(LPCSTR > > lpProperty, VARIANT vValue) > > > > LPCSTR is not a valid COM type, but somehow it is > > correctly handled in C#. The authors claim that > their > > C# client code has been tested and is known to >

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

2006-02-07 Thread Sumeet Sobti
Hi, The authors of the COM object say that the failing AddTest() method takes in an LPCSTR as its first argument and a Variant as the second argument. STDMETHODIMP CTTOrderSelector::AddTest(LPCSTR lpProperty, VARIANT vValue) LPCSTR is not a valid COM type, but somehow it is correctly handled in

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

2006-02-07 Thread Sumeet Sobti
--- Mark Hammond <[EMAIL PROTECTED]> wrote: > At this stage the problem is more confusion as to > exactly what is happening. > My understanding is: > > * Their type-library defines that method as having a > variant type of > VT_LPSTR. > * Microsoft declares in wtypes.h that VT_LPSTR is > valid i

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

2006-02-06 Thread Sumeet Sobti
I tried the "late-bound" mode (by deleting all the generated files in the gen_py directory). It still gives me the same TypeError. >>> obj.AddTest('IsBuy', True) Traceback (most recent call last): File "", line 1, in ? File "", line 2, in AddTest TypeError: The VARIANT type is unknown (

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

2006-02-06 Thread Sumeet Sobti
--- Mark Hammond <[EMAIL PROTECTED]> wrote: > > > > Does the error above show with some certainty that > > it's a problem with the COM object? > > Sadly it doesn't demonstrate much with any > certainty! Humm... Is there a way to debug the python side more carefully? E.g., using a lower-level in

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

2006-02-06 Thread Sumeet Sobti
Hi, > > - - - - - - - - > > 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

[python-win32] Problem passing a VARIANT argument to a method of a COM object

2006-02-03 Thread Sumeet Sobti
Hi everyone, 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) Here's what I am trying to execute: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Python 2.