Skip to content

Fix wts info class#14489

Merged
seanbudd merged 2 commits into
nvaccess:masterfrom
LeonarddeR:fixWTS_INFO_CLASS
Dec 30, 2022
Merged

Fix wts info class#14489
seanbudd merged 2 commits into
nvaccess:masterfrom
LeonarddeR:fixWTS_INFO_CLASS

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

None

Summary of the issue:

The WTS_INFO_CLASS enum as defined in NVDA contained a WTSQuerySessionInformation value, which shouldn't be part of the actual enum according to The docs
Also when calling WTSQuerySessionInformation, ctypes.pointer was used instead of ctypes.byref to pass values by reference.

Description of user facing changes

None

Description of development approach

Removed the entry and fixed the numbering. Use byref instead of pointer

Testing strategy:

Tested something like this in a remote session:
winAPI._wtsApi32.WTSQuerySessionInformation(winAPI._wtsApi32.WTS_CURRENT_SERVER_HANDLE, winAPI._wtsApi32.WTS_CURRENT_SESSION, 29, byref(ppBuffer), byref(pBytesReturned))

Known issues with pull request:

None known

Change log entries:

None needed

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@LeonarddeR LeonarddeR requested a review from a team as a code owner December 29, 2022 10:22
@LeonarddeR LeonarddeR requested a review from seanbudd December 29, 2022 10:22
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

From the python docs:

ctypes exports the byref function which is used to pass parameters by reference. The same effect can be achieved with the pointer function, although pointer does a lot more work since it constructs a real pointer object, so it is faster to use byref if you don't need the pointer object in Python itself:

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 136ac9937e

@seanbudd seanbudd merged commit b53692a into nvaccess:master Dec 30, 2022
@nvaccessAuto nvaccessAuto added this to the 2023.1 milestone Dec 30, 2022
@LeonarddeR LeonarddeR deleted the fixWTS_INFO_CLASS branch August 23, 2025 06:27
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.

4 participants