Commit a5ff173c authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

widl: Generate proxy code for user marshalled types.

parent c526c980
......@@ -232,6 +232,34 @@ int cant_be_null(var_t *v)
return 1; /* Default is RPC_FC_RP. */
}
static int is_user_derived(var_t *v)
{
const attr_t *attrs = v->attrs;
const type_t *type = v->type;
if (! attrs && type)
{
attrs = type->attrs;
type = type->ref;
}
while (attrs)
{
if (is_attr(attrs, ATTR_WIREMARSHAL))
return 1;
if (type)
{
attrs = type->attrs;
type = type->ref;
}
else
attrs = NULL;
}
return 0;
}
static void proxy_check_pointers( var_t *arg )
{
END_OF_LIST(arg);
......@@ -263,6 +291,13 @@ static void marshall_size_arg( var_t *arg )
return;
}
if (is_user_derived(arg))
{
print_proxy("NdrUserMarshalBufferSize( &_StubMsg, (unsigned char*)%s, ", arg->name);
fprintf(proxy, "&__MIDL_TypeFormatString.Format[%d] );\n", index);
return;
}
switch( type->type )
{
case RPC_FC_BYTE:
......@@ -355,6 +390,13 @@ static void marshall_copy_arg( var_t *arg )
return;
}
if (is_user_derived(arg))
{
print_proxy("NdrUserMarshalMarshall( &_StubMsg, (unsigned char*)%s, ", arg->name);
fprintf(proxy, "&__MIDL_TypeFormatString.Format[%d] );\n", index);
return;
}
switch( type->type )
{
case RPC_FC_BYTE:
......@@ -454,6 +496,13 @@ static void unmarshall_copy_arg( var_t *arg )
return;
}
if (is_user_derived(arg))
{
print_proxy("NdrUserMarshalUnmarshall( &_StubMsg, (unsigned char**)&%s, ", arg->name);
fprintf(proxy, "&__MIDL_TypeFormatString.Format[%d], 0 );\n", index);
return;
}
switch( type->type )
{
case RPC_FC_BYTE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment