microsoft / microsoft/win32metadata
RM_PROCESS_INFO::TSSessionId is unsigned but RM_INVALID_TS_SESSION is signed
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 149
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 4
Description
RM_INVALID_TS_SESSION is intended to be compared to RM_PROCESS_INFO::TSSessionId but they have different types; one is signed and the other is unsigned. That then requires an `unchecked` cast when these are compared in C#.
Can the same type be used for both? I guess it would have to be the unsigned type, for consistency with WTS_CURRENT_SESSION, WTSQuerySessionInformationW, and others.
Contributor guide
Research direction
Start with generation/WinSDK/RecompiledIdlHeaders/um/RestartManager.h at the referenced declarations for RM_INVALID_TS_SESSION and RM_PROCESS_INFO::TSSessionId. Compare their types with WTS_CURRENT_SESSION and WTSQuerySessionInformationW, then verify that the declarations use a consistent type and no unchecked cast is required by the corresponding C# projection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100