https://git.reactos.org/?p=reactos.git;a=commitdiff;h=45a643a136eedf8b39d22f5add94fd372320fdee

commit 45a643a136eedf8b39d22f5add94fd372320fdee
Author:     Pierre Schweitzer <[email protected]>
AuthorDate: Tue Nov 12 23:46:53 2019 +0100
Commit:     Pierre Schweitzer <[email protected]>
CommitDate: Tue Nov 12 23:46:53 2019 +0100

    [SHELLBTRFS] Addendum to 1725ddf
---
 dll/shellext/shellbtrfs/contextmenu.cpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/dll/shellext/shellbtrfs/contextmenu.cpp 
b/dll/shellext/shellbtrfs/contextmenu.cpp
index 3fbca1cb7c2..bf4b5e92c09 100755
--- a/dll/shellext/shellbtrfs/contextmenu.cpp
+++ b/dll/shellext/shellbtrfs/contextmenu.cpp
@@ -833,15 +833,25 @@ void BtrfsContextMenu::reflink_copy(HWND hwnd, const 
WCHAR* fn, const WCHAR* dir
                 streambufsize += 0x1000;
                 streambuf.resize(streambufsize);
 
+#ifndef __REACTOS__
                 memset(streambuf.data(), 0, streambufsize);
 
                 Status = NtQueryInformationFile(source, &iosb, 
streambuf.data(), streambufsize, FileStreamInformation);
+#else
+                memset(&streambuf[0], 0, streambufsize);
+
+                Status = NtQueryInformationFile(source, &iosb, &streambuf[0], 
streambufsize, FileStreamInformation);
+#endif
             } while (Status == STATUS_BUFFER_OVERFLOW);
 
             if (!NT_SUCCESS(Status))
                 throw ntstatus_error(Status);
 
+#ifndef __REACTOS__
             auto fsi = 
reinterpret_cast<FILE_STREAM_INFORMATION*>(streambuf.data());
+#else
+            auto fsi = 
reinterpret_cast<FILE_STREAM_INFORMATION*>(&streambuf[0]);
+#endif
 
             while (true) {
                 if (fsi->StreamNameLength > 0) {
@@ -1525,15 +1535,25 @@ static void reflink_copy2(const wstring& srcfn, const 
wstring& destdir, const ws
                 streambufsize += 0x1000;
                 streambuf.resize(streambufsize);
 
+#ifndef __REACTOS__
                 memset(streambuf.data(), 0, streambufsize);
 
                 Status = NtQueryInformationFile(source, &iosb, 
streambuf.data(), streambufsize, FileStreamInformation);
+#else
+                memset(&streambuf[0], 0, streambufsize);
+
+                Status = NtQueryInformationFile(source, &iosb, &streambuf[0], 
streambufsize, FileStreamInformation);
+#endif
             } while (Status == STATUS_BUFFER_OVERFLOW);
 
             if (!NT_SUCCESS(Status))
                 throw ntstatus_error(Status);
 
+#ifndef __REACTOS__
             auto fsi = 
reinterpret_cast<FILE_STREAM_INFORMATION*>(streambuf.data());
+#else
+            auto fsi = 
reinterpret_cast<FILE_STREAM_INFORMATION*>(&streambuf[0]);
+#endif
 
             while (true) {
                 if (fsi->StreamNameLength > 0) {

Reply via email to