<font face="courier new,monospace"><span class="Apple-style-span" style="font-family: arial; ">On Fri, Apr 9, 2010 at 11:05 PM, Greg Antal <span dir="ltr"><<a href="mailto:greg.antal@ata-e.com">greg.antal@ata-e.com</a>></span> wrote:</span></font><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000">
The beauty of using the early binding file is that you don't have to
use all that Dispatch syntax because the file does that for you. I
don't know what you named this file, but let's say you call it
"PyMemtool.py". Now your code just looks like this:<br>
<br>
<tt>import PyMemtool<br>
<br>
fm = PyMemtool.SMTMemtool()<br>
fs = fm.GetFlashModByName("MyFM")</tt></div></blockquote><div><br></div><div>Ahh ok yes ... makes sence. I was looking for some documentation and found a <a href="http://www.oreilly.de/catalog/pythonwin32/chapter/ch12.html">snipplet</a> of "Python Programming on Win32" by Mark Hammond & Andy Robinson witch states, I thought, that the early binding files are just some kind of a "cache file" ... </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000">
That should be all you have to do, but looking at your file I think
you'll also have to add an explicit type cast to the class you want:<br>
<br>
<tt>fs </tt><tt>= PyMemtool.DISMTFlashMod (</tt><tt>fs</tt><tt>)</tt></div></blockquote><div><br></div><div>OK so I can't make my own FlashMod Object, instead I use the SMTMemtool Object to create one. But why do the type cast? After the casting the <b>fs</b> object is no longer a "<b>CoClassBaseClass</b>" it's now a "<b>DispatchBaseClass</b>", am I right?</div>
<div> </div>Hmm it's not that easy finding good documentation for Python-win32! A lot of the stuff I found seems to be rather old and maybe outdated ... Is there some must read documentation about the Python-Win32-COM Stuff out there you can recommend?<br>
<div><br></div><div>- Markus</div></div>