Skip to content

Using wildcards in build! results in STATUS_DLL_INIT_FAILED #743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
damyanp opened this issue Apr 28, 2021 · 4 comments
Closed

Using wildcards in build! results in STATUS_DLL_INIT_FAILED #743

damyanp opened this issue Apr 28, 2021 · 4 comments

Comments

@damyanp
Copy link
Member

damyanp commented Apr 28, 2021

Related to #742. Repro of this case at https://github.com/damyanp/windows-rs/tree/wildcards/examples/d3d12.

build.rs looks like:

fn main() {
    windows::build!(
        Windows::Win32::Direct3D12::*,
        Windows::Win32::Dxgi::*,
        Windows::Win32::Direct3D11::*,
        Windows::Win32::WindowsAndMessaging::*,
        Windows::Win32::SystemServices::*,
        Windows::Win32::DisplayDevices::{RECT}
    );
}

This builds successfully, but fails at runtime. Switching back to an explicit list of bindings to generate resolves the issue.

D:\prj\rust\windows-rs\examples\d3d12 [wildcards ≡]> cargo run
   Compiling d3d12_bindings v0.9.0 (D:\prj\rust\windows-rs\examples\d3d12\bindings)
   Compiling d3d12 v0.9.0 (D:\prj\rust\windows-rs\examples\d3d12)
    Finished dev [unoptimized + debuginfo] target(s) in 40.39s
     Running `D:\prj\rust\windows-rs\target\debug\d3d12.exe`
error: process didn't exit successfully: `D:\prj\rust\windows-rs\target\debug\d3d12.exe` (exit code: 0xc0000142, STATUS_DLL_INIT_FAILED)
@kennykerr
Copy link
Collaborator

I can't repro this.

image

@damyanp
Copy link
Member Author

damyanp commented Apr 29, 2021

Curious. I'll debug further. I'm guessing we're on different builds of Windows? I'm on the insider dev channel.

@kennykerr
Copy link
Collaborator

Yes, it may an API issue.

C:\git\windows-rs>cmd
Microsoft Windows [Version 10.0.19042.928]
(c) Microsoft Corporation. All rights reserved.

@damyanp
Copy link
Member Author

damyanp commented Apr 29, 2021

OK, I think that this is indeed a platform bug - it's failing to load vertdll.dll.

@damyanp damyanp closed this as completed Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants