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
c43f6146
Commit
c43f6146
authored
Dec 10, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Dec 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: dll_capable() makes no sense since it's only used on APIs we…
kernel32/tests: dll_capable() makes no sense since it's only used on APIs we link with. So remove it.
parent
f6bdd7dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
file.c
dlls/kernel32/tests/file.c
+0
-19
No files found.
dlls/kernel32/tests/file.c
View file @
c43f6146
...
...
@@ -28,14 +28,6 @@
#include "winbase.h"
#include "winerror.h"
static
int
dll_capable
(
const
char
*
dll
,
const
char
*
function
)
{
HMODULE
module
=
GetModuleHandleA
(
dll
);
if
(
!
module
)
return
0
;
return
(
GetProcAddress
(
module
,
function
)
!=
NULL
);
}
/* keep filename and filenameW the same */
static
const
char
filename
[]
=
"testfile.xxx"
;
static
const
WCHAR
filenameW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'f'
,
'i'
,
'l'
,
'e'
,
'.'
,
'x'
,
'x'
,
'x'
,
0
};
...
...
@@ -1031,7 +1023,6 @@ static void test_LockFile(void)
OVERLAPPED
overlapped
;
int
limited_LockFile
;
int
limited_UnLockFile
;
int
lockfileex_capable
;
handle
=
CreateFileA
(
filename
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
...
...
@@ -1068,9 +1059,6 @@ static void test_LockFile(void)
S
(
U
(
overlapped
)).
OffsetHigh
=
0
;
overlapped
.
hEvent
=
0
;
lockfileex_capable
=
dll_capable
(
"kernel32"
,
"LockFileEx"
);
if
(
lockfileex_capable
)
{
/* Test for broken LockFileEx a la Windows 95 OSR2. */
if
(
LockFileEx
(
handle
,
0
,
0
,
100
,
0
,
&
overlapped
))
{
...
...
@@ -1078,28 +1066,21 @@ static void test_LockFile(void)
ok
(
LockFileEx
(
handle
,
0
,
0
,
100
,
0
,
&
overlapped
),
"LockFileEx 100,100 failed
\n
"
);
}
}
/* overlapping shared locks are OK */
S
(
U
(
overlapped
)).
Offset
=
150
;
limited_UnLockFile
||
ok
(
LockFileEx
(
handle
,
0
,
0
,
100
,
0
,
&
overlapped
),
"LockFileEx 150,100 failed
\n
"
);
/* but exclusive is not */
if
(
lockfileex_capable
)
{
ok
(
!
LockFileEx
(
handle
,
LOCKFILE_EXCLUSIVE_LOCK
|
LOCKFILE_FAIL_IMMEDIATELY
,
0
,
50
,
0
,
&
overlapped
),
"LockFileEx exclusive 150,50 succeeded
\n
"
);
if
(
dll_capable
(
"kernel32.dll"
,
"UnlockFileEx"
))
{
if
(
!
UnlockFileEx
(
handle
,
0
,
100
,
0
,
&
overlapped
))
{
/* UnLockFile is capable. */
S
(
U
(
overlapped
)).
Offset
=
100
;
ok
(
!
UnlockFileEx
(
handle
,
0
,
100
,
0
,
&
overlapped
),
"UnlockFileEx 150,100 again succeeded
\n
"
);
}
}
}
ok
(
LockFile
(
handle
,
0
,
0x10000000
,
0
,
0xf0000000
),
"LockFile failed
\n
"
);
ok
(
!
LockFile
(
handle
,
~
0
,
~
0
,
1
,
0
),
"LockFile ~0,1 succeeded
\n
"
);
...
...
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