Robert Shearman : rpcrt4: Implement more base types for complex types.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 9 14:39:41 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 21673d03f902f1f66ffc5eaabb2ee293ae985c8d
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=21673d03f902f1f66ffc5eaabb2ee293ae985c8d

Author: Robert Shearman <rob at codeweavers.com>
Date:   Fri Jun  9 17:24:49 2006 +0100

rpcrt4: Implement more base types for complex types.

---

 dlls/rpcrt4/ndr_marshall.c |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 30f5ddc..5ce8134 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1642,6 +1642,16 @@ static unsigned char * ComplexMarshall(P
 
   while (*pFormat != RPC_FC_END) {
     switch (*pFormat) {
+    case RPC_FC_BYTE:
+    case RPC_FC_CHAR:
+    case RPC_FC_SMALL:
+    case RPC_FC_USMALL:
+      TRACE("byte=%d <= %p\n", *(WORD*)pMemory, pMemory);
+      memcpy(pStubMsg->Buffer, pMemory, 1);
+      pStubMsg->Buffer += 1;
+      pMemory += 1;
+      break;
+    case RPC_FC_WCHAR:
     case RPC_FC_SHORT:
     case RPC_FC_USHORT:
       TRACE("short=%d <= %p\n", *(WORD*)pMemory, pMemory);
@@ -1706,6 +1716,16 @@ static unsigned char * ComplexUnmarshall
 
   while (*pFormat != RPC_FC_END) {
     switch (*pFormat) {
+    case RPC_FC_BYTE:
+    case RPC_FC_CHAR:
+    case RPC_FC_SMALL:
+    case RPC_FC_USMALL:
+      memcpy(pMemory, pStubMsg->Buffer, 1);
+      TRACE("byte=%d => %p\n", *(WORD*)pMemory, pMemory);
+      pStubMsg->Buffer += 1;
+      pMemory += 1;
+      break;
+    case RPC_FC_WCHAR:
     case RPC_FC_SHORT:
     case RPC_FC_USHORT:
       memcpy(pMemory, pStubMsg->Buffer, 2);
@@ -1771,6 +1791,14 @@ static unsigned char * ComplexBufferSize
 
   while (*pFormat != RPC_FC_END) {
     switch (*pFormat) {
+    case RPC_FC_BYTE:
+    case RPC_FC_CHAR:
+    case RPC_FC_SMALL:
+    case RPC_FC_USMALL:
+      pStubMsg->BufferLength += 1;
+      pMemory += 1;
+      break;
+    case RPC_FC_WCHAR:
     case RPC_FC_SHORT:
     case RPC_FC_USHORT:
       pStubMsg->BufferLength += 2;
@@ -1829,6 +1857,13 @@ static unsigned char * ComplexFree(PMIDL
 
   while (*pFormat != RPC_FC_END) {
     switch (*pFormat) {
+    case RPC_FC_BYTE:
+    case RPC_FC_CHAR:
+    case RPC_FC_SMALL:
+    case RPC_FC_USMALL:
+      pMemory += 1;
+      break;
+    case RPC_FC_WCHAR:
     case RPC_FC_SHORT:
     case RPC_FC_USHORT:
       pMemory += 2;
@@ -1882,6 +1917,14 @@ static unsigned long ComplexStructMemory
 
   while (*pFormat != RPC_FC_END) {
     switch (*pFormat) {
+    case RPC_FC_BYTE:
+    case RPC_FC_CHAR:
+    case RPC_FC_SMALL:
+    case RPC_FC_USMALL:
+      size += 1;
+      pStubMsg->Buffer += 1;
+      break;
+    case RPC_FC_WCHAR:
     case RPC_FC_SHORT:
     case RPC_FC_USHORT:
       size += 2;




More information about the wine-cvs mailing list