win32com.client.pythoncom.CoCreateInstance
musingattheruins at my-deja.com
musingattheruins at my-deja.com
Wed Aug 2 12:22:27 EDT 2000
does anyone have any idea why this does not work? i am trying to get a
handle to the IShellLinkA interface that will allow me to create
shortcuts but the COM code seems to have a problem.
any help would be greatly appreciated!
import win32com.client, pywintypes
#win32com.client.pythoncom.CoInitialize()
CLSID_ShellLink = pywintypes.IID("{00021401-0000-0000-C000-
000000000046}")
iShellLink = pywintypes.IID("{000214EE-0000-0000-C000-
000000000046}")
create_as = win32com.client.pythoncom.CLSCTX_INPROC_SERVER
i = win32com.client.pythoncom.CoCreateInstance(CLSID_ShellLink, None,
create_as, iShellLink)
here is the error that it returns...
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: There is no interface object registered that supports this
IID
the registry lists both of these guids and the shell32.dll exists; i
can create shortcuts manually.
thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list