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
e8593592
Commit
e8593592
authored
Aug 11, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a wine_get_dos_file_name function in kernel32 as a wrapper
around the new wine_unix_to_nt_file_name.
parent
777cd4f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
kernel32.spec
dlls/kernel/kernel32.spec
+1
-0
path.c
dlls/kernel/path.c
+34
-1
winbase.h
include/winbase.h
+1
-0
No files found.
dlls/kernel/kernel32.spec
View file @
e8593592
...
...
@@ -1261,6 +1261,7 @@
# Unix files
@ cdecl wine_get_unix_file_name(wstr)
@ cdecl wine_get_dos_file_name(str)
# Init code
@ cdecl __wine_kernel_init()
...
...
dlls/kernel/path.c
View file @
e8593592
...
...
@@ -1485,6 +1485,39 @@ char *wine_get_unix_file_name( LPCWSTR dosW )
if
(
!
RtlDosPathNameToNtPathName_U
(
dosW
,
&
nt_name
,
NULL
,
NULL
))
return
NULL
;
status
=
wine_nt_to_unix_file_name
(
&
nt_name
,
&
unix_name
,
FILE_OPEN_IF
,
FALSE
);
RtlFreeUnicodeString
(
&
nt_name
);
if
(
status
&&
status
!=
STATUS_NO_SUCH_FILE
)
return
NULL
;
if
(
status
&&
status
!=
STATUS_NO_SUCH_FILE
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
NULL
;
}
return
unix_name
.
Buffer
;
}
/***********************************************************************
* wine_get_dos_file_name (KERNEL32.@) Not a Windows API
*
* Return the full DOS file name for a given Unix path.
* Returned buffer must be freed by caller.
*/
WCHAR
*
wine_get_dos_file_name
(
LPCSTR
str
)
{
UNICODE_STRING
nt_name
;
ANSI_STRING
unix_name
;
NTSTATUS
status
;
DWORD
len
;
RtlInitAnsiString
(
&
unix_name
,
str
);
status
=
wine_unix_to_nt_file_name
(
&
unix_name
,
&
nt_name
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
NULL
;
}
/* get rid of the \??\ prefix */
/* FIXME: should implement RtlNtPathNameToDosPathName and use that instead */
len
=
nt_name
.
Length
-
4
*
sizeof
(
WCHAR
);
memmove
(
nt_name
.
Buffer
,
nt_name
.
Buffer
+
4
,
len
);
nt_name
.
Buffer
[
len
/
sizeof
(
WCHAR
)]
=
0
;
return
nt_name
.
Buffer
;
}
include/winbase.h
View file @
e8593592
...
...
@@ -2169,6 +2169,7 @@ VOID WINAPI _LeaveSysLevel(SYSLEVEL*);
/* Wine internal functions */
extern
char
*
wine_get_unix_file_name
(
LPCWSTR
dos
);
extern
WCHAR
*
wine_get_dos_file_name
(
LPCSTR
str
);
/* a few optimizations for i386/gcc */
...
...
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