Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0f7e4a87
Commit
0f7e4a87
authored
May 15, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement fixed array functions.
parent
c27db4cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
161 additions
and
6 deletions
+161
-6
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+161
-6
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
0f7e4a87
...
...
@@ -3188,6 +3188,20 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg,
EmbeddedPointerFree
(
pStubMsg
,
pMemory
,
pFormat
);
}
typedef
struct
{
unsigned
char
type
;
unsigned
char
alignment
;
unsigned
short
total_size
;
}
NDR_SMFARRAY_FORMAT
;
typedef
struct
{
unsigned
char
type
;
unsigned
char
alignment
;
unsigned
long
total_size
;
}
NDR_LGFARRAY_FORMAT
;
/***********************************************************************
* NdrFixedArrayMarshall [RPCRT4.@]
*/
...
...
@@ -3195,7 +3209,37 @@ unsigned char * WINAPI NdrFixedArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
FIXME
(
"stub
\n
"
);
const
NDR_SMFARRAY_FORMAT
*
pSmFArrayFormat
=
(
const
NDR_SMFARRAY_FORMAT
*
)
pFormat
;
unsigned
long
total_size
;
TRACE
(
"(%p, %p, %p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
if
((
pSmFArrayFormat
->
type
!=
RPC_FC_SMFARRAY
)
&&
(
pSmFArrayFormat
->
type
!=
RPC_FC_LGFARRAY
))
{
ERR
(
"invalid format type %x
\n
"
,
pSmFArrayFormat
->
type
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
NULL
;
}
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
pSmFArrayFormat
->
alignment
+
1
);
if
(
pSmFArrayFormat
->
type
==
RPC_FC_SMFARRAY
)
{
total_size
=
pSmFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pSmFArrayFormat
+
1
);
}
else
{
const
NDR_LGFARRAY_FORMAT
*
pLgFArrayFormat
=
(
const
NDR_LGFARRAY_FORMAT
*
)
pFormat
;
total_size
=
pLgFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pLgFArrayFormat
+
1
);
}
memcpy
(
pStubMsg
->
Buffer
,
pMemory
,
total_size
);
pStubMsg
->
Buffer
+=
total_size
;
pFormat
=
EmbeddedPointerMarshall
(
pStubMsg
,
pMemory
,
pFormat
);
return
NULL
;
}
...
...
@@ -3207,7 +3251,40 @@ unsigned char * WINAPI NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
)
{
FIXME
(
"stub
\n
"
);
const
NDR_SMFARRAY_FORMAT
*
pSmFArrayFormat
=
(
const
NDR_SMFARRAY_FORMAT
*
)
pFormat
;
unsigned
long
total_size
;
TRACE
(
"(%p, %p, %p, %d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
if
((
pSmFArrayFormat
->
type
!=
RPC_FC_SMFARRAY
)
&&
(
pSmFArrayFormat
->
type
!=
RPC_FC_LGFARRAY
))
{
ERR
(
"invalid format type %x
\n
"
,
pSmFArrayFormat
->
type
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
NULL
;
}
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
pSmFArrayFormat
->
alignment
+
1
);
if
(
pSmFArrayFormat
->
type
==
RPC_FC_SMFARRAY
)
{
total_size
=
pSmFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pSmFArrayFormat
+
1
);
}
else
{
const
NDR_LGFARRAY_FORMAT
*
pLgFArrayFormat
=
(
const
NDR_LGFARRAY_FORMAT
*
)
pFormat
;
total_size
=
pLgFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pLgFArrayFormat
+
1
);
}
if
(
fMustAlloc
||
!*
ppMemory
)
*
ppMemory
=
NdrAllocate
(
pStubMsg
,
total_size
);
memcpy
(
*
ppMemory
,
pStubMsg
->
Buffer
,
total_size
);
pStubMsg
->
Buffer
+=
total_size
;
pFormat
=
EmbeddedPointerUnmarshall
(
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
return
NULL
;
}
...
...
@@ -3218,7 +3295,35 @@ void WINAPI NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
FIXME
(
"stub
\n
"
);
const
NDR_SMFARRAY_FORMAT
*
pSmFArrayFormat
=
(
const
NDR_SMFARRAY_FORMAT
*
)
pFormat
;
unsigned
long
total_size
;
TRACE
(
"(%p, %p, %p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
if
((
pSmFArrayFormat
->
type
!=
RPC_FC_SMFARRAY
)
&&
(
pSmFArrayFormat
->
type
!=
RPC_FC_LGFARRAY
))
{
ERR
(
"invalid format type %x
\n
"
,
pSmFArrayFormat
->
type
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
;
}
ALIGN_LENGTH
(
pStubMsg
->
BufferLength
,
pSmFArrayFormat
->
alignment
+
1
);
if
(
pSmFArrayFormat
->
type
==
RPC_FC_SMFARRAY
)
{
total_size
=
pSmFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pSmFArrayFormat
+
1
);
}
else
{
const
NDR_LGFARRAY_FORMAT
*
pLgFArrayFormat
=
(
const
NDR_LGFARRAY_FORMAT
*
)
pFormat
;
total_size
=
pLgFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pLgFArrayFormat
+
1
);
}
pStubMsg
->
BufferLength
+=
total_size
;
EmbeddedPointerBufferSize
(
pStubMsg
,
pMemory
,
pFormat
);
}
/***********************************************************************
...
...
@@ -3227,8 +3332,38 @@ void WINAPI NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
long
WINAPI
NdrFixedArrayMemorySize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
)
{
FIXME
(
"stub
\n
"
);
return
0
;
const
NDR_SMFARRAY_FORMAT
*
pSmFArrayFormat
=
(
const
NDR_SMFARRAY_FORMAT
*
)
pFormat
;
unsigned
long
total_size
;
TRACE
(
"(%p, %p)
\n
"
,
pStubMsg
,
pFormat
);
if
((
pSmFArrayFormat
->
type
!=
RPC_FC_SMFARRAY
)
&&
(
pSmFArrayFormat
->
type
!=
RPC_FC_LGFARRAY
))
{
ERR
(
"invalid format type %x
\n
"
,
pSmFArrayFormat
->
type
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
0
;
}
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
pSmFArrayFormat
->
alignment
+
1
);
if
(
pSmFArrayFormat
->
type
==
RPC_FC_SMFARRAY
)
{
total_size
=
pSmFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pSmFArrayFormat
+
1
);
}
else
{
const
NDR_LGFARRAY_FORMAT
*
pLgFArrayFormat
=
(
const
NDR_LGFARRAY_FORMAT
*
)
pFormat
;
total_size
=
pLgFArrayFormat
->
total_size
;
pFormat
=
(
unsigned
char
*
)(
pLgFArrayFormat
+
1
);
}
pStubMsg
->
Buffer
+=
total_size
;
pStubMsg
->
MemorySize
+=
total_size
;
EmbeddedPointerMemorySize
(
pStubMsg
,
pFormat
);
return
total_size
;
}
/***********************************************************************
...
...
@@ -3238,7 +3373,27 @@ void WINAPI NdrFixedArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
FIXME
(
"stub
\n
"
);
const
NDR_SMFARRAY_FORMAT
*
pSmFArrayFormat
=
(
const
NDR_SMFARRAY_FORMAT
*
)
pFormat
;
TRACE
(
"(%p, %p, %p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
if
((
pSmFArrayFormat
->
type
!=
RPC_FC_SMFARRAY
)
&&
(
pSmFArrayFormat
->
type
!=
RPC_FC_LGFARRAY
))
{
ERR
(
"invalid format type %x
\n
"
,
pSmFArrayFormat
->
type
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
return
;
}
if
(
pSmFArrayFormat
->
type
==
RPC_FC_SMFARRAY
)
pFormat
=
(
unsigned
char
*
)(
pSmFArrayFormat
+
1
);
else
{
const
NDR_LGFARRAY_FORMAT
*
pLgFArrayFormat
=
(
const
NDR_LGFARRAY_FORMAT
*
)
pFormat
;
pFormat
=
(
unsigned
char
*
)(
pLgFArrayFormat
+
1
);
}
EmbeddedPointerFree
(
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