On Mon, 2005-06-06 at 11:11 -0500, Robert Shearman wrote:
Exactly. A refptr shouldn't have those extra 4 bytes because it should never be NULL. I would be very surprised if Microsoft have chosen to be inconsistent here.
Refptrs can't be NULL but their contents once de-referenced can be, the problem here is that we have a function like this:
Foo([in] ?? a, [in] ?? b, [out] IBar **bar);
bar is a refptr, it's not NULL. But the contents once dereferenced are (ie, it's returning a null ifptr). We aren't marshalling this correctly at the moment, instead we don't allocate any space in the buffer for the refptr itself and just dereference it. Then when we discover it's NULL, we don't marshal anything (because there's nothing to demarshal) so we lose sync on the receiving end.
thanks -mike