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
b8d1560a
Commit
b8d1560a
authored
Jun 18, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Fix the device open code for the new NtCreateFile syntax for Unix files.
parent
8e53a002
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
int21.c
dlls/winedos/int21.c
+6
-3
No files found.
dlls/winedos/int21.c
View file @
b8d1560a
...
...
@@ -845,6 +845,7 @@ static BOOL INT21_SetCurrentDirectory( CONTEXT86 *context )
*/
static
HANDLE
INT21_CreateMagicDeviceHandle
(
LPCWSTR
name
)
{
static
const
WCHAR
prefixW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'u'
,
'n'
,
'i'
,
'x'
};
const
char
*
dir
=
wine_get_server_dir
();
int
len
;
HANDLE
ret
;
...
...
@@ -854,14 +855,16 @@ static HANDLE INT21_CreateMagicDeviceHandle( LPCWSTR name )
IO_STATUS_BLOCK
io
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
dir
,
-
1
,
NULL
,
0
);
nameW
.
Length
=
(
len
+
1
+
strlenW
(
name
))
*
sizeof
(
WCHAR
);
nameW
.
Length
=
sizeof
(
prefixW
)
+
(
len
+
strlenW
(
name
))
*
sizeof
(
WCHAR
);
nameW
.
MaximumLength
=
nameW
.
Length
+
sizeof
(
WCHAR
);
if
(
!
(
nameW
.
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nameW
.
Length
)))
if
(
!
(
nameW
.
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nameW
.
Maximum
Length
)))
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
0
;
}
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
dir
,
-
1
,
nameW
.
Buffer
,
len
);
memcpy
(
nameW
.
Buffer
,
prefixW
,
sizeof
(
prefixW
)
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
dir
,
-
1
,
nameW
.
Buffer
+
sizeof
(
prefixW
)
/
sizeof
(
WCHAR
),
len
);
len
+=
sizeof
(
prefixW
)
/
sizeof
(
WCHAR
);
nameW
.
Buffer
[
len
-
1
]
=
'/'
;
strcpyW
(
nameW
.
Buffer
+
len
,
name
);
...
...
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