Marshalling of remotable handles
wine at mkarcher.dialup.fu-berlin.de
Sun Dec 21 10:50:54 CST 2008
Hello Wine developers,
while trying to add proxy/stub code for shell32, I stumbled across the
definition of remotable handles in IDL.
- a RemotableHandle union.
- the IDL typedefs for the wire representation of handles:
| typedef [unique] RemotableHandle *wireHXXX;
- the IDL declaration for the handle types itself:
| typedef [wire_marshal(wireHXXX)] void*HXXX;
This makes widl generate null pointer checks for HWND parameters, as
HXXX is a void pointer without the unique attribute. My question is:
Should widl really add this check? As the type is marshalled as
wireHXXX, the null value is no problem for marshalling, so it could be
safely left out.
What I did in my repository was adding the [unique] attribute to the IDL
typedef of the handle type:
| typedef [unique, wire_marshal(wireHXXX)] void*HXXX;
Is this the right approach to generally get rid of the NULL pointer
checks for handles, or is widl to be fixed instead?
Best regards and thanks for advice,
More information about the wine-devel