Coder Social home page Coder Social logo

Comments (3)

wmmc88 avatar wmmc88 commented on June 15, 2024

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.

HoShiMin avatar HoShiMin commented on June 15, 2024

@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.

wmmc88 avatar wmmc88 commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.