Skip to content

Code Quality: Migrate DllImportAttribute to LibraryImportAttribute at NativeFindStorageItemHelper.cs #15056

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

Conversation

gumbarros
Copy link
Contributor

@gumbarros gumbarros commented Mar 26, 2024

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Part of Code Quality: Replace Vanara with CsWin32 #15000
    Validation
    How did you test these changes?
  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes? No

Screenshots (optional)
Add screenshots here.

@@ -76,7 +76,7 @@ public struct WIN32_FIND_DATA
public string cAlternateFileName;
}

[DllImport("api-ms-win-core-file-fromapp-l1-1-0.dll", SetLastError = true, CharSet = CharSet.Unicode)]
Copy link
Contributor Author

@gumbarros gumbarros Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need help with someone with Win32 knowledge to know if this CharSet property is important, the only equivalent is StringMarshalling

@gumbarros gumbarros changed the title Code Quality: Migrate DllImportAttribute to LibraryImport Code Quality: Migrate DllImportAttribute to LibraryImport at NativeFindStorageItemHelper.cs Mar 26, 2024
@gumbarros gumbarros changed the title Code Quality: Migrate DllImportAttribute to LibraryImport at NativeFindStorageItemHelper.cs Code Quality: Migrate DllImportAttribute to LibraryImportAttribute at NativeFindStorageItemHelper.cs Mar 26, 2024
@gumbarros gumbarros marked this pull request as draft March 27, 2024 00:59
@gumbarros
Copy link
Contributor Author

This PR is broken because LibraryImportAttribute requires custom marshaling for custom structs and I don't have deep knowledge of low level programming :(

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

Successfully merging this pull request may close these issues.

1 participant