Hello Jérôme!
I'm not sure about what you mean for range
attribute, but I notice that
typedef [context_handle] PVOID my_handle;
makes widl thinks that any value of the my_handle type is passed by
pointer, whereas midl considers it is passed by value.
Did you try to find the bug
in WIDL?
Could you be more precise about "range attributes
and others?" please.
I should better have written "range attributes and
probably others"!
The range attribute is used in the svcctl.idl file and enables range
checks in rpcrt4.dll. This is a nice feature, but WIDL is messing up the
ranges if a range attribute is used with function parameters.
For example:
DWORD Test(
[in] SC_RPC_HANDLE hSCManager,
[in, range(0, 1024)] DWORD dwParam1,
[in, range(0, 255)] DWORD dwParam2);
WIDL will emit the same range type (range 0-255) for both parameters
because the range attribute is assigned to the DWORD type and it is
overwritten whenever a new range attribute is used with the DWORD type.
In the end all DWORD type parameters that have a range attribute will
use the range that is used by the last DWORD type with a range attribute
(dwParam2 in this case) in the idl file. This will cause some 'funny'
effects if dwParam1 is greater than 255. :-/
BTW, I think it is more important to have a working RPC system in
ReactOS than a windows-compatible one. The compatibility issues can be
fixed later, but if you break RPC today by fixing compatibility issues
you will render ReactOS unusable. So please be very careful when you
make changes to rpcrt4 or WIDL.
Regards,
Eric