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
7ae1d448
Commit
7ae1d448
authored
Dec 08, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement PointerMemorySize.
parent
8348f041
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+26
-2
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
7ae1d448
...
...
@@ -1126,8 +1126,10 @@ static unsigned long PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
type
=
pFormat
[
0
],
attr
=
pFormat
[
1
];
PFORMAT_STRING
desc
;
NDR_MEMORYSIZE
m
;
DWORD
pointer_id
=
0
;
int
pointer_needs_sizing
;
FIXME
(
"(%p,%p,%p): stub
\n
"
,
pStubMsg
,
Buffer
,
pFormat
);
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
Buffer
,
pFormat
);
TRACE
(
"type=0x%x, attr="
,
type
);
dump_pointer_attr
(
attr
);
pFormat
+=
2
;
if
(
attr
&
RPC_FC_P_SIMPLEPOINTER
)
desc
=
pFormat
;
...
...
@@ -1135,21 +1137,43 @@ static unsigned long PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
switch
(
type
)
{
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
pointer_needs_sizing
=
1
;
break
;
case
RPC_FC_UP
:
/* unique pointer */
case
RPC_FC_OP
:
/* object pointer - we must free data before overwriting it */
pointer_id
=
NDR_LOCAL_UINT32_READ
(
Buffer
);
TRACE
(
"pointer_id is 0x%08x
\n
"
,
pointer_id
);
if
(
pointer_id
)
pointer_needs_sizing
=
1
;
else
pointer_needs_sizing
=
0
;
break
;
case
RPC_FC_FP
:
{
void
*
pointer
;
pointer_id
=
NDR_LOCAL_UINT32_READ
(
Buffer
);
TRACE
(
"pointer_id is 0x%08x
\n
"
,
pointer_id
);
pointer_needs_sizing
=
!
NdrFullPointerQueryRefId
(
pStubMsg
->
FullPtrXlatTables
,
pointer_id
,
1
,
&
pointer
);
break
;
}
default:
FIXME
(
"unhandled ptr type=%02x
\n
"
,
type
);
RpcRaiseException
(
RPC_X_BAD_STUB_DATA
);
return
0
;
}
if
(
attr
&
RPC_FC_P_DEREF
)
{
TRACE
(
"deref
\n
"
);
}
if
(
pointer_needs_sizing
)
{
m
=
NdrMemorySizer
[
*
desc
&
NDR_TABLE_MASK
];
if
(
m
)
m
(
pStubMsg
,
desc
);
else
FIXME
(
"no memorysizer for data type=%02x
\n
"
,
*
desc
);
}
return
0
;
return
pStubMsg
->
MemorySize
;
}
/***********************************************************************
...
...
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