You can't just use a static class factory for all the classes.
There's no need for GetIDispatchForObject when we already have GetIUnknownForObject (and all you use is QueryInterface).
+ res = RegGetValueA( key, NULL, "Class", RRF_RT_REG_SZ, NULL, classname, &dwBufLen); We should probably use a W function here and convert to utf8, rather than assume that's the default encoding.
Hi Vincent,
On 11/01/2012 5:13 PM, Vincent Povirk wrote:
You can't just use a static class factory for all the classes.
There's no need for GetIDispatchForObject when we already have GetIUnknownForObject (and all you use is QueryInterface).
I found if you used GetIUnknownForObject and then queried for the IDispatch interface, mono returned E_NOINTERFACE. Maybe this is a bug with mono.
- res = RegGetValueA( key, NULL, "Class", RRF_RT_REG_SZ, NULL,
classname,&dwBufLen); We should probably use a W function here and convert to utf8, rather than assume that's the default encoding.
I'll give it a go.
Best Regards Alistair Leslie-Hughes
I found if you used GetIUnknownForObject and then queried for the IDispatch interface, mono returned E_NOINTERFACE. Maybe this is a bug with mono.
If that's true, using IDispatch instead of IUnknown is probably not an acceptable work-around, as we don't know how that works when a class explicitly implements a non-IDispatch interface that the caller requests. It sounds like a mono bug to me, but it needs a testcase.