win32, COM, and Solidworks (again) - Still Trying
Mark Hammond
mhammond at skippinet.com.au
Thu Aug 7 07:08:21 EDT 2003
Markus Wankus wrote:
> Hmmm...'Not Implemented'. Because this fails, I can't obtain the CLSID
> of itself, thus it can't use the makepy generated code to bind itself
> properly. I always get back dumb CDispatch objects. I have been trying
> to hack a way of getting the CLSID of the dispatch object, but it just
> isn't there.
>
> Anyway - if anyone reading this knows anything about what I am talking
> about, your help would be greatly appreciated.
You should use code similar to:
mod = gencache.EnsureModule("...", ...)
ob = Dispatch("Whatever.Object")
# ob now "dumb dispatch", but should be object "foo"
# in the gencache module
# Explicitly convert ob to one of these object.
ob = mod.Foo(ob)
Mark.
More information about the Python-list
mailing list