Commit 7fb311b4 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

widl: Handle marshaling and unmarshaling structures.

parent 4acabfd7
...@@ -428,11 +428,32 @@ void marshall_arguments(FILE *file, int indent, func_t *func, ...@@ -428,11 +428,32 @@ void marshall_arguments(FILE *file, int indent, func_t *func,
} }
else else
{ {
const char *ndrtype;
switch (var->type->type) switch (var->type->type)
{ {
case RPC_FC_STRUCT:
ndrtype = "SimpleStruct";
break;
case RPC_FC_CSTRUCT:
case RPC_FC_CPSTRUCT:
ndrtype = "ConformantStruct";
break;
case RPC_FC_CVSTRUCT:
ndrtype = "ConformantVaryingStruct";
break;
case RPC_FC_BOGUS_STRUCT:
ndrtype = "ComplexStruct";
break;
default: default:
error("marshall_arguments: Unsupported type: %s (0x%02x, ptr_level: 1)\n", var->name, var->type->type); error("marshall_arguments: Unsupported type: %s (0x%02x, ptr_level: %d)\n",
var->name, var->type->type, var->ptr_level);
ndrtype = NULL;
} }
print_file(file, indent,
"Ndr%sMarshall(&_StubMsg, (unsigned char *)%s, &__MIDL_TypeFormatString.Format[%d]);\n",
ndrtype, var->name, *type_offset);
} }
last_size = 1; last_size = 1;
} }
...@@ -583,12 +604,32 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func, ...@@ -583,12 +604,32 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func,
} }
else else
{ {
const char *ndrtype;
switch (var->type->type) switch (var->type->type)
{ {
case RPC_FC_STRUCT:
ndrtype = "SimpleStruct";
break;
case RPC_FC_CSTRUCT:
case RPC_FC_CPSTRUCT:
ndrtype = "ConformantStruct";
break;
case RPC_FC_CVSTRUCT:
ndrtype = "ConformantVaryingStruct";
break;
case RPC_FC_BOGUS_STRUCT:
ndrtype = "ComplexStruct";
break;
default: default:
error("unmarshall_arguments: Unsupported type: %s (0x%02x, ptr_level: %d)\n", error("unmarshall_arguments: Unsupported type: %s (0x%02x, ptr_level: %d)\n",
var->name, var->type->type, var->ptr_level); var->name, var->type->type, var->ptr_level);
ndrtype = NULL;
} }
print_file(file, indent,
"Ndr%sUnmarshall(&_StubMsg, (unsigned char *)%s, &__MIDL_TypeFormatString.Format[%d], 0);\n",
ndrtype, var->name, *type_offset);
} }
last_size = 1; last_size = 1;
} }
......
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