I'm encountering an issue where the InvokeTypes method is returning
None and I'm unable to Dispatch a particular COM object from
DMCoreAutomation.dll. Everything works fine except for method
GetItemFields.
Using Python 2.4.2, pywin32 build 209.
Here is some example code (I can provide full source code if needed):
<COMObject DMCoreAutomation.ItemStoreFiles>>>from win32com.client import gencache
file = 'C:\Shoaev\dev_qxdm\mylog.isf'
mod = gencache.GetModuleForProgID('DMCoreAutomation.Item StoreFiles')
ds = mod.Dispatch('DMCoreAutomation.ItemStoreFiles')
ds
<win32com.gen_py.57E95830-6C61-4EB4-B18D-B3CE87313C28x0x1x0.IItemStoreFiles>>ss = mod.IItemStoreFiles(ds)
ss
instance at 0x18300760>
<COMObject GetItem>>>hisf = ss.LoadItemStore(file)
dc = ss.GetItem(hisf, 497)
dc
<win32com.gen_py.57E95830-6C61-4EB4-B18D-B3CE87313C28x0x1x0.IColorItem>>sc = mod.IColorItem(dc)
sc
instance at 0x18670816>
u'[0x1007/017]'>>sc.GetItemKeyText()
df here is None. Other IColorItem methods work correctly.>>df = sc.GetItemFields()
df
Here is the relevant bit from the makepy generated code:
def GetItemFields(self):
"""Get (DB parsed) item fields (returns DB parsed field interface)"""
ret = self._oleobj_.InvokeTypes(414, LCID, 1, (9, 0), (),)
if ret is not None:
ret = Dispatch(ret, 'GetItemFields', None, UnicodeToString=0)
return ret
>From pdb, self._oleobj_.InvokeTypes(414, LCID, 1, (9, 0), (),) isreturning None
Any idea what is going on?
Thanks,
Shoaev