[python-win32] By-reference COM method arguments not being treated as outputs

Mike Graham mikegraham at gmail.com
Tue Jul 28 16:38:02 CEST 2009


I'm very sorry for all the noise to the list, but being so clueless
about what is going on, I keep stumbling into what is going on.

I am trying to access Dispatch("My
Application").Document.Model.PickObject. _IDualModelItem has the CLSID
'{976FAFC8-96FD-11D4-A09D-0050DA1AC1A8}' and provides the PickObject
method. _IDualStressDoc has the CLSID
'{684A3F63-0408-11D4-A05F-0050DA1AC1A8}', which is the ID for my TLB,
and _IDualStressDoc._prop_map_get_ has the item
    "Model": (6, 2, (9, 0), (), "Model",
'{976FAFC8-96FD-11D4-A09D-0050DA1AC1A8}'),

 _IDualModelItem has the coclass_clsid
{976FAFC9-96FD-11D4-A09D-0050DA1AC1A8}, which is the CLSID of the
class "Model".

I believe this means I'm not suffering from the same issue Greg was,
but I am not sure, in large part because it is difficult to navigate
the way all these constructs fit together.

Mike

On Tue, Jul 28, 2009 at 9:00 AM, Mike Graham<mikegraham at gmail.com> wrote:
> Hi Greg,
>
> Thanks for your reply. I went back through the mailing list archives
> to try to find someone else who had the same problem I did and found
> your posts, but I couldn't quite understand your and Hammond's
> solutions well enough to apply it. Perhaps you or someone else can
> help me understand what's going on better.
>
> You present what looks like an item from a dict:
> "feSelector": (10349, 2, (9, 0), (), "feSelector", None)
> and explain that the None in the tuple should be replaced by the CLSID
> of the class to which "feSelector" belongs.
>
> The method I posted as an example's name does not occur in any dicts.
> It occurs in two places in the generated source. The first is the
> method definition I posted, in which it is part of a class
> _IDualModelItem(DispatchBaseClass) with the member
> CLSID=IID('{976FAFC8-96FD-11D4-A09D-0050DA1AC1A8}'). I am not aware of
> any particular python class from which this should be associated with.
>
> In my definition, I have a tuple that appears to be laid out the same
> as yours, so I tried replacing None with
> '{976FAFC8-96FD-11D4-A09D-0050DA1AC1A8}', but this didn't change
> anything.
>
> The other occurrence is in the list _IDualModelItem_vtables_, where one item is:
>    (( u'PickObject' , u'obj' , u'x' , u'y' , u'z' , u'obj_num' ,
> u'entity_num' , u'tolerance' , u'PType' , ),
>       76,
>       (76, (),
>       [(16387, 3, None, None), (12, 1, None, None), (12, 1, None, None),
>        (12, 1, None, None), (16387, 3, None, None), (16387, 3, None, None),
>        (5, 49, '9.9999997473787516e-06', None), (3, 49, '0', None)],
>       1,
>       1,
>       4,
>       0,
>       332,
>       (3, 0, None, None),
>       0)
>    )
>
> To tell the truth, I have no idea what _IDualModelItem_vtables_ does.
> I think I've examined these as close as I can without disecting the
> win32com.client module itself or finding some documentation (if there
> is documentation of any depth somewhere, I would love a link; I was
> unable to find any.)
>
> Can anyone provide any further insight?
>
> Mike
>


More information about the python-win32 mailing list