Comments (3)
Are you encountering any buggy behavior that is affected by this? Technically, I think the most correct solution here is that bindgen generates extern system
:
extern "system" -- Usually the same as extern "C", except on Win32, in which case it's "stdcall", or what you should use to link to the Windows API itself
--From https://doc.rust-lang.org/reference/items/external-blocks.html
Functionally, there should be no difference in behavior here because on ARM and x64 processors, __stdcall
is accepted and ignored by the compiler. 64-bit targets use the x64 calling convention. On Windows targets, extern "C"
is equivalent to extern "win64"
, which is Rust's moniker for Window's x64 calling convention
from windows-drivers-rs.
@wmmc88, sure, there are no problems in x64, but for the correctness it would be great to use "stdcall" or "system" as you stated above - for example, for cases of building a 32-bit driver for legacy Windows. And just because it's just correct 🙂
from windows-drivers-rs.
Per our current support policy:
This project was built with support of WDM, KMDF, and UMDF drivers in mind, as well as Win32 Services. This includes support for all versions of WDF included in WDK 22H2 and newer.
Since NI WDK (22H2) does not support 32-bit drivers, we do not currently have plans to support this scenario. However, if the change to emit extern "system"
instead of extern "C"
is minimally invasive, then we would consider a PR.
from windows-drivers-rs.
Related Issues (20)
- failed to load source for dependency `wdk-build` HOT 8
- Driver installation crashes when using `EvtIoInternalDeviceControl`
- error HOT 2
- Unable to make fresh project HOT 1
- Bindgen Clang compile error in wdk-sys - missing preprocessor defines HOT 6
- Usability improvements
- staticlib
- Need install wdk? HOT 1
- Automatically generate dependabot-style update prs for dependencies not supported by dependabot
- LINK : fatal error LNK1181: cannot open input file 'windows.0.52.0.lib' HOT 2
- blocklist certain warnings from bindgen
- Support Specifying `_NT_TARGET_VERSION` in `metadata.wdk` for driver configuration HOT 3
- Nightly toolchain has clippy failures in wdk_build
- Expand idiomatic Rust abstractions for WDF APIs
- Attribute macro for WDF callbacks
- Add end version for InfVerif `condition_script`
- Replace `rust-condition-script-cargo_make_current_task_initial_makefile_directory-substitution` plugin with new cargo make feature
- Move infverif samples `condition_script` into `cargo_make.rs`
- Incorrect definition for PDRIVER_UNLOAD routine HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-drivers-rs.