VirtualBox

Changeset 96586 in vbox for trunk/src/VBox/Runtime/r3/win


Ignore:
Timestamp:
Sep 3, 2022 2:35:25 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153463
Message:

IPRT/nocrt: The pcbWritten parameter of WriteFile must always be specified, as it is not optional on older windows versions (NT3.1 at least). bugref:10261

Location:
trunk/src/VBox/Runtime/r3/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/nocrt-RTLogWriteStdErr-win.cpp

    r96407 r96586  
    4949    HANDLE hStdErr = GetStdHandle(STD_ERROR_HANDLE);
    5050    if (hStdErr != NULL && hStdErr != INVALID_HANDLE_VALUE)
    51         WriteFile(hStdErr, pch, (DWORD)cb, NULL, NULL); /** @todo do we need to translate \\n to \\r\\n? */
     51    {
     52        DWORD cbIgn; /* NT3.1 requires the return size parameter. */
     53        WriteFile(hStdErr, pch, (DWORD)cb, &cbIgn, NULL); /** @todo do we need to translate \\n to \\r\\n? */
     54    }
    5255}
    5356RT_EXPORT_SYMBOL(RTLogWriteStdErr);
  • trunk/src/VBox/Runtime/r3/win/nocrt-RTLogWriteStdOut-win.cpp

    r96407 r96586  
    5050    HANDLE hStdErr = GetStdHandle(STD_OUTPUT_HANDLE);
    5151    if (hStdErr != NULL && hStdErr != INVALID_HANDLE_VALUE)
    52         WriteFile(hStdErr, pch, (DWORD)cb, NULL, NULL); /** @todo do we need to translate \\n to \\r\\n? */
     52    {
     53        DWORD cbIgn; /* NT3.1 requires the return size parameter. */
     54        WriteFile(hStdErr, pch, (DWORD)cb, &cbIgn, NULL); /** @todo do we need to translate \\n to \\r\\n? */
     55    }
    5356}
    5457RT_EXPORT_SYMBOL(RTLogWriteStdOut);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette