But wouldn't you have to tie the resulting prototype to an instance of the object in question rather than leave it as a generic 'class' prototype? The first (unseen) parameter to interface methods is always a pointer to the object itself (*self or *this etc.) and so I cannot see how a 'method prototype' can exist outside of an instance of the class. In which case, such a thing would seem rather pointless.
You can try something like the following, although I am far from convinced that it will work

:
Code: Select all
Interface IADsPropertyList
QueryInterface(a, b)
AddRef()
Release()
GetTypeInfoCount(a)
GetTypeInfo(a, b, c)
GetIDsOfNames(a, b, c, d, e)
Invoke(a, b, c, d, e, f, g, h)
get_PropertyCount(a)
Next(a)
Skip(a)
Reset()
Item(a.p-variant, b)
GetPropertyItem(a.p-bstr, b, c)
PutPropertyItem(a.p-variant)
ResetPropertyItem(a.p-variant)
PurgePropertyList()
EndInterface
Prototype _invoke(*self.IADsPropertyList, a, b, c, d, e, f, g, h)
test.IADsPropertyList
CoCreateInstance_(...blah blah..., @test)
Define Invoke._invoke = PeekL(PeekL(test)+OffsetOf(IADsPropertyList\Invoke()))
Invoke(test, a, b, ... blah blah)
I may look like a mule, but I'm not a complete ass.