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
a160a653
Commit
a160a653
authored
Nov 05, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Nov 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Enable compilation with -D__WINESRC__.
parent
94d8e3ab
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
51 deletions
+50
-51
Makefile.in
dlls/ntdll/tests/Makefile.in
+0
-1
change.c
dlls/ntdll/tests/change.c
+3
-3
directory.c
dlls/ntdll/tests/directory.c
+2
-2
exception.c
dlls/ntdll/tests/exception.c
+3
-3
file.c
dlls/ntdll/tests/file.c
+5
-5
info.c
dlls/ntdll/tests/info.c
+14
-14
pipe.c
dlls/ntdll/tests/pipe.c
+2
-2
port.c
dlls/ntdll/tests/port.c
+21
-21
No files found.
dlls/ntdll/tests/Makefile.in
View file @
a160a653
TESTDLL
=
ntdll.dll
IMPORTS
=
user32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
atom.c
\
...
...
dlls/ntdll/tests/change.c
View file @
a160a653
...
...
@@ -69,7 +69,7 @@ static void test_ntncdf(void)
OPEN_EXISTING
,
fflags
,
NULL
);
ok
(
hdir
!=
INVALID_HANDLE_VALUE
,
"failed to open directory
\n
"
);
hEvent
=
CreateEvent
(
NULL
,
0
,
0
,
NULL
);
hEvent
=
CreateEvent
A
(
NULL
,
0
,
0
,
NULL
);
r
=
pNtNotifyChangeDirectoryFile
(
hdir
,
NULL
,
NULL
,
NULL
,
&
iosb
,
NULL
,
0
,
0
,
0
);
ok
(
r
==
STATUS_INVALID_PARAMETER
,
"should return invalid parameter
\n
"
);
...
...
@@ -197,7 +197,7 @@ static void test_ntncdf_async(void)
OPEN_EXISTING
,
fflags
,
NULL
);
ok
(
hdir
!=
INVALID_HANDLE_VALUE
,
"failed to open directory
\n
"
);
hEvent
=
CreateEvent
(
NULL
,
0
,
0
,
NULL
);
hEvent
=
CreateEvent
A
(
NULL
,
0
,
0
,
NULL
);
filter
=
FILE_NOTIFY_CHANGE_FILE_NAME
;
filter
|=
FILE_NOTIFY_CHANGE_DIR_NAME
;
...
...
@@ -312,7 +312,7 @@ static void test_ntncdf_async(void)
START_TEST
(
change
)
{
HMODULE
hntdll
=
GetModuleHandle
(
"ntdll"
);
HMODULE
hntdll
=
GetModuleHandle
A
(
"ntdll"
);
if
(
!
hntdll
)
{
win_skip
(
"not running on NT, skipping test
\n
"
);
...
...
dlls/ntdll/tests/directory.c
View file @
a160a653
...
...
@@ -120,11 +120,11 @@ static void tear_down_attribute_test(const char *testdirA)
continue
;
sprintf
(
buf
,
"%s
\\
%s"
,
testdirA
,
testfiles
[
i
].
name
);
if
(
testfiles
[
i
].
attr
&
FILE_ATTRIBUTE_DIRECTORY
)
{
ret
=
RemoveDirectory
(
buf
);
ret
=
RemoveDirectory
A
(
buf
);
ok
(
ret
||
(
GetLastError
()
==
ERROR_PATH_NOT_FOUND
),
"Failed to rmdir %s, error %d
\n
"
,
buf
,
GetLastError
());
}
else
{
ret
=
DeleteFile
(
buf
);
ret
=
DeleteFile
A
(
buf
);
ok
(
ret
||
(
GetLastError
()
==
ERROR_PATH_NOT_FOUND
),
"Failed to rm %s, error %d
\n
"
,
buf
,
GetLastError
());
}
...
...
dlls/ntdll/tests/exception.c
View file @
a160a653
...
...
@@ -731,7 +731,7 @@ static void test_debugger(void)
{
char
cmdline
[
MAX_PATH
];
PROCESS_INFORMATION
pi
;
STARTUPINFO
si
=
{
0
};
STARTUPINFO
A
si
=
{
0
};
DEBUG_EVENT
de
;
DWORD
continuestatus
;
PVOID
code_mem_address
=
NULL
;
...
...
@@ -748,7 +748,7 @@ static void test_debugger(void)
}
sprintf
(
cmdline
,
"%s %s %s %p"
,
my_argv
[
0
],
my_argv
[
1
],
"debuggee"
,
&
test_stage
);
ret
=
CreateProcess
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
);
ret
=
CreateProcess
A
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
);
ok
(
ret
,
"could not create child process error: %u
\n
"
,
GetLastError
());
if
(
!
ret
)
return
;
...
...
@@ -1473,7 +1473,7 @@ START_TEST(exception)
"NtQueryInformationProcess"
);
pNtSetInformationProcess
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtSetInformationProcess"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"kernel32.dll"
),
"IsWow64Process"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"kernel32.dll"
),
"IsWow64Process"
);
#ifdef __i386__
if
(
!
pNtCurrentTeb
)
...
...
dlls/ntdll/tests/file.c
View file @
a160a653
...
...
@@ -89,7 +89,7 @@ static inline BOOL is_signaled( HANDLE obj )
static
BOOL
create_pipe
(
HANDLE
*
read
,
HANDLE
*
write
,
ULONG
flags
,
ULONG
size
)
{
*
read
=
CreateNamedPipe
(
PIPENAME
,
PIPE_ACCESS_INBOUND
|
flags
,
PIPE_TYPE_BYTE
|
PIPE_WAIT
,
*
read
=
CreateNamedPipe
A
(
PIPENAME
,
PIPE_ACCESS_INBOUND
|
flags
,
PIPE_TYPE_BYTE
|
PIPE_WAIT
,
1
,
size
,
size
,
NMPWAIT_USE_DEFAULT_WAIT
,
NULL
);
ok
(
*
read
!=
INVALID_HANDLE_VALUE
,
"CreateNamedPipe failed
\n
"
);
...
...
@@ -861,7 +861,7 @@ static void append_file_test(void)
GetTempPathA
(
MAX_PATH
,
path
);
GetTempFileNameA
(
path
,
"foo"
,
0
,
buffer
);
handle
=
CreateFile
(
buffer
,
FILE_WRITE_DATA
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
handle
=
CreateFile
A
(
buffer
,
FILE_WRITE_DATA
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
U
(
iosb
).
Status
=
-
1
;
...
...
@@ -875,7 +875,7 @@ static void append_file_test(void)
/* It is possible to open a file with only FILE_APPEND_DATA access flags.
It matches the O_WRONLY|O_APPEND open() posix behavior */
handle
=
CreateFile
(
buffer
,
FILE_APPEND_DATA
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
handle
=
CreateFile
A
(
buffer
,
FILE_APPEND_DATA
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
U
(
iosb
).
Status
=
-
1
;
...
...
@@ -902,7 +902,7 @@ static void append_file_test(void)
CloseHandle
(
handle
);
handle
=
CreateFile
(
buffer
,
FILE_READ_DATA
|
FILE_WRITE_DATA
|
FILE_APPEND_DATA
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
handle
=
CreateFile
A
(
buffer
,
FILE_READ_DATA
|
FILE_WRITE_DATA
|
FILE_APPEND_DATA
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %d
\n
"
,
GetLastError
());
memset
(
buf
,
0
,
sizeof
(
buf
));
...
...
@@ -936,7 +936,7 @@ static void append_file_test(void)
ok
(
memcmp
(
buf
,
"barbar"
,
6
)
==
0
,
"wrong file contents: %s
\n
"
,
buf
);
CloseHandle
(
handle
);
DeleteFile
(
buffer
);
DeleteFile
A
(
buffer
);
}
static
void
nt_mailslot_test
(
void
)
...
...
dlls/ntdll/tests/info.c
View file @
a160a653
...
...
@@ -55,7 +55,7 @@ static DWORD one_before_last_pid = 0;
static
BOOL
InitFunctionPtrs
(
void
)
{
/* All needed functions are NT based, so using GetModuleHandle is a good check */
HMODULE
hntdll
=
GetModuleHandle
(
"ntdll"
);
HMODULE
hntdll
=
GetModuleHandle
A
(
"ntdll"
);
if
(
!
hntdll
)
{
win_skip
(
"Not running on NT
\n
"
);
...
...
@@ -78,7 +78,7 @@ static BOOL InitFunctionPtrs(void)
/* not present before XP */
pNtGetCurrentProcessorNumber
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtGetCurrentProcessorNumber"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"kernel32.dll"
),
"IsWow64Process"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"kernel32.dll"
),
"IsWow64Process"
);
if
(
!
pIsWow64Process
||
!
pIsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
))
is_wow64
=
FALSE
;
return
TRUE
;
}
...
...
@@ -946,14 +946,14 @@ static void test_query_process_debug_port(int argc, char **argv)
DWORD_PTR
debug_port
=
0xdeadbeef
;
char
cmdline
[
MAX_PATH
];
PROCESS_INFORMATION
pi
;
STARTUPINFO
si
=
{
0
};
STARTUPINFO
A
si
=
{
0
};
NTSTATUS
status
;
BOOL
ret
;
sprintf
(
cmdline
,
"%s %s %s"
,
argv
[
0
],
argv
[
1
],
"debuggee"
);
si
.
cb
=
sizeof
(
si
);
ret
=
CreateProcess
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
);
ret
=
CreateProcess
A
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
);
ok
(
ret
,
"CreateProcess failed, last error %#x.
\n
"
,
GetLastError
());
if
(
!
ret
)
return
;
...
...
@@ -1099,7 +1099,7 @@ static void test_query_process_image_file_name(void)
static
void
test_query_process_debug_object_handle
(
int
argc
,
char
**
argv
)
{
char
cmdline
[
MAX_PATH
];
STARTUPINFO
si
=
{
0
};
STARTUPINFO
A
si
=
{
0
};
PROCESS_INFORMATION
pi
;
BOOL
ret
;
HANDLE
debug_object
;
...
...
@@ -1108,7 +1108,7 @@ static void test_query_process_debug_object_handle(int argc, char **argv)
sprintf
(
cmdline
,
"%s %s %s"
,
argv
[
0
],
argv
[
1
],
"debuggee"
);
si
.
cb
=
sizeof
(
si
);
ret
=
CreateProcess
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
,
NULL
,
ret
=
CreateProcess
A
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
);
ok
(
ret
,
"CreateProcess failed with last error %u
\n
"
,
GetLastError
());
if
(
!
ret
)
return
;
...
...
@@ -1198,14 +1198,14 @@ static void test_query_process_debug_flags(int argc, char **argv)
DWORD
debug_flags
=
0xdeadbeef
;
char
cmdline
[
MAX_PATH
];
PROCESS_INFORMATION
pi
;
STARTUPINFO
si
=
{
0
};
STARTUPINFO
A
si
=
{
0
};
NTSTATUS
status
;
BOOL
ret
;
sprintf
(
cmdline
,
"%s %s %s"
,
argv
[
0
],
argv
[
1
],
"debuggee"
);
si
.
cb
=
sizeof
(
si
);
ret
=
CreateProcess
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
|
DEBUG_ONLY_THIS_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
);
ret
=
CreateProcess
A
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
|
DEBUG_ONLY_THIS_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
);
ok
(
ret
,
"CreateProcess failed, last error %#x.
\n
"
,
GetLastError
());
if
(
!
ret
)
return
;
...
...
@@ -1390,7 +1390,7 @@ static void test_queryvirtualmemory(void)
char
stackbuf
[
42
];
HMODULE
module
;
module
=
GetModuleHandle
(
"ntdll.dll"
);
module
=
GetModuleHandle
A
(
"ntdll.dll"
);
trace
(
"Check flags of the PE header of NTDLL.DLL at %p
\n
"
,
module
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
module
,
MemoryBasicInformation
,
&
mbi
,
sizeof
(
MEMORY_BASIC_INFORMATION
),
&
readcount
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
...
...
@@ -1402,7 +1402,7 @@ static void test_queryvirtualmemory(void)
ok
(
mbi
.
Type
==
MEM_IMAGE
,
"mbi.Type is 0x%x, expected 0x%x
\n
"
,
mbi
.
Type
,
MEM_IMAGE
);
trace
(
"Check flags of a function entry in NTDLL.DLL at %p
\n
"
,
pNtQueryVirtualMemory
);
module
=
GetModuleHandle
(
"ntdll.dll"
);
module
=
GetModuleHandle
A
(
"ntdll.dll"
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
pNtQueryVirtualMemory
,
MemoryBasicInformation
,
&
mbi
,
sizeof
(
MEMORY_BASIC_INFORMATION
),
&
readcount
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
readcount
==
sizeof
(
MEMORY_BASIC_INFORMATION
),
"Expected to read %d bytes, got %ld
\n
"
,(
int
)
sizeof
(
MEMORY_BASIC_INFORMATION
),
readcount
);
...
...
@@ -1430,7 +1430,7 @@ static void test_queryvirtualmemory(void)
ok
(
mbi
.
Protect
==
PAGE_READWRITE
,
"mbi.Protect is 0x%x, expected 0x%x
\n
"
,
mbi
.
Protect
,
PAGE_READWRITE
);
trace
(
"Check flags of read-only data at %p
\n
"
,
teststring
);
module
=
GetModuleHandle
(
NULL
);
module
=
GetModuleHandle
A
(
NULL
);
status
=
pNtQueryVirtualMemory
(
NtCurrentProcess
(),
teststring
,
MemoryBasicInformation
,
&
mbi
,
sizeof
(
MEMORY_BASIC_INFORMATION
),
&
readcount
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
readcount
==
sizeof
(
MEMORY_BASIC_INFORMATION
),
"Expected to read %d bytes, got %ld
\n
"
,(
int
)
sizeof
(
MEMORY_BASIC_INFORMATION
),
readcount
);
...
...
@@ -1475,7 +1475,7 @@ static void test_affinity(void)
GetSystemInfo
(
&
si
);
status
=
pNtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
proc_affinity
=
(
DWORD_PTR
)
pbi
.
Reserved2
[
0
]
;
proc_affinity
=
pbi
.
AffinityMask
;
ok
(
proc_affinity
==
(
1
<<
si
.
dwNumberOfProcessors
)
-
1
,
"Unexpected process affinity
\n
"
);
proc_affinity
=
1
<<
si
.
dwNumberOfProcessors
;
status
=
pNtSetInformationProcess
(
GetCurrentProcess
(),
ProcessAffinityMask
,
&
proc_affinity
,
sizeof
(
proc_affinity
)
);
...
...
@@ -1534,7 +1534,7 @@ static void test_affinity(void)
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
status
=
pNtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
proc_affinity
=
(
DWORD_PTR
)
pbi
.
Reserved2
[
0
]
;
proc_affinity
=
pbi
.
AffinityMask
;
ok
(
proc_affinity
==
2
,
"Unexpected process affinity
\n
"
);
/* Setting the process affinity changes the thread affinity to match */
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
ThreadBasicInformation
,
&
tbi
,
sizeof
(
tbi
),
NULL
);
...
...
@@ -1578,7 +1578,7 @@ static void test_NtGetCurrentProcessorNumber(void)
trace
(
"dwNumberOfProcessors: %d, current processor: %d
\n
"
,
si
.
dwNumberOfProcessors
,
current_cpu
);
status
=
pNtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
old_process_mask
=
(
DWORD_PTR
)
pbi
.
Reserved2
[
0
]
;
old_process_mask
=
pbi
.
AffinityMask
;
ok
(
status
==
STATUS_SUCCESS
,
"got 0x%x (expected STATUS_SUCCESS)
\n
"
,
status
);
status
=
pNtQueryInformationThread
(
GetCurrentThread
(),
ThreadBasicInformation
,
&
tbi
,
sizeof
(
tbi
),
NULL
);
...
...
dlls/ntdll/tests/pipe.c
View file @
a160a653
...
...
@@ -77,7 +77,7 @@ static DWORD (WINAPI *pQueueUserAPC)(PAPCFUNC pfnAPC, HANDLE hThread, ULONG_PTR
static
BOOL
init_func_ptrs
(
void
)
{
HMODULE
module
=
GetModuleHandle
(
"ntdll.dll"
);
HMODULE
module
=
GetModuleHandle
A
(
"ntdll.dll"
);
#define loadfunc(name) if (!(p##name = (void *)GetProcAddress(module, #name))) { \
trace("GetProcAddress(%s) failed\n", #name); \
...
...
@@ -91,7 +91,7 @@ static BOOL init_func_ptrs(void)
loadfunc
(
RtlInitUnicodeString
)
/* not fatal */
module
=
GetModuleHandle
(
"kernel32.dll"
);
module
=
GetModuleHandle
A
(
"kernel32.dll"
);
pOpenThread
=
(
void
*
)
GetProcAddress
(
module
,
"OpenThread"
);
pQueueUserAPC
=
(
void
*
)
GetProcAddress
(
module
,
"QueueUserAPC"
);
return
TRUE
;
...
...
dlls/ntdll/tests/port.c
View file @
a160a653
...
...
@@ -160,7 +160,7 @@ static BOOL init_function_ptrs(void)
return
FALSE
;
}
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"kernel32.dll"
),
"IsWow64Process"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"kernel32.dll"
),
"IsWow64Process"
);
if
(
!
pIsWow64Process
||
!
pIsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
))
is_wow64
=
FALSE
;
return
TRUE
;
}
...
...
@@ -197,30 +197,30 @@ static void ProcessLpcRequest(HANDLE PortHandle, union lpc_message *LpcMessage)
{
ok
(
LpcMessage
->
msg64
.
MessageType
==
LPC_REQUEST
,
"Expected LPC_REQUEST, got %d
\n
"
,
LpcMessage
->
msg64
.
MessageType
);
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST2
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST2
),
"Expected %s, got %s
\n
"
,
REQUEST2
,
LpcMessage
->
msg64
.
Data
);
l
strcpy
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REPLY
);
strcpy
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REPLY
);
status
=
pNtReplyPort
(
PortHandle
,
&
LpcMessage
->
msg
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %x
\n
"
,
status
);
ok
(
LpcMessage
->
msg64
.
MessageType
==
LPC_REQUEST
,
"Expected LPC_REQUEST, got %d
\n
"
,
LpcMessage
->
msg64
.
MessageType
);
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REPLY
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REPLY
),
"Expected %s, got %s
\n
"
,
REPLY
,
LpcMessage
->
msg64
.
Data
);
}
else
{
ok
(
LpcMessage
->
msg
.
MessageType
==
LPC_REQUEST
,
"Expected LPC_REQUEST, got %d
\n
"
,
LpcMessage
->
msg
.
MessageType
);
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST2
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST2
),
"Expected %s, got %s
\n
"
,
REQUEST2
,
LpcMessage
->
msg
.
Data
);
l
strcpy
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REPLY
);
strcpy
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REPLY
);
status
=
pNtReplyPort
(
PortHandle
,
&
LpcMessage
->
msg
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %x
\n
"
,
status
);
ok
(
LpcMessage
->
msg
.
MessageType
==
LPC_REQUEST
,
"Expected LPC_REQUEST, got %d
\n
"
,
LpcMessage
->
msg
.
MessageType
);
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REPLY
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REPLY
),
"Expected %s, got %s
\n
"
,
REPLY
,
LpcMessage
->
msg
.
Data
);
}
}
...
...
@@ -251,26 +251,26 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
LpcMessage
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
out
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
LpcMessage
->
msg64
.
DataSize
=
l
strlen
(
REQUEST1
)
+
1
;
LpcMessage
->
msg64
.
DataSize
=
strlen
(
REQUEST1
)
+
1
;
LpcMessage
->
msg64
.
MessageSize
=
FIELD_OFFSET
(
LPC_MESSAGE64
,
Data
[
LpcMessage
->
msg64
.
DataSize
]);
l
strcpy
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST1
);
strcpy
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST1
);
status
=
pNtRequestPort
(
PortHandle
,
&
LpcMessage
->
msg
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %x
\n
"
,
status
);
ok
(
LpcMessage
->
msg64
.
MessageType
==
0
,
"Expected 0, got %d
\n
"
,
LpcMessage
->
msg64
.
MessageType
);
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST1
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST1
),
"Expected %s, got %s
\n
"
,
REQUEST1
,
LpcMessage
->
msg64
.
Data
);
/* Fill in the message */
memset
(
LpcMessage
,
0
,
size
);
LpcMessage
->
msg64
.
DataSize
=
l
strlen
(
REQUEST2
)
+
1
;
LpcMessage
->
msg64
.
DataSize
=
strlen
(
REQUEST2
)
+
1
;
LpcMessage
->
msg64
.
MessageSize
=
FIELD_OFFSET
(
LPC_MESSAGE64
,
Data
[
LpcMessage
->
msg64
.
DataSize
]);
l
strcpy
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST2
);
strcpy
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST2
);
/* Send the message and wait for the reply */
status
=
pNtRequestWaitReplyPort
(
PortHandle
,
&
LpcMessage
->
msg
,
&
out
->
msg
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %x
\n
"
,
status
);
ok
(
!
l
strcmp
((
LPSTR
)
out
->
msg64
.
Data
,
REPLY
),
"Expected %s, got %s
\n
"
,
REPLY
,
out
->
msg64
.
Data
);
ok
(
!
strcmp
((
LPSTR
)
out
->
msg64
.
Data
,
REPLY
),
"Expected %s, got %s
\n
"
,
REPLY
,
out
->
msg64
.
Data
);
ok
(
out
->
msg64
.
MessageType
==
LPC_REPLY
,
"Expected LPC_REPLY, got %d
\n
"
,
out
->
msg64
.
MessageType
);
}
else
...
...
@@ -279,26 +279,26 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
LpcMessage
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
out
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
LpcMessage
->
msg
.
DataSize
=
l
strlen
(
REQUEST1
)
+
1
;
LpcMessage
->
msg
.
DataSize
=
strlen
(
REQUEST1
)
+
1
;
LpcMessage
->
msg
.
MessageSize
=
FIELD_OFFSET
(
LPC_MESSAGE
,
Data
[
LpcMessage
->
msg
.
DataSize
]);
l
strcpy
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST1
);
strcpy
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST1
);
status
=
pNtRequestPort
(
PortHandle
,
&
LpcMessage
->
msg
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %x
\n
"
,
status
);
ok
(
LpcMessage
->
msg
.
MessageType
==
0
,
"Expected 0, got %d
\n
"
,
LpcMessage
->
msg
.
MessageType
);
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST1
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST1
),
"Expected %s, got %s
\n
"
,
REQUEST1
,
LpcMessage
->
msg
.
Data
);
/* Fill in the message */
memset
(
LpcMessage
,
0
,
size
);
LpcMessage
->
msg
.
DataSize
=
l
strlen
(
REQUEST2
)
+
1
;
LpcMessage
->
msg
.
DataSize
=
strlen
(
REQUEST2
)
+
1
;
LpcMessage
->
msg
.
MessageSize
=
FIELD_OFFSET
(
LPC_MESSAGE
,
Data
[
LpcMessage
->
msg
.
DataSize
]);
l
strcpy
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST2
);
strcpy
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST2
);
/* Send the message and wait for the reply */
status
=
pNtRequestWaitReplyPort
(
PortHandle
,
&
LpcMessage
->
msg
,
&
out
->
msg
);
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %x
\n
"
,
status
);
ok
(
!
l
strcmp
((
LPSTR
)
out
->
msg
.
Data
,
REPLY
),
"Expected %s, got %s
\n
"
,
REPLY
,
out
->
msg
.
Data
);
ok
(
!
strcmp
((
LPSTR
)
out
->
msg
.
Data
,
REPLY
),
"Expected %s, got %s
\n
"
,
REPLY
,
out
->
msg
.
Data
);
ok
(
out
->
msg
.
MessageType
==
LPC_REPLY
,
"Expected LPC_REPLY, got %d
\n
"
,
out
->
msg
.
MessageType
);
}
...
...
@@ -345,10 +345,10 @@ static void test_ports_server( HANDLE PortHandle )
case
LPC_DATAGRAM
:
if
(
is_wow64
)
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST1
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg64
.
Data
,
REQUEST1
),
"Expected %s, got %s
\n
"
,
REQUEST1
,
LpcMessage
->
msg64
.
Data
);
else
ok
(
!
l
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST1
),
ok
(
!
strcmp
((
LPSTR
)
LpcMessage
->
msg
.
Data
,
REQUEST1
),
"Expected %s, got %s
\n
"
,
REQUEST1
,
LpcMessage
->
msg
.
Data
);
break
;
...
...
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