Use uint instead of long for PDH constants#13502
Use uint instead of long for PDH constants#13502daxian-dbw merged 1 commit intoPowerShell:masterfrom
Conversation
rjmholt
left a comment
There was a problem hiding this comment.
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 |
|
🎉 Handy links: |
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.