You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling ContinueDebugEvent, the third flag parameter is supposed to be one of the constants DBG_CONTINUE, DBG_EXCEPTION_NOT_HANDLED, or DBG_REPLY_LATER, according to the documentation. Trying to pass any of these parameters, however, results in a type error, as they have type NTSTATUS, while the ContinueDebugEvent event parameter is a u32. Even appending .0 doesn't help, as the internal type of NTSTATUS is i32.
use windows::Win32::Foundation::DBG_CONTINUE;use windows::Win32::System::Diagnostics::Debug::ContinueDebugEvent;fnmain(){ContinueDebugEvent(0,0,DBG_CONTINUE);}
Crate manifest
[dependencies.windows]
version = "0.43"features = ["Win32_Foundation", "Win32_System_Diagnostics_Debug"]
Expected behavior
The third parameter type for ContinueDebugEvent matches the type of its constants
Actual behavior
The third parameter type differs, resulting in extra difficulty calling the function
Additional comments
No response
The text was updated successfully, but these errors were encountered:
It looks like the Windows SDK defines these constants as either NTSTATUS or DWORD depending on whether you include ntstatus.h or winnt.h. I'm not sure what the solution is here but I'll transfer the issue to the Win32 metadata repo where these definitions are produced.
I had a quick peek at the ContinueDebugEvent implementation and it just treats the parameter as an NTSTATUS value so perhaps we just update the signature to expect an NTSTATUS.
Which crate is this about?
windows
Crate version
0.43.0
Summary
When calling
ContinueDebugEvent
, the third flag parameter is supposed to be one of the constantsDBG_CONTINUE
,DBG_EXCEPTION_NOT_HANDLED
, orDBG_REPLY_LATER
, according to the documentation. Trying to pass any of these parameters, however, results in a type error, as they have typeNTSTATUS
, while theContinueDebugEvent
event parameter is au32
. Even appending.0
doesn't help, as the internal type ofNTSTATUS
isi32
.Toolchain version/configuration
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\runet.rustup
installed toolchains
stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc (default)
dev
dev1
installed targets for active toolchain
wasm32-unknown-unknown
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
active toolchain
nightly-x86_64-pc-windows-msvc (default)
rustc 1.67.0-nightly (edf018221 2022-11-02)
Reproducible example
Crate manifest
Expected behavior
The third parameter type for
ContinueDebugEvent
matches the type of its constantsActual behavior
The third parameter type differs, resulting in extra difficulty calling the function
Additional comments
No response
The text was updated successfully, but these errors were encountered: