Mailing List Archive

makepy not war
I hope this is not too general of a question.

After running makepy.py on a type library, how do I use
the resulting file?

I know how to use win32com.client.Dispatch, and I kinda
sort of know how to use CoCreateInstance, QueryInterface,
etc. with C++.
makepy not war [ In reply to ]
Flbill Blipf writes:

> After running makepy.py on a type library, how do I use
> the resulting file?
>
> I know how to use win32com.client.Dispatch, and I kinda
> sort of know how to use CoCreateInstance, QueryInterface,
> etc. with C++.

You use win32com.client.Dispatch. If he finds you've been bad and
haven't run makepy, he'll use win32com.client.dynamic.Dispatch.
Otherwise he'll use the makepy generated stuff. Either way, you
should never have to CoCreateInstance again.

unless-you-really-want-to-ly y'rs

- Gordon
makepy not war [ In reply to ]
Flbill Blipf wrote in message <375DD2BE.D918CCCE@yahoo.com>...
>I hope this is not too general of a question.
>
>After running makepy.py on a type library, how do I use
>the resulting file?
>
>I know how to use win32com.client.Dispatch, and I kinda
>sort of know how to use CoCreateInstance, QueryInterface,
>etc. with C++.

You should be able to just use "win32com.client.Dispatch", and it will
magically use the makepy support. Print the repr() of a COM object with and
without makepy support, and the difference should be obvious.

If it doesnt, let me know (or search deja-news for discussions about how to
use Notes, which is one that doesnt work correctly)

Mark.