Hi,

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):

>>> from win32com.client import gencache
>>> file = 'C:\Shoaev\dev_qxdm\mylog.isf'
>>> mod = gencache.GetModuleForProgID('DMCoreAutomation.ItemStoreFiles')
>>> ds = mod.Dispatch('DMCoreAutomation.ItemStoreFiles')
>>> ds
<COMObject DMCoreAutomation.ItemStoreFiles>
>>> ss = mod.IItemStoreFiles(ds)
>>> ss
<win32com.gen_py.57E95830-6C61-4EB4-B18D-B3CE87313C28x0x1x0.IItemStoreFiles
instance at 0x18300760>
>>> hisf = ss.LoadItemStore(file)
>>> dc = ss.GetItem(hisf, 497)
>>> dc
<COMObject GetItem>
>>> sc = mod.IColorItem(dc)
>>> sc
<win32com.gen_py.57E95830-6C61-4EB4-B18D-B3CE87313C28x0x1x0.IColorItem
instance at 0x18670816>
>>> sc.GetItemKeyText()
u'[0x1007/017]'
>>> df = sc.GetItemFields()
>>> df
>>>

df here is None. Other IColorItem methods work correctly.

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), (),) is
returning None


Any idea what is going on?

Thanks,
Shoaev

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to