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
63307241
Commit
63307241
authored
May 26, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Store the QueryType in the state table in NdrFullPointerQueryRefId.
Implement NdrFullPointerFree.
parent
7af506b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
ndr_fullpointer.c
dlls/rpcrt4/ndr_fullpointer.c
+37
-3
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+0
-4
No files found.
dlls/rpcrt4/ndr_fullpointer.c
View file @
63307241
...
@@ -151,7 +151,11 @@ int WINAPI NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
...
@@ -151,7 +151,11 @@ int WINAPI NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
{
{
*
ppPointer
=
pXlatTables
->
RefIdToPointer
.
XlatTable
[
RefId
];
*
ppPointer
=
pXlatTables
->
RefIdToPointer
.
XlatTable
[
RefId
];
if
(
QueryType
)
if
(
QueryType
)
return
pXlatTables
->
RefIdToPointer
.
StateTable
[
RefId
];
{
int
ret
=
pXlatTables
->
RefIdToPointer
.
StateTable
[
RefId
];
pXlatTables
->
RefIdToPointer
.
StateTable
[
RefId
]
=
QueryType
;
return
ret
;
}
else
else
return
0
;
return
0
;
}
}
...
@@ -187,7 +191,37 @@ void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
...
@@ -187,7 +191,37 @@ void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
int
WINAPI
NdrFullPointerFree
(
PFULL_PTR_XLAT_TABLES
pXlatTables
,
void
*
Pointer
)
int
WINAPI
NdrFullPointerFree
(
PFULL_PTR_XLAT_TABLES
pXlatTables
,
void
*
Pointer
)
{
{
FIXME
(
"(%p, %p)
\n
"
,
pXlatTables
,
Pointer
);
unsigned
long
Hash
=
0
;
int
i
;
PFULL_PTR_TO_REFID_ELEMENT
XlatTableEntry
;
unsigned
long
RefId
=
0
;
TRACE
(
"(%p, %p)
\n
"
,
pXlatTables
,
Pointer
);
if
(
!
Pointer
)
return
1
;
/* simple hashing algorithm, don't know whether it matches native */
for
(
i
=
0
;
i
<
sizeof
(
Pointer
);
i
++
)
Hash
=
(
Hash
*
3
)
^
((
unsigned
char
*
)
&
Pointer
)[
i
];
XlatTableEntry
=
pXlatTables
->
PointerToRefId
.
XlatTable
[
Hash
&
pXlatTables
->
PointerToRefId
.
HashMask
];
for
(;
XlatTableEntry
;
XlatTableEntry
=
XlatTableEntry
->
Next
)
if
(
Pointer
==
XlatTableEntry
->
Pointer
)
{
XlatTableEntry
->
State
=
0x20
;
RefId
=
XlatTableEntry
->
RefId
;
break
;
}
if
(
!
XlatTableEntry
)
return
0
;
return
10
;
if
(
pXlatTables
->
RefIdToPointer
.
NumberOfEntries
>
RefId
)
{
pXlatTables
->
RefIdToPointer
.
StateTable
[
RefId
]
=
0x20
;
return
1
;
}
return
0
;
}
}
dlls/rpcrt4/tests/ndr_marshall.c
View file @
63307241
...
@@ -753,9 +753,7 @@ static void test_fullpointer_xlat(void)
...
@@ -753,9 +753,7 @@ static void test_fullpointer_xlat(void)
ok
(
Pointer
==
(
void
*
)
0xcafebabe
,
"Pointer should be (void *)0xcafebabe instead of %p
\n
"
,
Pointer
);
ok
(
Pointer
==
(
void
*
)
0xcafebabe
,
"Pointer should be (void *)0xcafebabe instead of %p
\n
"
,
Pointer
);
ret
=
NdrFullPointerQueryRefId
(
pXlatTables
,
0x2
,
1
,
&
Pointer
);
ret
=
NdrFullPointerQueryRefId
(
pXlatTables
,
0x2
,
1
,
&
Pointer
);
todo_wine
{
ok
(
ret
==
1
,
"ret should be 1 instead of 0x%x
\n
"
,
ret
);
ok
(
ret
==
1
,
"ret should be 1 instead of 0x%x
\n
"
,
ret
);
}
ok
(
Pointer
==
(
void
*
)
0xcafebabe
,
"Pointer should be (void *)0xcafebabe instead of %p
\n
"
,
Pointer
);
ok
(
Pointer
==
(
void
*
)
0xcafebabe
,
"Pointer should be (void *)0xcafebabe instead of %p
\n
"
,
Pointer
);
/* "marshaling" phase */
/* "marshaling" phase */
...
@@ -784,7 +782,6 @@ static void test_fullpointer_xlat(void)
...
@@ -784,7 +782,6 @@ static void test_fullpointer_xlat(void)
/* "freeing" phase */
/* "freeing" phase */
todo_wine
{
ret
=
NdrFullPointerFree
(
pXlatTables
,
(
void
*
)
0xcafebeef
);
ret
=
NdrFullPointerFree
(
pXlatTables
,
(
void
*
)
0xcafebeef
);
ok
(
ret
==
1
,
"ret should be 1 instead of 0x%x
\n
"
,
ret
);
ok
(
ret
==
1
,
"ret should be 1 instead of 0x%x
\n
"
,
ret
);
...
@@ -793,7 +790,6 @@ static void test_fullpointer_xlat(void)
...
@@ -793,7 +790,6 @@ static void test_fullpointer_xlat(void)
ret
=
NdrFullPointerFree
(
pXlatTables
,
(
void
*
)
0xdeadbeef
);
ret
=
NdrFullPointerFree
(
pXlatTables
,
(
void
*
)
0xdeadbeef
);
ok
(
ret
==
1
,
"ret should be 1 instead of 0x%x
\n
"
,
ret
);
ok
(
ret
==
1
,
"ret should be 1 instead of 0x%x
\n
"
,
ret
);
}
NdrFullPointerXlatFree
(
pXlatTables
);
NdrFullPointerXlatFree
(
pXlatTables
);
}
}
...
...
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