Typelib marshalling BSTRs
mike at theoretic.com
Sun Jul 20 06:38:45 CDT 2003
> Sorry for the late answer, I've been busy attending debconf3...
Ah, no problem, I hope it was good :)
> IDispatch should not be marshalled by the typelib marshaller, the method
> arguments it use cannot be represented by a typelib, as you've seen. The
> MIDL code in oaidl_p.c must be used instead. You need to change the
> registry to use the right marshaller, I think the necessary
> winedefault.reg changes were included in my patch, but I'm not sure.
There were some changes yes, it seems for some reason they are not being
used. I will double check. I probably simply forgot to remerge the
default registry, thinking about it. My mind wasn't very clear on
anything by friday :)
> That should be the same thing. In expressions, the compiler will treat
> an array variable as a pointer to its first element. This feature has
> always been in C (and have been useful for no ends of code obfuscation
> tricks, as well as numerous novice-programmer bugs). In my opinion,
> &args is more unredable than just using args, so the latter is my
> preferred style. But I'm not sure what you thought it meant?
In Delphi/Object Pascal passing an array like that would perform a copy
by value, not pass the address. I (wrongly) assumed C would have similar
rules. This is what I get for learning it as I go :)
More information about the wine-devel