You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.
The reason will be displayed to describe this comment to others. Learn more.
According to the FormatMessage API docs, the PDH error code values are of type DWORD, which the marshalling docs say should be rendered as uint. So this changes makes sense to me
According to the FormatMessage API docs, the PDH error code values are of type DWORD, which the marshalling docs say should be rendered as uint. So this changes makes sense to me
Yeah. The original author probably looked at PdhMsg.h and saw that the constants were suffixed with L. Really easy mistake to make, it's not super intuitive that long translates to Int32 and long long is what translates to Int64. Especially since that's only Windows (see 64-bit data models).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CL-CodeCleanupIndicates that a PR should be marked as a Code Cleanup change in the Change Log
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Avoid some signed/unsigned conversions.
PR Context
PDH_STATUSerror codes can be handled withUInt32https://docs.microsoft.com/en-us/windows/win32/perfctrs/pdh-error-codes
Follow-up: #13141
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.