Menu

#714 makepy generates a bad format IID for a vtable function returning an object derived from IDispatch.

v1.0 (example)
open
nobody
None
5
2016-02-07
2016-02-07
David Smith
No

makepy generates a bad format IID for a vtable function returning an object derived from IDispatch.

It generated this line (for example):
(( u'WaitComplete' , u'request' , ), 5, (5, (), [ (16393, 10, None, "IID('{19B26BC8-9E3A-4321-B965-8ECC5F4670A4}')") , ], 1 , 1 , 4 , 0 , 44 , (3, 0, None, None) , 0 , )),

but the IID portion is in double-quotes, so it is a string. When processed by PyWinObject_AsIID, the string cannot be converted into a valid IID and becomes IID_NULL, which then fails when the returned object's QueryInterface is called with IID_NULL.

The bug seems to be in genpy's VTableItem.WriteVTableMap where it writes repr(arg[3]) instead of just arg[3].

This happens in v219 and v220 in Python 2.7, 32-bit.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.