widl [1/4]: Fix NdrConformantArrayUnmarshall calls in generated code

Dan Hipschman dsh at linux.ucla.edu
Tue Aug 15 20:31:14 CDT 2006


This series of four patches allow gcc to compile the proxy file that widl
generates for oaidl.idl.  This first patch fixes the number and types of
arguments widl generates for NdrConformantArrayUnmarshall calls.

ChangeLog:
* Generate the correct args for NdrConformantArrayUnmarshall in proxy code
---
 tools/widl/proxy.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index 3d3e717..642afbe 100644
--- a/tools/widl/proxy.c
+++ b/tools/widl/proxy.c
@@ -449,8 +449,8 @@ static void unmarshall_copy_arg( var_t *
   expr = get_attrp( arg->attrs, ATTR_SIZEIS );
   if (expr)
   {
-    print_proxy( "NdrConformantArrayUnmarshall( &_StubMsg, (unsigned char*)%s, ", arg->name );
-    fprintf(proxy, "&__MIDL_TypeFormatString.Format[%d]);\n", index );
+    print_proxy( "NdrConformantArrayUnmarshall( &_StubMsg, (unsigned char**)&%s, ", arg->name );
+    fprintf(proxy, "&__MIDL_TypeFormatString.Format[%d], 0);\n", index );
     return;
   }
 
@@ -481,8 +481,8 @@ static void unmarshall_copy_arg( var_t *
   case RPC_FC_C_CSTRING:
   case RPC_FC_C_WSTRING:
   case RPC_FC_CARRAY:
-    print_proxy( "NdrConformantArrayUnmarshall( &_StubMsg, (unsigned char*)%s, ", arg->name );
-    fprintf(proxy, "&__MIDL_TypeFormatString.Format[%d]);\n", index );
+    print_proxy( "NdrConformantArrayUnmarshall( &_StubMsg, (unsigned char**)&%s, ", arg->name );
+    fprintf(proxy, "&__MIDL_TypeFormatString.Format[%d], 0);\n", index );
     break;
 
   case RPC_FC_BOGUS_STRUCT:



More information about the wine-patches mailing list