History log of /libuv/src/win/winapi.c (Results 1 – 25 of 38)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 65e37353 02-Oct-2024 Rialbat

win: fix pNtQueryDirectoryFile check

Fixed incorrect verification of the pNtQueryDirectoryFile pointer.


# 4e310d0f 30-Jul-2024 Hüseyin Açacak <110401522+huseyinacacak-janea@users.noreply.github.com>

win,fs: use the new Windows fast stat API (#4327)

Windows added a new API for file information, which doesn't have to
open the file thus greatly improving performance:
https://learn.

win,fs: use the new Windows fast stat API (#4327)

Windows added a new API for file information, which doesn't have to
open the file thus greatly improving performance:
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getfileinformationbyname

The stat functions are already covered by tests, so no test was added
here. I considered comparing the result of old and new code, but that
would require exposing internal fs functions, and we would be testing
Windows functionality, not libuv.

show more ...


# d54c92e3 15-Feb-2022 Jameson Nash

win: fix style nits [NFC] (#3474)

Internal functions usually have a uv__ prefix.


# cf7f70c2 13-Feb-2022 jonilaitinen

win: restrict system DLL load paths (#3395)

Currently `LoadLibraryA` call first attempts to load the given DLL from
the application working directory before loading it from the system DL

win: restrict system DLL load paths (#3395)

Currently `LoadLibraryA` call first attempts to load the given DLL from
the application working directory before loading it from the system DLL
path. This may pose a security risk if an attacker is able to place a
malicious DLL into the application working directory as that DLL will
be loaded instead of the system DLL. This is especially dangerous if
the application is running with elevated privileges.

This changes the DLL loading to use `LoadLibraryExA` method with
`LOAD_LIBRARY_SEARCH_SYSTEM32` flag which restricts the DLL load
path to system DLL path, ignoring any DLLs in the application working
directory.

show more ...


# 26b2e5db 01-Nov-2021 Nicolas Noble

win: fix build for mingw32 (#3340)

Commit e9c524aa from pull request https://github.com/libuv/libuv/pull/3149
introduced a hard dependency on `GetHostnameW`, which isn't declared
yet

win: fix build for mingw32 (#3340)

Commit e9c524aa from pull request https://github.com/libuv/libuv/pull/3149
introduced a hard dependency on `GetHostnameW`, which isn't declared
yet in mingw distributions (see
https://github.com/msys2/MINGW-packages/issues/9667).

This prevents the current version of libuv from building on many mingw
distributions, until such time the next version of mingw is released with
the correct definition for `GetHostnameW`, preventing a lot of projects
depending on libuv from building on mingw properly, as not all
distributions will update to head immediately anyway.

Instead of waiting, let's find the definition ourselves using
`GetProcAddress` and use the pointer instead.

PR-URL: https://github.com/libuv/libuv/pull/3340

show more ...


Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0
# 335e8a6d 06-Apr-2020 Ben Noordhuis

win: use RtlGenRandom from advapi32.dll directly

At least two people have reported that `LoadLibrary("advapi32.dll")`
fails in some configurations.

Libuv already links against a

win: use RtlGenRandom from advapi32.dll directly

At least two people have reported that `LoadLibrary("advapi32.dll")`
fails in some configurations.

Libuv already links against advapi32.dll so let's sidestep the issue
by linking to `RtlGenRandom()` directly instead of looking it up at
runtime.

Fixes: https://github.com/libuv/libuv/issues/2759
PR-URL: https://github.com/libuv/libuv/pull/2762
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


Revision tags: v1.35.0, v1.34.2, v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0
# 4ed2a78f 22-Jun-2019 Ben Noordhuis

unix,win: add uv_random()

Add an API for obtaining cryptographically strong random data from the
system PRNG.

Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
Refs: https

unix,win: add uv_random()

Add an API for obtaining cryptographically strong random data from the
system PRNG.

Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
Refs: https://github.com/libuv/libuv/pull/1055
PR-URL: https://github.com/libuv/libuv/pull/2347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# dabc737d 22-May-2019 Javier Blazquez

win: prevent tty event explosion machine hang

The tty subsystem on Windows was listening for console events from all
processes to detect when our console window was being resized. This

win: prevent tty event explosion machine hang

The tty subsystem on Windows was listening for console events from all
processes to detect when our console window was being resized. This
could cause an explosion in the number of events queued by the system
when running many console applications in parallel that all wrote to
their console quickly. The end result was a complete machine hang.

Now we determine, whenever possible, what our corresponding conhost.exe
process is and listen for console events from that process only. This
detection does not work in 32-bit applications running on 64-bit
Windows so those default to the old behavior of listening to all
processes.

PR-URL: https://github.com/libuv/libuv/pull/2308
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>

show more ...

Revision tags: v1.29.1, v1.29.0, v1.28.0, v1.27.0, v1.26.0, v1.25.0
# d4288bbe 04-Jan-2019 cjihrig

unix,win: add uv_os_uname()

Fixes: https://github.com/libuv/libuv/issues/2126
PR-URL: https://github.com/libuv/libuv/pull/2128
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Rev

unix,win: add uv_os_uname()

Fixes: https://github.com/libuv/libuv/issues/2126
PR-URL: https://github.com/libuv/libuv/pull/2128
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

Revision tags: v1.24.1, v1.24.0, v1.23.2, v1.23.1
# 153ea114 28-Aug-2018 Jameson Nash

Partially revert "win,code: remove GetQueuedCompletionStatus-based poller"

This reverts commit fd8d212a802a1f2b2aa29bfca93b72f0875f3c2d,
and thereby restores partial support for using li

Partially revert "win,code: remove GetQueuedCompletionStatus-based poller"

This reverts commit fd8d212a802a1f2b2aa29bfca93b72f0875f3c2d,
and thereby restores partial support for using libuv under Wine
(which does not implement GetQueuedCompletionStatusEx).

PR-URL: https://github.com/libuv/libuv/pull/1963
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>

show more ...

Revision tags: v1.23.0, v1.22.0, v1.21.0
# a7493d8a 30-May-2018 Bert Belder

win: remove the remaining dynamic kernel32 imports

They were only there to aid Windows XP support, which libuv no longer
does.

PR-URL: https://github.com/libuv/libuv/pull/1858

win: remove the remaining dynamic kernel32 imports

They were only there to aid Windows XP support, which libuv no longer
does.

PR-URL: https://github.com/libuv/libuv/pull/1858
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>

show more ...

# fd8d212a 30-May-2018 Bert Belder

win,code: remove GetQueuedCompletionStatus-based poller

All Windows versions that libuv supports have GetQueuedCompletionStatusEx,
so this fallback option is no longer needed.

P

win,code: remove GetQueuedCompletionStatus-based poller

All Windows versions that libuv supports have GetQueuedCompletionStatusEx,
so this fallback option is no longer needed.

PR-URL: https://github.com/libuv/libuv/pull/1858
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>

show more ...

# 13e8b15e 28-May-2018 Bert Belder

win,thread: remove fallback uv_cond implementation

The fallback implementation existed to support Windows XP and Server 2003,
but these old versions of windows are no longer supporter by

win,thread: remove fallback uv_cond implementation

The fallback implementation existed to support Windows XP and Server 2003,
but these old versions of windows are no longer supporter by libuv.

PR-URL: https://github.com/libuv/libuv/pull/1852
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# e318e001 29-May-2018 Bert Belder

Revert "win: add Windows XP support to uv_if_indextoname()"

Libuv is not supported on Windows XP, as stated in the
SUPPORTED_PLATFORMS document. It also can't possibly work because
`

Revert "win: add Windows XP support to uv_if_indextoname()"

Libuv is not supported on Windows XP, as stated in the
SUPPORTED_PLATFORMS document. It also can't possibly work because
`ReOpenFile()` in src/win/fs.c is not weakly linked, so any executable
that links libuv would simply fail to load on XP.

This reverts commit 17eaa956bde35daad99b36b820daf8e8227add74.

Refs: https://github.com/libuv/libuv/pull/1810
PR-URL: https://github.com/libuv/libuv/pull/1854
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 4f60e0c1 23-May-2018 Bert Belder

win,pipe: refactor pipe read cancellation logic

* Don't silently ignore ERROR_OPERATION_ABORTED.

Code to silently ignore this error was added in c42a4ca, under the
false pre

win,pipe: refactor pipe read cancellation logic

* Don't silently ignore ERROR_OPERATION_ABORTED.

Code to silently ignore this error was added in c42a4ca, under the
false premise that this error is somehow equivalent to EINTR on posix
platforms. This isn't true; ERROR_OPERATION_ABORTED doesn't happen
unless the application explicitly aborts an I/O operation.

Silently ignoring this error elsewhere could potentially hide bugs,
hence libuv shouldn't do it. Instead, explicitly deal with it where
it is expected.

* Don't mark aborted reads as successful.

The worker thread used to call ReadFile() on synchronous pipes would
incorrectly mark cancelled read requests as successful, leading to
issues later on.

* Rely on main thread to restart aborted reads.

After a blocking ReadFile() call was cancelled, the worker thread
would previously attempt to restart it immediately, making
synchronization logic needlessly complex. Instead, we simply cancel
the operation, and leave it to the main loop to restart it if so
desired.

Since we now realy on the main thread to restart interrupted
ReadFile() calls, we can now have a single function interrupts a
synchronous read until the event loop restarts it again.

* Clean up uv__pipe_read_stop().

A single function to interrupt blocking reads also allows us to
remove weird logic in uv__pipe_read_stop() that quickly pauses and
unpauses a read operation in the hope of cancelling it.

* Assume CancelIo() and CancelSynchronousIo() are always available.

Since libuv doesn't support windows XP and Server 2003 any more, we
can assume that these APIs are always available, and do away with
branching around them.

PR-URL: https://github.com/libuv/libuv/pull/1843
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

show more ...

Revision tags: v1.20.3, v1.20.2
# 17eaa956 20-Apr-2018 ssrlive <30760636+ssrlive@users.noreply.github.com>

win: add Windows XP support to uv_if_indextoname()

This commit attempts to dynamically load
ConvertInterfaceIndexToLuid() and ConvertInterfaceLuidToNameW()
from iphlpapi.dll before u

win: add Windows XP support to uv_if_indextoname()

This commit attempts to dynamically load
ConvertInterfaceIndexToLuid() and ConvertInterfaceLuidToNameW()
from iphlpapi.dll before using them. If they are not available,
UV_ENOSYS is returned.

PR-URL: https://github.com/libuv/libuv/pull/1810
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.20.1, v1.20.0, v1.19.2, v1.19.1, v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0
# e7f4e9ec 03-Nov-2017 Bartosz Sosnowski

tty, win: get SetWinEventHook pointer at startup

SetWinEventHook is not available on some Windows versions.

Fixes: https://github.com/nodejs/node/issues/16603
Reviewed-By: Ben N

tty, win: get SetWinEventHook pointer at startup

SetWinEventHook is not available on some Windows versions.

Fixes: https://github.com/nodejs/node/issues/16603
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.15.0, v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0
# fd39cec4 27-Apr-2017 Jameson Nash

build: add -Wstrict-prototypes

Fixes: https://github.com/libuv/libuv/pull/1320
PR-URL: https://github.com/libuv/libuv/pull/1326
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Revie

build: add -Wstrict-prototypes

Fixes: https://github.com/libuv/libuv/pull/1320
PR-URL: https://github.com/libuv/libuv/pull/1326
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.11.0, v1.10.2, v1.10.1, v1.10.0
# 6fa3524e 26-Jul-2016 Bartosz Sosnowski

win: evaluate timers when system wakes up

When Windows resumes after sleep GetQueuedCompletionStatus timeout is
not updated. This commit adds a method for signaling all loops to
wake

win: evaluate timers when system wakes up

When Windows resumes after sleep GetQueuedCompletionStatus timeout is
not updated. This commit adds a method for signaling all loops to
wake up and update their timers.

Fixes: https://github.com/nodejs/node/issues/6763
PR-URL: https://github.com/libuv/libuv/pull/962
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.37, v1.9.1, v1.9.0, v1.8.0, v1.7.5
# e76b8838 18-Sep-2015 Yuval Brik

fs: add uv_fs_realpath()

Equivalent to realpath(3), returns the full resolved absolute path of a
file or directory.

PR-URL: https://github.com/libuv/libuv/pull/531
Reviewed-

fs: add uv_fs_realpath()

Equivalent to realpath(3), returns the full resolved absolute path of a
file or directory.

PR-URL: https://github.com/libuv/libuv/pull/531
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 98239224 17-Sep-2015 Bert Belder

win: don't fetch function pointers to SRWLock APIs

They're no longer needed, since the Windows-native SRWLock functions are
no longer used.

PR-URL: https://github.com/libuv/libu

win: don't fetch function pointers to SRWLock APIs

They're no longer needed, since the Windows-native SRWLock functions are
no longer used.

PR-URL: https://github.com/libuv/libuv/pull/525
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.7.4, v1.7.3, v1.7.2, v1.7.1, v1.7.0, v1.6.1, v1.6.0, v1.5.0, v0.10.36, v1.4.2, v0.10.35, v1.4.1, v0.10.34, v1.4.0, v1.3.0, v0.10.33, v1.2.1, v1.2.0, v0.10.32
# 7a322479 03-Jan-2015 Bert Belder

win: make available NtQueryDirectoryFile

PR-URL: https://github.com/libuv/libuv/pull/105
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gma

win: make available NtQueryDirectoryFile

PR-URL: https://github.com/libuv/libuv/pull/105
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.1.0, v0.10.31, v1.0.2, v0.10.30, v1.0.1, v1.0.0, v0.10.29, v1.0.0-rc2, v1.0.0-rc1, v0.11.29, v0.11.28, v0.11.27, v0.10.28
# 837c62c7 15-Jul-2014 Jameson Nash

windows: make uv_read_stop immediately stop reading

This implements locking around the blocking call to ReadFile to get
around a Windows kernel bug where a blocking ReadFile operation on

windows: make uv_read_stop immediately stop reading

This implements locking around the blocking call to ReadFile to get
around a Windows kernel bug where a blocking ReadFile operation on a
stream can deadlock the thread. This allows uv_read_stop to immediately
cancel a pending IO operation, and allows uv_pipe_getsockname to
"pause" any pending read (from libuv) while it retrieves the
sockname information.

If unsupported by the OS (pre-Vista), this reverts to the old
(e.g. deadlock-prone) behavior

Closes #1313

show more ...

Revision tags: v0.11.26, v0.10.27, v0.11.25, v0.11.24, v0.11.23, v0.10.26, v0.11.22, v0.11.21, v0.11.20, v0.10.25, v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17, v0.10.21, v0.11.16, v0.10.20, v0.11.15, v0.10.19, v0.11.14, v0.10.18, v0.10.17, v0.10.16, v0.11.13, v0.11.12, v0.11.11, v0.11.10
# 315d7001 24-Aug-2013 Bert Belder

windows: make it possible to use NtQueryVolumeInformationFile

This commit adds bootstrap code, function signatures, struct definitions
etc. to make it possible for libuv to use NtQueryVo

windows: make it possible to use NtQueryVolumeInformationFile

This commit adds bootstrap code, function signatures, struct definitions
etc. to make it possible for libuv to use NtQueryVolumeInformationFile.

Most of this comes from the NT DDK, which libuv mirrors so that people
don't need the DDK to compile it.

show more ...

Revision tags: v0.10.15, v0.11.9, v0.10.14, v0.11.8, v0.11.7, v0.10.13, v0.11.6, v0.10.12, v0.11.5, v0.10.11, v0.10.10, v0.11.4, v0.10.9, v0.10.8, v0.11.3, v0.10.7, v0.10.6, v0.11.2, v0.10.5, v0.10.4, v0.11.1, node-v0.11.0, v0.10.2, node-v0.7.3, node-v0.7.7, node-v0.7.5, node-v0.5.3, node-v0.10.1, node-v0.10.0, node-v0.9.12, node-v0.9.11, node-v0.8.21, node-v0.8.19, node-v0.9.10, node-v0.9.7, node-v0.9.6, node-v0.9.4, node-v0.8.17, node-v0.8.15, node-v0.9.3, node-v0.8.12
# 976c8a43 05-Oct-2012 Hiroaki Nakamura

Add support for condition variables on all platforms

12