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
b2b4d1b0
Commit
b2b4d1b0
authored
Mar 05, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Use public field names for FILE_RENAME_INFORMATION.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6305e1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
38 deletions
+38
-38
file.c
dlls/ntdll/file.c
+2
-2
file.c
dlls/ntdll/tests/file.c
+34
-34
winternl.h
include/winternl.h
+2
-2
No files found.
dlls/ntdll/file.c
View file @
b2b4d1b0
...
@@ -2771,14 +2771,14 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
...
@@ -2771,14 +2771,14 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
ObjectName
=
&
name_str
;
attr
.
ObjectName
=
&
name_str
;
attr
.
RootDirectory
=
info
->
RootDir
;
attr
.
RootDirectory
=
info
->
RootDir
ectory
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
;
io
->
u
.
Status
=
nt_to_unix_file_name_attr
(
&
attr
,
&
unix_name
,
FILE_OPEN_IF
);
io
->
u
.
Status
=
nt_to_unix_file_name_attr
(
&
attr
,
&
unix_name
,
FILE_OPEN_IF
);
if
(
io
->
u
.
Status
!=
STATUS_SUCCESS
&&
io
->
u
.
Status
!=
STATUS_NO_SUCH_FILE
)
if
(
io
->
u
.
Status
!=
STATUS_SUCCESS
&&
io
->
u
.
Status
!=
STATUS_NO_SUCH_FILE
)
break
;
break
;
if
(
!
info
->
Replace
&&
io
->
u
.
Status
==
STATUS_SUCCESS
)
if
(
!
info
->
Replace
IfExists
&&
io
->
u
.
Status
==
STATUS_SUCCESS
)
{
{
RtlFreeAnsiString
(
&
unix_name
);
RtlFreeAnsiString
(
&
unix_name
);
io
->
u
.
Status
=
STATUS_OBJECT_NAME_COLLISION
;
io
->
u
.
Status
=
STATUS_OBJECT_NAME_COLLISION
;
...
...
dlls/ntdll/tests/file.c
View file @
b2b4d1b0
...
@@ -1502,8 +1502,8 @@ static void test_file_rename_information(void)
...
@@ -1502,8 +1502,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
DeleteFileW
(
newpath
);
DeleteFileW
(
newpath
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1540,8 +1540,8 @@ static void test_file_rename_information(void)
...
@@ -1540,8 +1540,8 @@ static void test_file_rename_information(void)
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1570,8 +1570,8 @@ static void test_file_rename_information(void)
...
@@ -1570,8 +1570,8 @@ static void test_file_rename_information(void)
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
TRUE
;
fri
->
Replace
IfExists
=
TRUE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1603,8 +1603,8 @@ static void test_file_rename_information(void)
...
@@ -1603,8 +1603,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1637,8 +1637,8 @@ static void test_file_rename_information(void)
...
@@ -1637,8 +1637,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
TRUE
;
fri
->
Replace
IfExists
=
TRUE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1672,8 +1672,8 @@ static void test_file_rename_information(void)
...
@@ -1672,8 +1672,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
DeleteFileW
(
newpath
);
DeleteFileW
(
newpath
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1719,8 +1719,8 @@ static void test_file_rename_information(void)
...
@@ -1719,8 +1719,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
DeleteFileW
(
newpath
);
DeleteFileW
(
newpath
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1759,8 +1759,8 @@ static void test_file_rename_information(void)
...
@@ -1759,8 +1759,8 @@ static void test_file_rename_information(void)
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1795,8 +1795,8 @@ static void test_file_rename_information(void)
...
@@ -1795,8 +1795,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1829,8 +1829,8 @@ static void test_file_rename_information(void)
...
@@ -1829,8 +1829,8 @@ static void test_file_rename_information(void)
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
ok
(
res
!=
0
,
"failed to create temp file
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
TRUE
;
fri
->
Replace
IfExists
=
TRUE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1865,8 +1865,8 @@ static void test_file_rename_information(void)
...
@@ -1865,8 +1865,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
TRUE
;
fri
->
Replace
IfExists
=
TRUE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1902,8 +1902,8 @@ static void test_file_rename_information(void)
...
@@ -1902,8 +1902,8 @@ static void test_file_rename_information(void)
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1938,8 +1938,8 @@ static void test_file_rename_information(void)
...
@@ -1938,8 +1938,8 @@ static void test_file_rename_information(void)
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
TRUE
;
fri
->
Replace
IfExists
=
TRUE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -1977,8 +1977,8 @@ static void test_file_rename_information(void)
...
@@ -1977,8 +1977,8 @@ static void test_file_rename_information(void)
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
TRUE
;
fri
->
Replace
IfExists
=
TRUE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -2011,8 +2011,8 @@ static void test_file_rename_information(void)
...
@@ -2011,8 +2011,8 @@ static void test_file_rename_information(void)
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -2044,8 +2044,8 @@ static void test_file_rename_information(void)
...
@@ -2044,8 +2044,8 @@ static void test_file_rename_information(void)
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
ok
(
success
!=
0
,
"failed to create temp directory
\n
"
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
pRtlDosPathNameToNtPathName_U
(
newpath
,
&
name_str
,
NULL
,
NULL
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
name_str
.
Length
);
fri
->
Replace
=
TRUE
;
fri
->
Replace
IfExists
=
TRUE
;
fri
->
RootDir
=
NULL
;
fri
->
RootDir
ectory
=
NULL
;
fri
->
FileNameLength
=
name_str
.
Length
;
fri
->
FileNameLength
=
name_str
.
Length
;
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
memcpy
(
fri
->
FileName
,
name_str
.
Buffer
,
name_str
.
Length
);
pRtlFreeUnicodeString
(
&
name_str
);
pRtlFreeUnicodeString
(
&
name_str
);
...
@@ -2079,8 +2079,8 @@ static void test_file_rename_information(void)
...
@@ -2079,8 +2079,8 @@ static void test_file_rename_information(void)
ok
(
handle2
!=
INVALID_HANDLE_VALUE
,
"CreateFileW failed
\n
"
);
ok
(
handle2
!=
INVALID_HANDLE_VALUE
,
"CreateFileW failed
\n
"
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
lstrlenW
(
filename
)
*
sizeof
(
WCHAR
)
);
fri
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
FILE_RENAME_INFORMATION
)
+
lstrlenW
(
filename
)
*
sizeof
(
WCHAR
)
);
fri
->
Replace
=
FALSE
;
fri
->
Replace
IfExists
=
FALSE
;
fri
->
RootDir
=
handle2
;
fri
->
RootDir
ectory
=
handle2
;
fri
->
FileNameLength
=
lstrlenW
(
filename
)
*
sizeof
(
WCHAR
);
fri
->
FileNameLength
=
lstrlenW
(
filename
)
*
sizeof
(
WCHAR
);
memcpy
(
fri
->
FileName
,
filename
,
fri
->
FileNameLength
);
memcpy
(
fri
->
FileName
,
filename
,
fri
->
FileNameLength
);
...
...
include/winternl.h
View file @
b2b4d1b0
...
@@ -632,8 +632,8 @@ typedef struct _FILE_NAME_INFORMATION {
...
@@ -632,8 +632,8 @@ typedef struct _FILE_NAME_INFORMATION {
}
FILE_NAME_INFORMATION
,
*
PFILE_NAME_INFORMATION
;
}
FILE_NAME_INFORMATION
,
*
PFILE_NAME_INFORMATION
;
typedef
struct
_FILE_RENAME_INFORMATION
{
typedef
struct
_FILE_RENAME_INFORMATION
{
BOOLEAN
Replace
;
BOOLEAN
Replace
IfExists
;
HANDLE
RootDir
;
HANDLE
RootDir
ectory
;
ULONG
FileNameLength
;
ULONG
FileNameLength
;
WCHAR
FileName
[
1
];
WCHAR
FileName
[
1
];
}
FILE_RENAME_INFORMATION
,
*
PFILE_RENAME_INFORMATION
;
}
FILE_RENAME_INFORMATION
,
*
PFILE_RENAME_INFORMATION
;
...
...
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