Gerdus van Zyl wrote:
> Thanks to this post
> http://www.neowin.net/forum/index.php?s=6352ade29ce66f2b51506c64e455d2f4&showtopic=716968&st=0&p=590434472&#entry590434472
>
> I got the idl that I could convert to a typelib and then use
> cc.GetModule("taskbar.tlb");
>
> The only trouble is you have to specify the
> import comtypes.gen.TaskbarLib as tbl
> taskbar 
> =cc.CreateObject("{56FDF344-FD6D-11d0-958A-006097C9A090}",interface=tbl.ITaskbarList3)
>
> instead of just:
> taskbar = tbl.TaskbarList()
>
> because the typelib from the IDL is missing, I am assuming it comes
> with the Win7 SDK. This is a problem since I would have to ship the
> generated interface if I decide to use this code.
>   

The IDL ships with the Win 7 SDK.  The typelib does not.

You should be able to ship a copy of TaskbarLib with your project. 
Further, you could modify it to include the CLSID_TaskbarList constant
so you don't have to embed the GUID every time.

> Anyway I'm guessing/hoping there will be Windows 7 support in a future
> version of win32com :-)
>   

Comtypes is not part of win32com.  Further, win32com does not include
implementations for every conceivable COM object in the system.

Indeed, the code you have there is very similar to what the equivalent
C++ code would look like for this task.  The only difference is that I
would be able to use CLSID_TaskbarList instead of "{56FDF344-...}".

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to