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
95012151
Commit
95012151
authored
Jul 06, 2004
by
Mike Hearn
Committed by
Alexandre Julliard
Jul 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct error code returned by CreateFile when given a non-existent
VxD on NT, add a test case.
parent
0394eeed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
file.c
dlls/kernel/tests/file.c
+7
-0
vxd.c
dlls/kernel/vxd.c
+1
-1
No files found.
dlls/kernel/tests/file.c
View file @
95012151
...
...
@@ -637,6 +637,7 @@ static void test_CreateFileW(void)
WCHAR
filename
[
MAX_PATH
];
static
const
WCHAR
emptyW
[]
=
{
'\0'
};
static
const
WCHAR
prefix
[]
=
{
'p'
,
'f'
,
'x'
,
0
};
static
const
WCHAR
bogus
[]
=
{
'\\'
,
'\\'
,
'.'
,
'\\'
,
'B'
,
'O'
,
'G'
,
'U'
,
'S'
,
0
};
DWORD
ret
;
ret
=
GetTempPathW
(
MAX_PATH
,
temp_path
);
...
...
@@ -665,6 +666,12 @@ static void test_CreateFileW(void)
CREATE_NEW
,
FILE_FLAG_RANDOM_ACCESS
,
0
);
ok
(
hFile
==
INVALID_HANDLE_VALUE
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"CreateFileW(
\"\"
) returned ret=%p error=%ld
\n
"
,
hFile
,
GetLastError
());
/* test the result of opening a non-existent driver name */
hFile
=
CreateFileW
(
bogus
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
ok
(
hFile
==
INVALID_HANDLE_VALUE
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"CreateFileW on invalid VxD name returned ret=%p error=%ld
\n
"
,
hFile
,
GetLastError
());
}
static
void
test_GetTempFileNameA
()
...
...
dlls/kernel/vxd.c
View file @
95012151
...
...
@@ -182,7 +182,7 @@ HANDLE VXD_Open( LPCWSTR filenameW, DWORD access, SECURITY_ATTRIBUTES *sa )
if
(
!
(
GetVersion
()
&
0x80000000
))
/* there are no VxDs on NT */
{
SetLastError
(
ERROR_
INVALID_PARAMETER
);
SetLastError
(
ERROR_
FILE_NOT_FOUND
);
return
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