I'm encountering an issue where the InvokeTypes method is returning
None and I'm unable to Dispatch a particular COM object from
DMCoreAutomatio n.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 DMCoreAutomatio n.ItemStoreFile s>>>from win32com.client import gencache
file = 'C:\Shoaev\dev_ qxdm\mylog.isf'
mod = gencache.GetMod uleForProgID('D MCoreAutomation .ItemStoreFiles ')
ds = mod.Dispatch('D MCoreAutomation .ItemStoreFiles ')
ds
<win32com.gen_p y.57E95830-6C61-4EB4-B18D-B3CE87313C28x0x 1x0.IItemStoreF iles>>ss = mod.IItemStoreF iles(ds)
ss
instance at 0x18300760>
<COMObject GetItem>>>hisf = ss.LoadItemStor e(file)
dc = ss.GetItem(hisf , 497)
dc
<win32com.gen_p y.57E95830-6C61-4EB4-B18D-B3CE87313C28x0x 1x0.IColorItem>>sc = mod.IColorItem( dc)
sc
instance at 0x18670816>
u'[0x1007/017]'>>sc.GetItemKey Text()
df here is None. Other IColorItem methods work correctly.>>df = sc.GetItemField s()
df
Here is the relevant bit from the makepy generated code:
def GetItemFields(s elf):
"""Get (DB parsed) item fields (returns DB parsed field interface)"""
ret = self._oleobj_.I nvokeTypes(414, LCID, 1, (9, 0), (),)
if ret is not None:
ret = Dispatch(ret, 'GetItemFields' , None, UnicodeToString =0)
return ret
>From pdb, self._oleobj_.I nvokeTypes(414, LCID, 1, (9, 0), (),) isreturning None
Any idea what is going on?
Thanks,
Shoaev