About Pywin32's invoke

K

kernel1983

By reading the doc of pywin32

we can invoke COM like:

o = win32com.client.Dispatch("Excel.Application")


but is it possible to invoke some GUID directly?



If COM was going to be invoked by python, must it support IDispatch?
 
R

Roger Upole

kernel1983 said:
By reading the doc of pywin32

we can invoke COM like:

o = win32com.client.Dispatch("Excel.Application")


but is it possible to invoke some GUID directly?

Yes, you can do something like
win32com.client.Dispatch('{00024500-0000-0000-C000-000000000046}')
If COM was going to be invoked by python, must it support IDispatch?

Not neccessarily. Pythoncom has compiled-in support for many interfaces
that don't inherit from IDispatch, but it requires that someone write code
to wrap the interface.

Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,269
Latest member
vinaykumar_nevatia23

Latest Threads

Top