Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d9896dec
Commit
d9896dec
authored
Nov 28, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement conformant varying array functions.
parent
bc16c667
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
3 deletions
+72
-3
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+72
-3
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
d9896dec
...
...
@@ -1956,7 +1956,35 @@ unsigned char* WINAPI NdrConformantVaryingArrayMarshall( PMIDL_STUB_MESSAGE pStu
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
FIXME
(
"stub
\n
"
);
DWORD
esize
=
*
(
const
WORD
*
)(
pFormat
+
2
);
TRACE
(
"(%p, %p, %p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
if
(
pFormat
[
0
]
!=
RPC_FC_CVARRAY
)
{
ERR
(
"invalid format type %x
\n
"
,
pFormat
[
0
]);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
NULL
;
}
pFormat
=
ComputeConformance
(
pStubMsg
,
pMemory
,
pFormat
+
4
,
0
);
pFormat
=
ComputeVariance
(
pStubMsg
,
pMemory
,
pFormat
,
0
);
NDR_LOCAL_UINT32_WRITE
(
pStubMsg
->
Buffer
,
pStubMsg
->
MaxCount
);
pStubMsg
->
Buffer
+=
4
;
NDR_LOCAL_UINT32_WRITE
(
pStubMsg
->
Buffer
,
pStubMsg
->
Offset
);
pStubMsg
->
Buffer
+=
4
;
NDR_LOCAL_UINT32_WRITE
(
pStubMsg
->
Buffer
,
pStubMsg
->
ActualCount
);
pStubMsg
->
Buffer
+=
4
;
memcpy
(
pStubMsg
->
Buffer
,
pMemory
+
pStubMsg
->
Offset
,
pStubMsg
->
ActualCount
*
esize
);
pStubMsg
->
BufferMark
=
pStubMsg
->
Buffer
;
pStubMsg
->
Buffer
+=
pStubMsg
->
ActualCount
*
esize
;
EmbeddedPointerMarshall
(
pStubMsg
,
pMemory
,
pFormat
);
STD_OVERFLOW_CHECK
(
pStubMsg
);
return
NULL
;
}
...
...
@@ -1969,7 +1997,29 @@ unsigned char* WINAPI NdrConformantVaryingArrayUnmarshall( PMIDL_STUB_MESSAGE pS
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
)
{
FIXME
(
"stub
\n
"
);
DWORD
offset
;
DWORD
esize
=
*
(
const
WORD
*
)(
pFormat
+
2
);
TRACE
(
"(%p, %p, %p, %d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
if
(
pFormat
[
0
]
!=
RPC_FC_CVARRAY
)
{
ERR
(
"invalid format type %x
\n
"
,
pFormat
[
0
]);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
NULL
;
}
pFormat
=
ReadConformance
(
pStubMsg
,
pFormat
);
offset
=
NDR_LOCAL_UINT32_READ
(
pStubMsg
->
Buffer
);
pStubMsg
->
Buffer
+=
4
;
pFormat
=
ReadVariance
(
pStubMsg
,
pFormat
);
if
(
!*
ppMemory
||
fMustAlloc
)
*
ppMemory
=
NdrAllocate
(
pStubMsg
,
pStubMsg
->
MaxCount
*
esize
);
memcpy
(
*
ppMemory
+
offset
,
pStubMsg
->
Buffer
,
pStubMsg
->
ActualCount
*
esize
);
pStubMsg
->
Buffer
+=
pStubMsg
->
ActualCount
*
esize
;
EmbeddedPointerUnmarshall
(
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
return
NULL
;
}
...
...
@@ -1991,7 +2041,26 @@ void WINAPI NdrConformantVaryingArrayFree( PMIDL_STUB_MESSAGE pStubMsg,
void
WINAPI
NdrConformantVaryingArrayBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
FIXME
(
"stub
\n
"
);
DWORD
esize
=
*
(
const
WORD
*
)(
pFormat
+
2
);
TRACE
(
"(%p, %p, %p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
if
(
pFormat
[
0
]
!=
RPC_FC_CVARRAY
)
{
ERR
(
"invalid format type %x
\n
"
,
pFormat
[
0
]);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
;
}
/* compute size */
pFormat
=
ComputeConformance
(
pStubMsg
,
pMemory
,
pFormat
+
4
,
0
);
/* compute length */
pFormat
=
ComputeVariance
(
pStubMsg
,
pMemory
,
pFormat
,
0
);
/* conformance + offset + variance + array */
pStubMsg
->
BufferLength
+=
3
*
sizeof
(
DWORD
)
+
pStubMsg
->
ActualCount
*
esize
;
EmbeddedPointerBufferSize
(
pStubMsg
,
pMemory
,
pFormat
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment