> Ok, I downloaded that project, and stripped out the TLB. I then got comtypes > and was able to use comtypes.client.GetModule to generate the typelib wrapper > module for it: > > >>> GetModule("progdlg.tlb") > <module 'comtypes.gen.VBProgressDialog' from > 'C:\Python25\lib\site-packages\comtypes\gen\_2F2719A2_83CC_11D3_A08C_0040F6A4BFEC_0_1_1.pyc'> > >>> import comtypes.gen.VBProgressDialog > > Now I can't seem to figure out what to do. There are three classes generated: > > class IOleWindow(comtypes.IUnknown) > class IProgressDialog(comtypes.IUnknown) > class ProgressDialog(comtypes.CoClass) > > Instantiating IProgressDialog() seems to give me an instance that has the > methods that I'm looking for (at least they show up in Idle as callable > methods), but when I try to call one I get the following message: > > Traceback (most recent call last): > File "<pyshell#20>", line 1, in <module> > b.SetTitle('test') > TypeError: Expected a COM this pointer as first argument > > Sorry to be so dense, I'm still learning the COM stuff. > > Thanks in advance. > Larry > > Test program: > > import comtypes.client.GetModule > GetModule('progdlg.tlb') > import comtypes.gen.VBProgressDialog > ci=comtypes.gen.VBProgressDialog > a=ci.ProgressDialog() > a.SetTitle('test')
I will look into that, but not before Monday or Tuesday. Thanks, Thomas _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32