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
3df00e29
Commit
3df00e29
authored
Oct 24, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Oct 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psapi/tests: Fix tests compilation with __WINESRC__ defined.
parent
f309e012
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
Makefile.in
dlls/psapi/tests/Makefile.in
+0
-1
psapi_main.c
dlls/psapi/tests/psapi_main.c
+20
-20
No files found.
dlls/psapi/tests/Makefile.in
View file @
3df00e29
TESTDLL
=
psapi.dll
TESTDLL
=
psapi.dll
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
C_SRCS
=
\
psapi_main.c
psapi_main.c
...
...
dlls/psapi/tests/psapi_main.c
View file @
3df00e29
...
@@ -81,7 +81,7 @@ static BOOL InitFunctionPtrs(HMODULE hpsapi)
...
@@ -81,7 +81,7 @@ static BOOL InitFunctionPtrs(HMODULE hpsapi)
(
void
*
)
GetProcAddress
(
hpsapi
,
"GetProcessImageFileNameA"
);
(
void
*
)
GetProcAddress
(
hpsapi
,
"GetProcessImageFileNameA"
);
pGetProcessImageFileNameW
=
pGetProcessImageFileNameW
=
(
void
*
)
GetProcAddress
(
hpsapi
,
"GetProcessImageFileNameW"
);
(
void
*
)
GetProcAddress
(
hpsapi
,
"GetProcessImageFileNameW"
);
pNtQueryVirtualMemory
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"ntdll.dll"
),
"NtQueryVirtualMemory"
);
pNtQueryVirtualMemory
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"ntdll.dll"
),
"NtQueryVirtualMemory"
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -105,7 +105,7 @@ static void test_EnumProcesses(void)
...
@@ -105,7 +105,7 @@ static void test_EnumProcesses(void)
static
void
test_EnumProcessModules
(
void
)
static
void
test_EnumProcessModules
(
void
)
{
{
HMODULE
hMod
=
GetModuleHandle
(
NULL
);
HMODULE
hMod
=
GetModuleHandle
A
(
NULL
);
DWORD
ret
,
cbNeeded
=
0xdeadbeef
;
DWORD
ret
,
cbNeeded
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -134,8 +134,8 @@ static void test_EnumProcessModules(void)
...
@@ -134,8 +134,8 @@ static void test_EnumProcessModules(void)
ret
=
pEnumProcessModules
(
hpQV
,
&
hMod
,
sizeof
(
HMODULE
),
&
cbNeeded
);
ret
=
pEnumProcessModules
(
hpQV
,
&
hMod
,
sizeof
(
HMODULE
),
&
cbNeeded
);
if
(
ret
!=
1
)
if
(
ret
!=
1
)
return
;
return
;
ok
(
hMod
==
GetModuleHandle
(
NULL
),
ok
(
hMod
==
GetModuleHandle
A
(
NULL
),
"hMod=%p GetModuleHandle
(NULL)=%p
\n
"
,
hMod
,
GetModuleHandle
(
NULL
));
"hMod=%p GetModuleHandle
A(NULL)=%p
\n
"
,
hMod
,
GetModuleHandleA
(
NULL
));
ok
(
cbNeeded
%
sizeof
(
hMod
)
==
0
,
"not a multiple of sizeof(HMODULE) cbNeeded=%d
\n
"
,
cbNeeded
);
ok
(
cbNeeded
%
sizeof
(
hMod
)
==
0
,
"not a multiple of sizeof(HMODULE) cbNeeded=%d
\n
"
,
cbNeeded
);
/* Windows sometimes has a bunch of extra dlls, presumably brought in by
/* Windows sometimes has a bunch of extra dlls, presumably brought in by
* aclayers.dll.
* aclayers.dll.
...
@@ -158,7 +158,7 @@ static void test_EnumProcessModules(void)
...
@@ -158,7 +158,7 @@ static void test_EnumProcessModules(void)
static
void
test_GetModuleInformation
(
void
)
static
void
test_GetModuleInformation
(
void
)
{
{
HMODULE
hMod
=
GetModuleHandle
(
NULL
);
HMODULE
hMod
=
GetModuleHandle
A
(
NULL
);
MODULEINFO
info
;
MODULEINFO
info
;
DWORD
ret
;
DWORD
ret
;
...
@@ -247,7 +247,7 @@ todo_wine
...
@@ -247,7 +247,7 @@ todo_wine
static
void
test_GetMappedFileName
(
void
)
static
void
test_GetMappedFileName
(
void
)
{
{
HMODULE
hMod
=
GetModuleHandle
(
NULL
);
HMODULE
hMod
=
GetModuleHandle
A
(
NULL
);
char
szMapPath
[
MAX_PATH
],
szModPath
[
MAX_PATH
],
*
szMapBaseName
;
char
szMapPath
[
MAX_PATH
],
szModPath
[
MAX_PATH
],
*
szMapBaseName
;
DWORD
ret
;
DWORD
ret
;
char
*
base
;
char
*
base
;
...
@@ -288,26 +288,26 @@ todo_wine
...
@@ -288,26 +288,26 @@ todo_wine
}
}
}
}
GetTempPath
(
MAX_PATH
,
temp_path
);
GetTempPath
A
(
MAX_PATH
,
temp_path
);
GetTempFileName
(
temp_path
,
"map"
,
0
,
file_name
);
GetTempFileName
A
(
temp_path
,
"map"
,
0
,
file_name
);
drive
[
0
]
=
file_name
[
0
];
drive
[
0
]
=
file_name
[
0
];
drive
[
1
]
=
':'
;
drive
[
1
]
=
':'
;
drive
[
2
]
=
0
;
drive
[
2
]
=
0
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
QueryDosDevice
(
drive
,
device_name
,
sizeof
(
device_name
));
ret
=
QueryDosDevice
A
(
drive
,
device_name
,
sizeof
(
device_name
));
ok
(
ret
,
"QueryDosDevice error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"QueryDosDevice
A
error %d
\n
"
,
GetLastError
());
trace
(
"%s -> %s
\n
"
,
drive
,
device_name
);
trace
(
"%s -> %s
\n
"
,
drive
,
device_name
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hfile
=
CreateFile
(
file_name
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
hfile
=
CreateFile
A
(
file_name
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
ok
(
hfile
!=
INVALID_HANDLE_VALUE
,
"CreateFile(%s) error %d
\n
"
,
file_name
,
GetLastError
());
ok
(
hfile
!=
INVALID_HANDLE_VALUE
,
"CreateFile
A
(%s) error %d
\n
"
,
file_name
,
GetLastError
());
SetFilePointer
(
hfile
,
0x4000
,
NULL
,
FILE_BEGIN
);
SetFilePointer
(
hfile
,
0x4000
,
NULL
,
FILE_BEGIN
);
SetEndOfFile
(
hfile
);
SetEndOfFile
(
hfile
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hmap
=
CreateFileMapping
(
hfile
,
NULL
,
PAGE_READONLY
|
SEC_COMMIT
,
0
,
0
,
NULL
);
hmap
=
CreateFileMapping
A
(
hfile
,
NULL
,
PAGE_READONLY
|
SEC_COMMIT
,
0
,
0
,
NULL
);
ok
(
hmap
!=
0
,
"CreateFileMapping error %d
\n
"
,
GetLastError
());
ok
(
hmap
!=
0
,
"CreateFileMapping
A
error %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
base
=
MapViewOfFile
(
hmap
,
FILE_MAP_READ
,
0
,
0
,
0
);
base
=
MapViewOfFile
(
hmap
,
FILE_MAP_READ
,
0
,
0
,
0
);
...
@@ -382,11 +382,11 @@ todo_wine
...
@@ -382,11 +382,11 @@ todo_wine
UnmapViewOfFile
(
base
);
UnmapViewOfFile
(
base
);
CloseHandle
(
hmap
);
CloseHandle
(
hmap
);
CloseHandle
(
hfile
);
CloseHandle
(
hfile
);
DeleteFile
(
file_name
);
DeleteFile
A
(
file_name
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hmap
=
CreateFileMapping
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READONLY
|
SEC_COMMIT
,
0
,
4096
,
NULL
);
hmap
=
CreateFileMapping
A
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READONLY
|
SEC_COMMIT
,
0
,
4096
,
NULL
);
ok
(
hmap
!=
0
,
"CreateFileMapping error %d
\n
"
,
GetLastError
());
ok
(
hmap
!=
0
,
"CreateFileMapping
A
error %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
base
=
MapViewOfFile
(
hmap
,
FILE_MAP_READ
,
0
,
0
,
0
);
base
=
MapViewOfFile
(
hmap
,
FILE_MAP_READ
,
0
,
0
,
0
);
...
@@ -404,7 +404,7 @@ todo_wine
...
@@ -404,7 +404,7 @@ todo_wine
static
void
test_GetProcessImageFileName
(
void
)
static
void
test_GetProcessImageFileName
(
void
)
{
{
HMODULE
hMod
=
GetModuleHandle
(
NULL
);
HMODULE
hMod
=
GetModuleHandle
A
(
NULL
);
char
szImgPath
[
MAX_PATH
],
szMapPath
[
MAX_PATH
];
char
szImgPath
[
MAX_PATH
],
szMapPath
[
MAX_PATH
];
WCHAR
szImgPathW
[
MAX_PATH
];
WCHAR
szImgPathW
[
MAX_PATH
];
DWORD
ret
,
ret1
;
DWORD
ret
,
ret1
;
...
@@ -482,7 +482,7 @@ static void test_GetProcessImageFileName(void)
...
@@ -482,7 +482,7 @@ static void test_GetProcessImageFileName(void)
static
void
test_GetModuleFileNameEx
(
void
)
static
void
test_GetModuleFileNameEx
(
void
)
{
{
HMODULE
hMod
=
GetModuleHandle
(
NULL
);
HMODULE
hMod
=
GetModuleHandle
A
(
NULL
);
char
szModExPath
[
MAX_PATH
+
1
],
szModPath
[
MAX_PATH
+
1
];
char
szModExPath
[
MAX_PATH
+
1
],
szModPath
[
MAX_PATH
+
1
];
WCHAR
buffer
[
MAX_PATH
];
WCHAR
buffer
[
MAX_PATH
];
DWORD
ret
;
DWORD
ret
;
...
@@ -541,7 +541,7 @@ static void test_GetModuleFileNameEx(void)
...
@@ -541,7 +541,7 @@ static void test_GetModuleFileNameEx(void)
static
void
test_GetModuleBaseName
(
void
)
static
void
test_GetModuleBaseName
(
void
)
{
{
HMODULE
hMod
=
GetModuleHandle
(
NULL
);
HMODULE
hMod
=
GetModuleHandle
A
(
NULL
);
char
szModPath
[
MAX_PATH
],
szModBaseName
[
MAX_PATH
];
char
szModPath
[
MAX_PATH
],
szModBaseName
[
MAX_PATH
];
DWORD
ret
;
DWORD
ret
;
...
...
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