Skip to content
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

ReplaceFileW → could not find Storage in Win32 #2746

Closed
Coding-Badly opened this issue Dec 17, 2023 · 3 comments
Closed

ReplaceFileW → could not find Storage in Win32 #2746

Coding-Badly opened this issue Dec 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Coding-Badly
Copy link

Coding-Badly commented Dec 17, 2023

Summary

According to the documentation, feature Win32_Foundation is required for ReplaceFileW. That is apparently not enough. The Win32_Storage_FileSystem feature is also required.

Crate manifest

[package]
name = "bug_001"
version = "0.1.0"
edition = "2021"

[dependencies]
windows = { version = "0.52.0", features = ["Win32_Foundation"] }

Crate code

use windows::Win32::Storage::FileSystem::ReplaceFileW;

fn main() {
    println!("Hello, world!");
}

Error

error[E0433]: failed to resolve: could not find `Storage` in `Win32`
 --> src\main.rs:1:21
  |
1 | use windows::Win32::Storage::FileSystem::ReplaceFileW;
  |                     ^^^^^^^ could not find `Storage` in `Win32`
@Coding-Badly Coding-Badly added the bug Something isn't working label Dec 17, 2023
@tim-weis
Copy link
Contributor

Sounds like a duplicate of #2717.

@kennykerr
Copy link
Collaborator

Yes that issue was closed accidentally.

@kennykerr
Copy link
Collaborator

Duplicate of #2717

@kennykerr kennykerr marked this as a duplicate of #2717 Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants