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

Convert Shlwapi interop code to CSWin32 #7839

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

elachlan
Copy link
Contributor

@elachlan elachlan commented Sep 25, 2022

Relates to #7445

I am unsure on the SHLoadIndirectString changes and would love some feedback.

In MSBuild, we started with a smaller buffer and looped making it larger if the call failed. Also used ArrayPool in some spots. I guess it really depends on how large the returned information can technically get.

dotnet/msbuild#7186

Microsoft Reviewers: Open in CodeFlow

@elachlan elachlan requested a review from a team as a code owner September 25, 2022 05:02
@ghost ghost assigned elachlan Sep 25, 2022
@elachlan
Copy link
Contributor Author

Usually most APIs have a length output which makes it possible to quickly ascertain the required length. But some don't and require using a loop and ArrayPool. If we know the max length in advance, this makes it a lot easier.

Example:
https://github.com/dotnet/msbuild/blob/cc2719b701ecf85687b69067bb0a9d9d55344cbe/src/Tasks/ComReference.cs#L407-L436

@elachlan elachlan force-pushed the cswin32-shlwapi branch 3 times, most recently from 2048fb2 to e3a29fb Compare September 26, 2022 02:01
@elachlan
Copy link
Contributor Author

@RussKie There is a failure based on the CI image Unable to find directory for cmake 3.21.0;

The test failures I am unsure if they are related or flaky tests?

@RussKie
Copy link
Member

RussKie commented Sep 26, 2022

No, the CMake is related to the build images and the tooling available in those. The failure was caused by a flaky test.

RussKie
RussKie previously approved these changes Sep 26, 2022
Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@lonitra lonitra left a comment

Choose a reason for hiding this comment

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

Looks good!

@RussKie RussKie merged commit 94fea76 into dotnet:main Sep 28, 2022
@ghost ghost added this to the 8.0 Preview1 milestone Sep 28, 2022
v-elnovikova pushed a commit to v-elnovikova/winforms that referenced this pull request Oct 18, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 28, 2022
@elachlan elachlan deleted the cswin32-shlwapi branch January 5, 2023 22:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants