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
4c0b0e00
Commit
4c0b0e00
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 computing of conformance from a correlation descriptor for conformant strings.
parent
124acc9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
22 deletions
+9
-22
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+9
-22
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
4c0b0e00
...
...
@@ -530,19 +530,18 @@ finish_conf:
unsigned
char
*
WINAPI
NdrConformantStringMarshall
(
MIDL_STUB_MESSAGE
*
pStubMsg
,
unsigned
char
*
pszMessage
,
PFORMAT_STRING
pFormat
)
{
unsigned
long
len
,
esize
;
unsigned
long
esize
;
TRACE
(
"(pStubMsg == ^%p, pszMessage == ^%p, pFormat == ^%p)
\n
"
,
pStubMsg
,
pszMessage
,
pFormat
);
assert
(
pFormat
);
if
(
*
pFormat
==
RPC_FC_C_CSTRING
)
{
TRACE
(
"string=%s
\n
"
,
debugstr_a
((
char
*
)
pszMessage
));
len
=
strlen
((
char
*
)
pszMessage
)
+
1
;
pStubMsg
->
ActualCount
=
strlen
((
char
*
)
pszMessage
)
+
1
;
esize
=
1
;
}
else
if
(
*
pFormat
==
RPC_FC_C_WSTRING
)
{
TRACE
(
"string=%s
\n
"
,
debugstr_w
((
LPWSTR
)
pszMessage
));
len
=
strlenW
((
LPWSTR
)
pszMessage
)
+
1
;
pStubMsg
->
ActualCount
=
strlenW
((
LPWSTR
)
pszMessage
)
+
1
;
esize
=
2
;
}
else
{
...
...
@@ -551,19 +550,16 @@ unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg,
return
NULL
;
}
if
(
pFormat
[
1
]
!=
RPC_FC_PAD
)
{
FIXME
(
"sized string format=%d
\n
"
,
pFormat
[
1
]);
}
assert
(
(
pStubMsg
->
BufferLength
>=
(
len
*
esize
+
13
))
&&
(
pStubMsg
->
Buffer
!=
NULL
)
);
pStubMsg
->
MaxCount
=
pStubMsg
->
ActualCount
=
len
;
if
(
pFormat
[
1
]
==
RPC_FC_STRING_SIZED
)
pFormat
=
ComputeConformance
(
pStubMsg
,
pszMessage
,
pFormat
+
2
,
0
);
else
pStubMsg
->
MaxCount
=
pStubMsg
->
ActualCount
;
pStubMsg
->
Offset
=
0
;
WriteConformance
(
pStubMsg
);
WriteVariance
(
pStubMsg
);
memcpy
(
pStubMsg
->
Buffer
,
pszMessage
,
len
*
esize
);
/* the string itself */
pStubMsg
->
Buffer
+=
len
*
esize
;
memcpy
(
pStubMsg
->
Buffer
,
pszMessage
,
pStubMsg
->
ActualCount
*
esize
);
/* the string itself */
pStubMsg
->
Buffer
+=
pStubMsg
->
ActualCount
*
esize
;
STD_OVERFLOW_CHECK
(
pStubMsg
);
...
...
@@ -582,7 +578,6 @@ void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
SizeConformance
(
pStubMsg
);
SizeVariance
(
pStubMsg
);
assert
(
pFormat
);
if
(
*
pFormat
==
RPC_FC_C_CSTRING
)
{
/* we need + 1 octet for '\0' */
TRACE
(
"string=%s
\n
"
,
debugstr_a
((
char
*
)
pMemory
));
...
...
@@ -597,10 +592,6 @@ void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
ERR
(
"Unhandled string type: %#x
\n
"
,
*
pFormat
);
/* FIXME: raise an exception */
}
if
(
pFormat
[
1
]
!=
RPC_FC_PAD
)
{
FIXME
(
"sized string format=%d
\n
"
,
pFormat
[
1
]);
}
}
/************************************************************************
...
...
@@ -658,10 +649,6 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
esize
=
0
;
}
if
(
pFormat
[
1
]
!=
RPC_FC_PAD
)
{
FIXME
(
"sized string format=%d
\n
"
,
pFormat
[
1
]);
}
len
=
pStubMsg
->
ActualCount
;
if
(
fMustAlloc
||
!*
ppMemory
)
...
...
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