takeshi ikeya wrote: > Thank you Tom. > I tried 'EnsureDispatch()' following your advice. > ... > pywintypes.com_error: (-2147467262, 'Inteface is not supported', None, > None) > > Same error occured on 'Shell.Autoplay'. And so on my 'SMIEngine.SMIhost'.
Not every COM object was intended to be used by the "general public". There is no public definition that corresponds to the class ID for Shell.Autoplay. > Then I went tolaunch 'makepy.py' > I was asked to 'Select library' > But what is this 'library' mean ? > Nothin like 'Shell.autoplay' or 'SMIEngine'. > > Sorry I'm not familiar with COM. Well, that's a problem, if you plan to use COM objects. It is worthwhile to do a little reading about COM basics. In order to use a COM object, somehow your application has to learn what functions that object provides, and what parameters each function expects. You can't just make that up. That can be done in three basic ways. (1) If the object was designed only to be used from C++, you might have a C++ header file that describes the object. (2) If the object was designed for "late binding", it will support the IDispatch interface. (3) If the object was designed for "early binding", there will be a "type library" that includes all of the definitions. A type library contains a collection of COM class definitions and interface definitions in a partly compiled form. That's what makepy.py wants. When you installed the SMI product, it registered its objects. If it also registered its type library, you can use that to build the Python interface. Note that the name of a type library often includes the manufacturer, so look for "Animatics SMIEngine". Animatics says on their web site that the SMIEngine interface works with Python. Have you considered contacting them for support? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32