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
6832c832
Commit
6832c832
authored
Feb 28, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Feb 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Make tests run on win9x/NT4 again.
parent
f9d89ed3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
server.c
dlls/rpcrt4/tests/server.c
+24
-11
No files found.
dlls/rpcrt4/tests/server.c
View file @
6832c832
...
@@ -36,6 +36,17 @@ static const char *progname;
...
@@ -36,6 +36,17 @@ static const char *progname;
static
HANDLE
stop_event
;
static
HANDLE
stop_event
;
static
void
(
WINAPI
*
pNDRSContextMarshall2
)(
RPC_BINDING_HANDLE
,
NDR_SCONTEXT
,
void
*
,
NDR_RUNDOWN
,
void
*
,
ULONG
);
static
NDR_SCONTEXT
(
WINAPI
*
pNDRSContextUnmarshall2
)(
RPC_BINDING_HANDLE
,
void
*
,
ULONG
,
void
*
,
ULONG
);
static
void
InitFunctionPointers
(
void
)
{
HMODULE
hrpcrt4
=
GetModuleHandleA
(
"rpcrt4.dll"
);
pNDRSContextMarshall2
=
(
void
*
)
GetProcAddress
(
hrpcrt4
,
"NDRSContextMarshall2"
);
pNDRSContextUnmarshall2
=
(
void
*
)
GetProcAddress
(
hrpcrt4
,
"NDRSContextUnmarshall2"
);
}
void
__RPC_FAR
*
__RPC_USER
void
__RPC_FAR
*
__RPC_USER
midl_user_allocate
(
size_t
n
)
midl_user_allocate
(
size_t
n
)
{
{
...
@@ -542,40 +553,40 @@ s_context_handle_test(void)
...
@@ -542,40 +553,40 @@ s_context_handle_test(void)
binding
=
I_RpcGetCurrentCallHandle
();
binding
=
I_RpcGetCurrentCallHandle
();
ok
(
binding
!=
NULL
,
"I_RpcGetCurrentCallHandle returned NULL
\n
"
);
ok
(
binding
!=
NULL
,
"I_RpcGetCurrentCallHandle returned NULL
\n
"
);
h
=
NDRSContextUnmarshall2
(
binding
,
NULL
,
NDR_LOCAL_DATA_REPRESENTATION
,
NULL
,
0
);
h
=
p
NDRSContextUnmarshall2
(
binding
,
NULL
,
NDR_LOCAL_DATA_REPRESENTATION
,
NULL
,
0
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
/* marshal a context handle with NULL userContext */
/* marshal a context handle with NULL userContext */
memset
(
buf
,
0xcc
,
sizeof
(
buf
));
memset
(
buf
,
0xcc
,
sizeof
(
buf
));
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
NULL
,
0
);
p
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
NULL
,
0
);
ok
(
*
(
ULONG
*
)
buf
==
0
,
"attributes should have been set to 0 instead of 0x%x
\n
"
,
*
(
ULONG
*
)
buf
);
ok
(
*
(
ULONG
*
)
buf
==
0
,
"attributes should have been set to 0 instead of 0x%x
\n
"
,
*
(
ULONG
*
)
buf
);
ok
(
UuidIsNil
((
UUID
*
)
&
buf
[
4
],
&
status
),
"uuid should have been nil
\n
"
);
ok
(
UuidIsNil
((
UUID
*
)
&
buf
[
4
],
&
status
),
"uuid should have been nil
\n
"
);
h
=
NDRSContextUnmarshall2
(
binding
,
NULL
,
NDR_LOCAL_DATA_REPRESENTATION
,
NULL
,
0
);
h
=
p
NDRSContextUnmarshall2
(
binding
,
NULL
,
NDR_LOCAL_DATA_REPRESENTATION
,
NULL
,
0
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
/* marshal a context handle with non-NULL userContext */
/* marshal a context handle with non-NULL userContext */
memset
(
buf
,
0xcc
,
sizeof
(
buf
));
memset
(
buf
,
0xcc
,
sizeof
(
buf
));
h
->
userContext
=
(
void
*
)
0xdeadbeef
;
h
->
userContext
=
(
void
*
)
0xdeadbeef
;
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
NULL
,
0
);
p
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
NULL
,
0
);
ok
(
*
(
ULONG
*
)
buf
==
0
,
"attributes should have been set to 0 instead of 0x%x
\n
"
,
*
(
ULONG
*
)
buf
);
ok
(
*
(
ULONG
*
)
buf
==
0
,
"attributes should have been set to 0 instead of 0x%x
\n
"
,
*
(
ULONG
*
)
buf
);
ok
(
!
UuidIsNil
((
UUID
*
)
&
buf
[
4
],
&
status
),
"uuid should not have been nil
\n
"
);
ok
(
!
UuidIsNil
((
UUID
*
)
&
buf
[
4
],
&
status
),
"uuid should not have been nil
\n
"
);
h
=
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
NULL
,
0
);
h
=
p
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
NULL
,
0
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
ok
(
h
->
userContext
==
(
void
*
)
0xdeadbeef
,
"userContext of interface didn't unmarshal properly: %p
\n
"
,
h
->
userContext
);
ok
(
h
->
userContext
==
(
void
*
)
0xdeadbeef
,
"userContext of interface didn't unmarshal properly: %p
\n
"
,
h
->
userContext
);
/* marshal a context handle with an interface specified */
/* marshal a context handle with an interface specified */
h
=
NDRSContextUnmarshall2
(
binding
,
NULL
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if
.
InterfaceId
,
0
);
h
=
p
NDRSContextUnmarshall2
(
binding
,
NULL
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if
.
InterfaceId
,
0
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
memset
(
buf
,
0xcc
,
sizeof
(
buf
));
memset
(
buf
,
0xcc
,
sizeof
(
buf
));
h
->
userContext
=
(
void
*
)
0xcafebabe
;
h
->
userContext
=
(
void
*
)
0xcafebabe
;
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
&
server_if
.
InterfaceId
,
0
);
p
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
&
server_if
.
InterfaceId
,
0
);
ok
(
*
(
ULONG
*
)
buf
==
0
,
"attributes should have been set to 0 instead of 0x%x
\n
"
,
*
(
ULONG
*
)
buf
);
ok
(
*
(
ULONG
*
)
buf
==
0
,
"attributes should have been set to 0 instead of 0x%x
\n
"
,
*
(
ULONG
*
)
buf
);
ok
(
!
UuidIsNil
((
UUID
*
)
&
buf
[
4
],
&
status
),
"uuid should not have been nil
\n
"
);
ok
(
!
UuidIsNil
((
UUID
*
)
&
buf
[
4
],
&
status
),
"uuid should not have been nil
\n
"
);
h
=
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if
.
InterfaceId
,
0
);
h
=
p
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if
.
InterfaceId
,
0
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
ok
(
h
!=
NULL
,
"NDRSContextUnmarshall2 returned NULL
\n
"
);
ok
(
h
->
userContext
==
(
void
*
)
0xcafebabe
,
"userContext of interface didn't unmarshal properly: %p
\n
"
,
h
->
userContext
);
ok
(
h
->
userContext
==
(
void
*
)
0xcafebabe
,
"userContext of interface didn't unmarshal properly: %p
\n
"
,
h
->
userContext
);
...
@@ -585,7 +596,7 @@ s_context_handle_test(void)
...
@@ -585,7 +596,7 @@ s_context_handle_test(void)
{
{
RPC_SERVER_INTERFACE
server_if_clone
=
server_if
;
RPC_SERVER_INTERFACE
server_if_clone
=
server_if
;
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if_clone
.
InterfaceId
,
0
);
p
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if_clone
.
InterfaceId
,
0
);
}
}
/* test different interface data, but different pointer */
/* test different interface data, but different pointer */
...
@@ -604,9 +615,9 @@ s_context_handle_test(void)
...
@@ -604,9 +615,9 @@ s_context_handle_test(void)
0
,
0
,
0
,
0
,
};
};
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
&
server_if
.
InterfaceId
,
0
);
p
NDRSContextMarshall2
(
binding
,
h
,
buf
,
NULL
,
&
server_if
.
InterfaceId
,
0
);
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if2
.
InterfaceId
,
0
);
p
NDRSContextUnmarshall2
(
binding
,
buf
,
NDR_LOCAL_DATA_REPRESENTATION
,
&
server_if2
.
InterfaceId
,
0
);
}
}
}
}
...
@@ -1242,6 +1253,8 @@ START_TEST(server)
...
@@ -1242,6 +1253,8 @@ START_TEST(server)
int
argc
;
int
argc
;
char
**
argv
;
char
**
argv
;
InitFunctionPointers
();
argc
=
winetest_get_mainargs
(
&
argv
);
argc
=
winetest_get_mainargs
(
&
argv
);
progname
=
argv
[
0
];
progname
=
argv
[
0
];
...
...
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