[webkit-dev] Windows IDL interoperability with non-C languages
ashodnakashian at yahoo.com
Mon Mar 12 05:31:15 PDT 2012
The Windows IDLs utilizes many Windows HANDLE types in their members. These handles are defined as void*, which is an opaque type. This is fine until one tries to import the WebKit COM into VB or a .Net environment only to discover that these handles are wrapped (read: replaced) with _RemotableHandle. The problem is that this makes WebKit COM practically unusable without a lot of plumbing to get around this RemotableHandle type.
A possible solution is to avoid using void* for these handles. There is a "standardized" way to do that, and that's to declare _MIDL_DECLARE_WIREM_HANDLE when invoking MIDL (the IDL compiler) and redefine the Windows handles as integrals. I've already filed a bug and submitted a patch with the workaround.
This works great, at least in .Net. The main concern here is whether this change will break any C/C++ COM consumers. All EWS servers are happy with the patch. Someone more experienced in COM/WebKit might be able to give more insight and hopefully confirm or disprove the incompatibility concerns.
 Here is one reference use of this workaround: http://miranda-gds-v2.googlecode.com/svn/trunk/common/GoogleDesktopDisplayAPI.idl
Thanks in advance,
More information about the webkit-dev