widl: let widl understand typedef enum

Rob Shearman rob at codeweavers.com
Sat Feb 5 12:37:08 CST 2005


Vincent Béron wrote:

>Le sam 05/02/2005 à 12:53, Rob Shearman a écrit :
>  
>
>>Vincent Béron wrote:
>>
>>    
>>
>>>Since the typedef patch to widl, typedef enum foo {A, B} FOO; was
>>>rejected by get_type_vt (unknown-type: 13).
>>>
>>>Changelog:
>>>A RPC_FC_ENUM16 is a VT_I2.
>>> 
>>>
>>>      
>>>
>>Are you sure about this? Elsewhere RPC_FC_ENUM16 is equivalent to a 
>>VT_I4 or VT_UI4 (although it is actually only 16-bits on the wire).
>>    
>>
>
>Where elsewhere? I only found (in widl) proxy.c:marshall_size_arg(), in
>which it's size is 2. I haven't looked in the rest of Wine source.
>  
>

Like I said, on the wire it is 16-bits.

>So no, I'm not 100% sure (no hard proof to lean on), but it was lacking
>a type and VT_I2 looked like the proper one.
>
>A type16 which is actually 4 bytes would indeed surprise me, especially
>when a type32 does exist.
>  
>

Yeah, it seems strange, but I have a test program here that shows it is 
32-bits application-side for proxies/stubs. If the upper 16-bits are 
non-zero then the proxy code throws a RPC_X_ENUM_VALUE_OUT_OF_RANGE 
exception. I don't know whether it is the same for type libraries, but 
it really needs testing.

Rob



More information about the wine-devel mailing list